Changes

Jump to navigation Jump to search
Line 56: Line 56:  
# simgear/simgear/scene/tgdb/SGTileDetailsCallback.hxx readNode(const std::string&, const osgDB::Options*) does the actual work to generate the details for a tile such as forests, random objects, lights, and it called by the PagedLOD object above.
 
# simgear/simgear/scene/tgdb/SGTileDetailsCallback.hxx readNode(const std::string&, const osgDB::Options*) does the actual work to generate the details for a tile such as forests, random objects, lights, and it called by the PagedLOD object above.
 
## line 138 calls generateRandomTileObjects to create the forest, buildings and buildings
 
## line 138 calls generateRandomTileObjects to create the forest, buildings and buildings
## generateRandomTileObjects (line 976) builds a set of OSG nodes and makes various calls to generate the random feature based on
+
## generateRandomTileObjects (line 976) builds a set of OSG nodes and makes various calls to generate the random features.
 +
### line 1086 calls computeRandomForest to create a list of the random trees based on the terrain triangles and their landclasses.  computeRa
 +
### computeRandomForest considers each terrain triangle in turn and...
 +
#### looks up the landclass in the materials library to determine if this landclass (and therefore triangle) contains any trees
 +
#### assuming it does, gets a TreeBin to put these trees (based on having the same settings as an existing tree definitions), then
 +
#### generates a series of random points across the triangle, each of which will be rendered into a tree.
 +
### line 1089 converts that intermediate datastructure into the OSG code to actually render the trees.

Navigation menu