![]() |
VR-Forces 4.5 Class Documentation
|
A terrain (DtTerrain) in VR-Forces is a facade around a set of DtTerrainPatch and DtFeatureLayer objects.
The terrain maintains records of each operation performed on it (such as adding or removing a terrain patch), which are saved and loaded to MTF files. The DtTerrain is not a distributed object, so it exists only on the master display engine. If you are using external display engines, each display engine must have the same terrain files on its local computer.
A DtTerrainPatch is a facade around a DtTerrainPatchObject , which is a distributed object that combines the functionality of a model and a scene object. The terrain patch maintains a history of operations performed on it, such as extracting props or adding an overlay image. This history is included when the terrain is saved and executed when it is loaded. Each DtTerrainPatchObject has a model definition that specifies where to find the geometry (typically through the filename parameter) and a coordinate system (through the terrainCoordinateSystem and terrainCoordinateSystemParameters parameters).
Terrain patches are located in the scene graph under the terrain root node. They are included in intersection tests for ground clamping and navigation, but excluded for selection.
A DtFeatureLayer is a facade around a collection of DtProp objects, which represent distinct terrain-like features such as lampposts and buildings. Feature layers are created in VR-Forces by:
VR-Forces provides the convenience class DtPropAdder to load point features from files. The prop adder finds point features that match a rule specified by a DtAddPropsRuleRecord. Then it creates a prop at the location of each point feature, using the model definition specified in the rule. In order for the feature layer to correctly maintain its state, the DtPropAdder should not be used directly. Use the DtFeatureLayer's addProps() method, which makes the correct calls on the DtPropAdder for you. For instance, suppose you wanted to add SpeedTrees at the sites of tree point features in a GDB file. You could:
A DtTerrainPatch can find nodes in its scene graph and move them into DtModel objects. The DtModel for each prop must be created in the driver to be distributed to all display engines, but creating them requires knowledge of the scene graph. Therefore, basic prop extraction happens in a multi-step process:
[<< Models, Model Instances, and Model Definitions ] [Home] [Top of Page] [Environmental Effects and the Lighting Model >>]