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.
vtPlantAppearance
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.
vtPlantAppearance3d
Extends the
PlantAppearance
class 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.
vtPlantSpecies
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 ofPlantAppearance
objects which describe how the plant appears.
ID - an arbitrary but unique number identifying this species.
vtPlantSpecies3d
Extends the
PlantSpecies
class by containing a set ofPlantAppearance3d
objects.
vtSpeciesList
Contains a set of
PlantSpecies
objects. 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.
vtSpeciesList3d
Extends the
PlantList
class with the ability to containPlantSpecies3d
objects, and easily initialize all of the appearances withCreatePlantSurfaces()
.
vtPlantDensity
Combines a Common Name with a Density (in specimes per square meter) to describes how densely a species is found in a given area.
vtBioType
A "BioType" is like a ecological type classification. It contains any number of
PlantDensity
objects.
vtBioRegion
A BioRegion is a set of all the BioTypes found in a given region.
vtPlantInstance
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.
vtPlantInstanceArray
Contains a set of
PlantInstance
objects, 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)