This section describes various aspects of the physical world (terrain and models) that are simulated in VR-Forces.
The DtPhysicalWorld is the primary interface to all of the "physical" aspects of the simulated world. The primary purpose is to provide a singular interface for models to access all of the physical objects, including terrain, DtSimObjects, and any other element in the simulated environment that could be considered a physical object in any way.
The primary interfaces to this class provide information about the simulation that take into account all or a specific subset of the physical elements. In general, models should use the queries that account for all elements of the physical world, or a combination of the specific element categories instead of only querying one or a small subset. This will help to ensure proper results and compatibility with future changes.
Additionally, in order to ensure consistency, the physical world can configured itself, which subsequently affects all related queries. For a specific example, look at the Line of Sight functions and related functionality.
Note application developers will want to ensure that any additions or subtractions to the physical elements in the environment, at a structural level, are accounted for in this classes interface. For instance, if a new type of terrain element, is added to the simulation, such as an implicit surface instead of a polygon, the queries of this class must be updated.
- Note
- The DtPhysicalWorld class is high level class that give you the ability to query the terrain in different predetermine ways that we will show below. This class relies on the The Terrain API class to execute the actual queries.
Bellow are the most used functions of this interface. For more information about this clas see DtPhysicalWorld.
- Coordinate conversion: This class contain utility functions to help convert coordinates (geocentricToDatabase, databaseToGeocentric, databaseToGeodetic, geodeticToDatabase , ect)
- down: Calculates and returns the down vector, representing gravity, at the specified database location.
- magneticNorth: Queries the World Magnetic Model to get the magnetic north direction.
- terrainHeight: Queries only interact with the terrain elements, Functions for finding the height of the terrain at a specified location.
- terrainHeightAndSurface: Functions for determining the height of the terrain at a specified location AND the soil type of the terrain polygon intersected at that location.
- terrainHeightAndSurfaceBelow: looks below the input point rather than finding the highest surface at the xy of the input point.
- terrainHeightUnderWater: This function gets the ground surface underneath the water at the given location.
- terrainSurface: Functions for determining the surface of the terrain at a specified location.
- closestTerrainLocation: Function to determine the closest intersection to a specified location.
- intersect: Calculates the first terrain intersection point along a chord.
- allIntersectsAlongChord: Computes the list of all intersections of a chord with the terrain database.
- checkLineOfSight: Determines if targetObject is visible from the databaseViewingPoint .
- checkLineOfSightWithoutObjects: Determines if the given target point can be seen from the viewing point.
- checkLineOfFire: Similar to the checkLineOfSight functions, returns intersection information if there is an intersection.
- Note
- The DtPhysicalWorld also give you access to various manager that can help you retreive information related to the Physical World. Here are a few of them, for more detail please look at the DtPhysicalWorld class.
- environmentalStateManager: This manager maintains the current state of the dynamic environment, such as time of day, illumination, and various aspects of the weather.
- dynamicTerrainManager: Handles any dynamic changes to the terrain. There is only one dynamic terrain state for the whole simulation.
- sensorSignatureManager: Central manager for calculating apparent signatures of entities from viewpoints.
- spatialVrfObjectManager: This manager is used indirectly through various methods of DtPhysicalWorld to allow performant searches for objects based on extents or chords.