Vegetation is implemented in the VTP libraries with the following classes. More complete documentation is needed, but this should give a good idea of the functionality that exists and how to use it.
For a description of the high-level concepts that are implemented here, see VTP Vegetation.
Describes a single appearance of a plant. Currently, this can only be a texture image.
Filename: file path and filename of a 32-bit PNG file containing the image.
Width, Height: size in meters of the image.
Shadow radius and darkness: the radius in meters of the shadow that would be produced by full sunlight at noon.
PlantAppearanceclass with the ability to generate the 3D geometry of that appearance. Call
LoadAndCreate()once, to initialize the object, then call
GenerateGeom()for each real plant you want in your scene.
Describes a single species of plant, each of which has:
Common name - e.g. "Papaya"
Scientific name - e.g. "Carica papaya"
Maximum height - the maximum height attained during the life cycle of typical specimens of this species.
Appearances - any number of
PlantAppearanceobjects which describe how the plant appears.
ID - an arbitrary but unique number identifying this species.
PlantSpeciesclass by containing a set of
Contains a set of
PlantSpeciesobjects. You can use Read() and Write() to load and save the list of species to a text file, which includes descriptions of all the appearances.
PlantListclass with the ability to contain
PlantSpecies3dobjects, and easily initialize all of the appearances with
Combines a Common Name with a Density (in specimes per square meter) to describes how densely a species is found in a given area.
A "BioType" is like a ecological type classification. It contains any number of
A BioRegion is a set of all the BioTypes found in a given region.
Represents an actual plant specimen in the world, described compactly by:
Location: a 2D geographical coordinate.
Size: the height of this specimen.
Species ID: the numeric id of the plant's species.
Contains a set of
PlantInstanceobjects, for example, an actual section of forest.
You can use ReadVF() and WriteVF() to load and save this set from a compact binary file format (.vf)