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.
vtPlantAppearanceDescribes 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.
vtPlantAppearance3dExtends the
PlantAppearanceclass with the ability to generate the 3D geometry of that appearance. CallLoadAndCreate()once, to initialize the object, then callGenerateGeom()for each real plant you want in your scene.
vtPlantSpeciesDescribes 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 ofPlantAppearanceobjects which describe how the plant appears.
ID - an arbitrary but unique number identifying this species.
vtPlantSpecies3dExtends the
PlantSpeciesclass by containing a set ofPlantAppearance3dobjects.
vtSpeciesListContains 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.
vtSpeciesList3dExtends the
PlantListclass with the ability to containPlantSpecies3dobjects, and easily initialize all of the appearances withCreatePlantSurfaces().
vtPlantDensityCombines a Common Name with a Density (in specimes per square meter) to describes how densely a species is found in a given area.
vtBioTypeA "BioType" is like a ecological type classification. It contains any number of
PlantDensityobjects.
vtBioRegionA BioRegion is a set of all the BioTypes found in a given region.
vtPlantInstanceRepresents 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.
vtPlantInstanceArrayContains 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)