![]() |
VR-Forces 5.0.2 Developer's Guide
|
The DtPhysicalWorld is the primary interface to and manager of all of the "physical" aspects of the simulated world. The primary purpose of this class is to provide a singular interface for models to access all aspects of the world that simulation objects may want to interact with as they are simulated.
The primary aspects of DtPhysicalWorld are :
DtPhysicalWorld contains methods for accessing all of these. It also has methods that combine various aspects of these parts of the world together to answer a single query, such as a line of sight query between two positions, which will take multiple aspects of the world into account. 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 be configured itself, which subsequently affects all related queries. For a specific example, look at the Line of Sight functions and related functionality.
Public Types | |
| typedef std::list < DtVrfLineOfSightFunctorSP > | DtLineOfSightTestContainer |
| typedef DtString | DtLosTestKey |
Public Member Functions | |||||||||||
| DtPhysicalWorld (DtSimulationServices *simManager, DtLocalObjectManager *) | |||||||||||
| virtual | ~DtPhysicalWorld () | ||||||||||
| virtual bool | initialize () | ||||||||||
| virtual bool | reinitialize () | ||||||||||
| virtual bool | reset () | ||||||||||
| virtual bool | loadParametersFromFile (const DtFilename &filename) | ||||||||||
| virtual bool | loadPhysicalWorldFile (const DtFilename &filename) | ||||||||||
| virtual void | processParameters () | ||||||||||
| const DtFilename & | physicalWorldFile () const | ||||||||||
| virtual bool | parametersLoaded () const | ||||||||||
| virtual bool | isValidState () const | ||||||||||
| virtual void | tick () | ||||||||||
| virtual bool | terrainHeightAndSurfaceBelow (const DtVector &databaseLocation, double &heightAtLocation, DtSurface &surfaceAtLocation, bool *dataAvailable=0, bool overrideBlockingAssert=false) const | ||||||||||
| virtual void | getVrfObjectsAlongChord (const DtVector &databaseStart, const DtVector &databaseEnd, std::vector< const DtSimObject * > &orderedList) const | ||||||||||
| virtual DtManagedObjectListConstPtr | getSpatiallyManagedVrfObjectList () | ||||||||||
| virtual bool | initializeSpatialVrfObjectOrganization () | ||||||||||
| virtual void | calcSpatialMgrResolution (const DtManagedObjectListConstPtr &vrfObjList) | ||||||||||
| virtual DtFilterFunctionPredicate | getSpatialOrganizationPredicate () | ||||||||||
| virtual bool | processSpatialOrganizationObjectFilterFcn (const DtSimObject *obj) | ||||||||||
| virtual MAKVRinTerra::DtDynamicFeatureSet * | dynamicObjectFeatures () const | ||||||||||
| virtual bool | checkLineOfSight (const DtSimObject &viewingObject, const DtVector &databaseViewingPoint, const DtSimObject &targetObject, bool *terrainDataAvailable=0, const DtString &featureQueryName="default", DtVector *intersectionPoint=0) const | ||||||||||
| virtual bool | checkLineOfSight (const DtSimObject &viewingObject, const DtVector &databaseViewingPoint, const DtVector &databaseTargetPoint, bool *terrainDataAvailable=0, const DtString &featureQueryName="default", DtVector *intersectionPoint=0) const | ||||||||||
| virtual bool | checkLineOfSight (const DtVector &databaseViewingPoint, const DtSimObject &targetObject, bool *terrainDataAvailable=0, const DtString &featureQueryName="default", DtVector *intersectionPoint=0) const | ||||||||||
| virtual bool | checkLineOfSightWithoutObjects (const DtVector &databaseViewingPoint, const DtVector &databaseTargetPoint, bool *terrainDataAvailable=0, const DtString &featureQueryName="default", DtVector *intersectionPoint=0) const | ||||||||||
| virtual bool | checkLineOfFire (const DtSimObject &viewingObject, const DtVector &databaseViewingPoint, const DtSimObject &targetObject, const DtVector &databaseTargetPoint, bool *terrainDataAvailable=0, double *normIntersectDistance=0, const DtSimObject **intersectObject=0, DtVector *intersectingPoint=0, int *ignoredForceType=0) const | ||||||||||
| virtual bool | checkLineOfFire (const DtSimObject &viewingObject, const DtVector &databaseViewingPoint, const DtVector &databaseTargetPoint, bool *terrainDataAvailable=0, double *normIntersectDistance=0, const DtSimObject **intersectionObject=0, DtVector *intersectingPoint=0, int *ignoredForceType=0) const | ||||||||||
| virtual bool | checkLineOfFire (const DtVector &databaseViewingPoint, const DtVector &databaseTargetPoint, bool *terrainDataAvailable=0, double *normIntersectDistance=0, const DtSimObject **intersectionObject=0, DtVector *intersectingPoint=0, int *ignoredForceType=0) const | ||||||||||
| virtual bool | checkLineOfFireWithoutObjects (const DtVector &databaseViewingPoint, const DtVector &databaseTargetPoint, bool *terrainDataAvailable=0, double *normIntersectDistance=0, const DtSimObject **intersectionObject=0, DtVector *intersectingPoint=0) const | ||||||||||
| virtual void | expireDataLoadRequestsBeforeTime (const double &time) | ||||||||||
| virtual double | thermoclinePermeability (const DtPoint &startPoint, const DtPoint &endPoint) const | ||||||||||
| virtual bool | checkLineOfSight (const DtLineOfSightTestContainer &losTests, DtVrfLineOfSightCheckParams &losCheckParams) const | ||||||||||
| const DtLineOfSightTestContainer & | lineOfSightTestsToPerform () const | ||||||||||
| const DtChord | createWorldIntersectionChord (const DtVector &databaseLocation) const | ||||||||||
| virtual void | addLineOfSightTest (const DtLosTestKey &, DtVrfLineOfSightFunctorSP losTest) | ||||||||||
| virtual DtVrfLineOfSightFunctorSP | lineOfSightTest (const DtLosTestKey &) const | ||||||||||
| virtual void | removeLineOfSightTest (const DtLosTestKey &testKey) | ||||||||||
| virtual bool | intersectVrfObjects (const DtSimObject *const primaryVrfObject, const DtVector &databaseStartPoint, const DtSimObject *const secondaryVrfObject, const DtVector &databaseEndPoint, double &interxTime, const DtSimObject **intersectedObject=0, DtVector *intersectNormal=0, const std::list< DtUUID > &ignoreList=std::list< DtUUID >(), int *ignoredForceType=0) const | ||||||||||
| virtual bool | intersectVrfObjects (const DtSimObject *const primaryVrfObject, const DtVector &databaseStartPoint, const DtVector &databaseEndPoint, double &interxTime, const DtSimObject **intersectedObject=0, DtVector *intersectNormal=0, const std::list< DtUUID > &ignoreList=std::list< DtUUID >(), int *ignoredForceType=0) const | ||||||||||
| virtual bool | intersectsVrfObject (const DtSimObject &vrfObjectToTest, const DtVector &databaseStartPoint, const DtVector &databaseEndPoint, double &distToIntersect, DtVector *surfaceNormal=0) const | ||||||||||
| virtual bool | embarkedOnSameLowFidelityObject (const DtSimObject &primaryVrfObject, const DtSimObject &secondaryVrfObject) const | ||||||||||
| virtual void | tickDynamicTerrainManager (DtVrfCallbackQueue *) | ||||||||||
| virtual void | addPreLoadParametersCallback (DtNoArgumentCallbackList::DtCallbackFunctionType fcn, void *usrData) | ||||||||||
| virtual void | removePreLoadParametersCallback (DtNoArgumentCallbackList::DtCallbackFunctionType fcn, void *usrData) | ||||||||||
| virtual void | addPostLoadParametersCallback (DtNoArgumentCallbackList::DtCallbackFunctionType fcn, void *usrData) | ||||||||||
| virtual void | removePostLoadParametersCallback (DtNoArgumentCallbackList::DtCallbackFunctionType fcn, void *usrData) | ||||||||||
Coordinate System Operations | |||||||||||
| virtual Coordinate_System * | coordinateSystem () | ||||||||||
| virtual const Coordinate_System * | coordinateSystem () const | ||||||||||
| virtual void | geocentricToDatabase (const DtVector &in, DtVector &out) const | ||||||||||
| virtual void | geocentricToDatabase (const DtDcm &in, DtDcm &out) const | ||||||||||
| virtual void | geocentricToDatabase (const DtVector &vIn, const DtDcm &dIn, DtVector &vOut, DtDcm &dOut) const | ||||||||||
| virtual void | geocentricToDatabase (const DtExtent &in, DtExtent &out) const | ||||||||||
| virtual void | databaseToGeocentric (const DtVector &in, DtVector &out) const | ||||||||||
| virtual void | databaseToGeocentric (const DtDcm &in, DtDcm &out) const | ||||||||||
| virtual void | databaseToGeocentric (const DtVector &vIn, const DtDcm &dIn, DtVector &vOut, DtDcm &dOut) const | ||||||||||
| virtual void | databaseToGeocentric (const DtExtent &in, DtExtent &out) const | ||||||||||
| virtual void | databaseToGeodetic (const DtVector &databasePosition, DtGeodeticCoord &geodeticPosition) const | ||||||||||
| virtual void | databaseToGeodetic (const DtVector &databasePosition, DtVector &geodeticPosition) const | ||||||||||
| virtual void | databaseToGeodetic (const DtExtent &extent, DtExtent &destExtent) const | ||||||||||
| virtual void | geodeticToDatabase (const DtExtent &extent, DtExtent &destExtent) const | ||||||||||
| virtual void | geodeticToDatabase (const DtGeodeticCoord &geodeticPosition, DtVector &databasePosition) const | ||||||||||
| virtual void | geodeticToDatabase (const DtVector &geodeticPosition, DtVector &databasePosition) const | ||||||||||
| virtual void | topoToDatabase (const DtVector &databasePosition, DtDcm &topoToDatabase) const | ||||||||||
| virtual void | databaseToTopo (const DtVector &databasePosition, DtDcm &databaseToTopo) const | ||||||||||
| virtual DtVector | down (const DtVector &databasePosition) const | ||||||||||
| virtual double | magneticNorth (const DtSimObject *obj) | ||||||||||
| virtual double | magneticNorth (const DtVector &point) | ||||||||||
Terrain Height | |||||||||||
Functions for finding the height of the terrain at a specified location. Takes a location, in either database (DB) coordinates or a latitude and longitude, and the returns the altitude of the terrain at the specified location if possible. If no intersection with terrain was found at the specified location, 0 is returned.
2 - The intersection is defined to be the topmost intersection with the terrain. Thus if there are multiple levels of terrain polygons, the highest intersection will be returned as the height.
| |||||||||||
| virtual double | terrainHeight (const DtPoint &databaseLocation, bool *dataAvailable=0, bool overrideBlockingAssert=false) const | ||||||||||
| virtual double | terrainHeight (double lat, double lon, bool *dataAvailable=0, bool overrideBlockingAssert=false) const | ||||||||||
| virtual double | terrainHeight (const DtVector &databaseLocation, bool *dataAvailable=0, bool overrideBlockingAssert=false) const | ||||||||||
Terrain Height (boolean result) | |||||||||||
Similar to above functions, but return a boolean signifying whether or not an intersection with the terrain was found or not. If not, the height is set to 0 and false is returned. If so, true is returned and the height parameter is set to the height of the terrain.
| |||||||||||
| virtual bool | terrainHeight (const DtPoint &databaseLocation, double &height, bool *dataAvailable=0, bool overrideBlockingAssert=false) const | ||||||||||
| virtual bool | terrainHeight (double lat, double lon, double &height, bool *dataAvailable=0, bool overrideBlockingAssert=false) const | ||||||||||
| virtual bool | terrainHeight (const DtVector &databaseLocation, double &height, bool *dataAvailable=0, bool overrideBlockingAssert=false) const | ||||||||||
Terrain Height and Surface | |||||||||||
Functions for determining the height of the terrain at a specified location, AND the soil type of the terrain polygon intersected at that location. Return Values: These functions return true if an intersection occurred, If so, they also set the height to be the height of the intersection point and the soilType to be the soilType associated with the intersected polygon. They return false if no intersection occurred. If so, they also set the height to 0 and the soilType to "DtSurface::undefinedSoilType"
| |||||||||||
| virtual bool | terrainHeightAndSurface (const DtPoint &databaseLocation, double &height, DtSurface &surface, bool *dataAvailable=0, bool overrideBlockingAssert=false) const | ||||||||||
| virtual bool | terrainHeightAndSurface (double lat, double lon, double &height, DtSurface &surface, bool *dataAvailable=0, bool overrideBlockingAssert=false) const | ||||||||||
| virtual bool | terrainHeightAndSurface (const DtVector &databaseLocation, double &height, DtSurface &surface, bool *dataAvailable=0, bool overrideBlockingAssert=false) const | ||||||||||
| virtual bool | terrainHeightAndSurface (const DtVector &databaseLocation, double &heightAtLocation, DtVrfChordIntersectionRecord &intersectionRec, DtIntersectionRecord::DtIntersectionType irtFlag=DtIntersectionRecord::INT_ALL_DATA, bool *dataAvailable=0, bool overrideBlockingAssert=false) const | ||||||||||
| virtual bool | terrainHeightUnderWater (const DtVector &databaseLocation, double &groundHeight, DtSurface &groundSurface, DtVector &groundNormal, double &waterHeight, DtSurface::DtMedium &topSurfaceMedium, bool *dataAvailable=0, bool overrideBlockingAssert=false) | ||||||||||
Terrain Surface | |||||||||||
Functions for determining the surface of the terrain at a specified location.
| |||||||||||
| virtual bool | terrainSurface (const DtPoint &databaseLocation, DtSurface &surface, bool *dataAvailable=0, bool overrideBlockingAssert=false) const | ||||||||||
| virtual bool | terrainSurface (double lat, double lon, DtSurface &surface, bool *dataAvailable=0, bool overrideBlockingAssert=false) const | ||||||||||
| virtual bool | terrainSurface (const DtVector &databaseLocation, DtSurface &surface, bool *dataAvailable=0, bool overrideBlockingAssert=false) const | ||||||||||
| virtual DtSurface | terrainSurface (const DtPoint &databaseLocation, bool *dataAvailable=0, bool overrideBlockingAssert=false) const | ||||||||||
| virtual DtSurface | terrainSurface (double lat, double lon, bool *dataAvailable=0, bool overrideBlockingAssert=false) const | ||||||||||
| virtual DtSurface | terrainSurface (const DtVector &databaseLocation, bool *dataAvailable=0, bool overrideBlockingAssert=false) const | ||||||||||
Closest Terrain Location | |||||||||||
Similar to the terrainHeight functions above. Function to determine the closest intersection to a specified location, either in database (DB) coordinates or in lat/lon. The closest intersection is defined as the closest intersection in the down or up direction from location. Thus if there are multiple terrain levels, it will not necessarily return an intersection with the topmost as the terrainHeight functions do. Return Values: True if any intersection, vector data or terrain, is found. If at least one terrain intersection is found, the intersectionPoint parameter is set to the closest intersection point.
| |||||||||||
| virtual bool | closestTerrainLocation (const DtPoint &databaseLocation, DtPoint &intersectionPoint, bool *dataAvailable=0, bool overrideBlockingAssert=false) const | ||||||||||
| virtual bool | closestTerrainLocation (double lat, double lon, DtPoint &intersectionPoint, bool *dataAvailable=0, bool overrideBlockingAssert=false) const | ||||||||||
| virtual bool | closestTerrainLocation (const DtVector &databaseLocation, DtPoint &intersectionPoint, bool *dataAvailable=0, bool overrideBlockingAssert=false) const | ||||||||||
| virtual bool | closestTerrainLocation (const DtPoint &databaseLocation, DtVrfChordIntersectionRecord &record, DtIntersectionRecord::DtIntersectionType irtFlag=DtIntersectionRecord::INT_ALL_DATA, bool *dataAvailable=0, bool overrideBlockingAssert=false) const | ||||||||||
| virtual bool | closestTerrainLocation (const DtPoint &databaseLocation, DtVrfChordIntersectionRecord &record, const DtString &vectorFeatureLookup, DtIntersectionRecord::DtIntersectionType irtFlag=DtIntersectionRecord::INT_ALL_DATA, bool *dataAvailable=0, bool overrideBlockingAssert=false) const | ||||||||||
| virtual bool | closestTerrainLocation (double lat, double lon, DtVrfChordIntersectionRecord &record, DtIntersectionRecord::DtIntersectionType irtFlag=DtIntersectionRecord::INT_ALL_DATA, bool *dataAvailable=0, bool overrideBlockingAssert=false) const | ||||||||||
| virtual bool | closestTerrainLocation (const DtVector &databaseLocation, DtVrfChordIntersectionRecord &record, DtIntersectionRecord::DtIntersectionType irtFlag=DtIntersectionRecord::INT_ALL_DATA, bool *dataAvailable=0, bool overrideBlockingAssert=false) const | ||||||||||
| virtual bool | closestTerrainLocation (const DtVector &curPosition, DtVector &intersection, bool ignoreWater, bool *dataAvailable=0, bool overrideBlockingAssert=false) const | ||||||||||
Intersect | |||||||||||
| virtual bool | intersect (const DtChord &chord, DtPoint &intersectionPoint, double &intersectionTime, bool *dataAvailable=0, bool overrideBlockingAssert=false) const | ||||||||||
| virtual bool | intersect (const DtChord &chord, DtVrfChordIntersectionRecord &record, DtIntersectionRecord::DtIntersectionType irtFlag=DtIntersectionRecord::INT_ALL_DATA, bool *dataAvailable=0, bool overrideBlockingAssert=false) const | ||||||||||
| virtual bool | allIntersectsAlongChord (const DtChord &chord, DtVrfChordIntersectRecordList &intList, DtIntersectionRecord::DtIntersectionType irtFlag=DtIntersectionRecord::INT_ALL_DATA, bool *dataAvailable=0, bool overrideBlockingAssert=false) const | ||||||||||
Ground Clamp | |||||||||||
Functions to ground clamp a given location to the terrain. | |||||||||||
| virtual void | groundClamp (DtPoint &databaseCoord, float const offset=0, bool *dataAvailable=0, bool overrideBlockingAssert=false) const | ||||||||||
| virtual void | groundClamp (DtVector &databaseCoord, float const offset=0, bool *dataAvailable=0, bool overrideBlockingAssert=false) const | ||||||||||
The Terrain Interface | |||||||||||
The terrain interface provides access to the terrain database to all other parts of the simulation. DtPhysicalWorld also has many terrain query methods, such as DtPhysicalWorld::closestTerrainLocation() and DtPhysicalWorld::groundClamp(), that can be used without making direct calls to the terrain interface. Please see the The Terrain API for more details. | |||||||||||
| virtual DtTerrainInterface * | terrainInterface () | ||||||||||
| virtual const DtTerrainInterface * | terrainInterface () const | ||||||||||
| virtual void | setTerrainInterface (DtTerrainInterface *newTerrainDatabase) | ||||||||||
The Environmental State Manager | |||||||||||
The environmental state manager maintains the current state of the dynamic environment, such as time of day, illumination, and various aspects of the weather. All access to this data from any behavior or dynamics model should be made to this class. The environmental state data is distributed over the network. DtEnvironmentalStateManager maintains the current state of whatever the conditions are in the current VR-Forces scenario, even if they are being simulated and maintained by a different simulation engine. The DtEnvironmentalStateManager also has methods for changing the environmental state parameters. When any of these methods are called, this class locates the simulation engine in the exercise that is simulating the environmental state, and sends commands to that simulation engine to change the state.As a result, any calls to these modification methods will result in the environmental state changing for all simulation engines in the exercise, not just the local application. | |||||||||||
| virtual DtEnvironmentalStateManager * | environmentalStateManager () | ||||||||||
| virtual const DtEnvironmentalStateManager * | environmentalStateManager () const | ||||||||||
| virtual void | setEnvironmentalStateManager (DtEnvironmentalStateManager *manager) | ||||||||||
| void | visitVrfObjects (const DtExtent &extent, class DtSpatialSelectionFunctor &callback) const | ||||||||||
| void | visitVrfObjects (const DtChord &chord, class DtSpatialSelectionFunctor &callback) const | ||||||||||
| virtual void | processQuerySpatialSubdivisionConfiguration (DtSimMessage *msg) | ||||||||||
| virtual void | processSetSpatialSubdivisionConfiguration (DtSimMessage *msg) | ||||||||||
| virtual bool | useVrfObjectSpatialSub () const | ||||||||||
| virtual void | setUseVrfObjectSpatialSub (bool yesOrNo) | ||||||||||
| virtual bool | isSpatialMgrResolutionUserSpecified () const | ||||||||||
| virtual void | setSpatialMgrResolutionUserSpecified (bool yesOrNo) | ||||||||||
| virtual unsigned int | vrfObjectSpatialSubXResolution () const | ||||||||||
| virtual unsigned int | vrfObjectSpatialSubYResolution () const | ||||||||||
| virtual unsigned int | vrfObjectSpatialSubZResolution () const | ||||||||||
| virtual void | setVrfObjectSpatialSubXResolution (unsigned int newXResolution) | ||||||||||
| virtual void | setVrfObjectSpatialSubYResolution (unsigned int newYResolution) | ||||||||||
| virtual void | setVrfObjectSpatialSubZResolution (unsigned int newZResolution) | ||||||||||
Sensor Propagation | |||||||||||
DtPhysicalWorld contains the sensor propagation models. Please see Sensing Object Signatures, for a description of how sensor propagation models are used by the sensor. DtPhysicalWorld owns an instance of a class called DtSensorSignatureManager that is accessible though the sensorSignatureManager() method. This manager contains DtSignaturePropagator subclasses that implement algorithms that determine how sensor signatures are altered by the environment. Sensor ranges and how sensors are blocked by terrain, environment state, and other factors are determined by these propagators. The signature propagation model is used by calling one of the apparentObjectSignature() methods on the DtSensorSignatureManager. The string name of the sensor domain is passed in, as well as the target object and the viewer location. These propagators make use of the rest of the physical world class to determine the result. | |||||||||||
| virtual DtSensorSignatureManager * | sensorSignatureManager () | ||||||||||
| virtual const DtSensorSignatureManager * | sensorSignatureManager () const | ||||||||||
| virtual const DtSimulationServices * | simulationServices () const | ||||||||||
| virtual DtSimulationServices * | simulationServices () | ||||||||||
| virtual DtDynamicTerrainManager * | dynamicTerrainManager () | ||||||||||
| virtual const DtDynamicTerrainManager * | dynamicTerrainManager () const | ||||||||||
| virtual void | setDynamicTerrainManager (DtDynamicTerrainManager *manager) | ||||||||||
| virtual DtPhysicalWorldParams * | parameters () | ||||||||||
| virtual const DtPhysicalWorldParams * | parameters () const | ||||||||||
| VRF4API_METHOD bool | checkLineOfFire (const DtLocalObject &viewingObject, const DtVector &databaseViewingPoint, const DtLocalObject &targetObject, const DtVector &databaseTargetPoint, bool *terrainDataAvailable=0, double *normIntersectDistance=0, const DtSimObject **intersectObject=0, DtVector *intersectingPoint=0, int *ignoredForceType=0) const | ||||||||||
| VRF4API_METHOD bool | checkLineOfFire (const DtLocalObject &viewingObject, const DtVector &databaseViewingPoint, const DtVector &databaseTargetPoint, bool *terrainDataAvailable=0, double *normIntersectDistance=0, const DtSimObject **intersectionObject=0, DtVector *intersectingPoint=0, int *ignoredForceType=0) const | ||||||||||
| VRF4API_METHOD DtSimulationServices * | simManager () | ||||||||||
| VRF4API_METHOD const DtSimulationServices * | simManager () const | ||||||||||
| VRF4API_METHOD DtSimObjectManager * | objectManager () | ||||||||||
Static Public Member Functions | |
| static bool | spatialOrganizationObjectFilterFcn (const DtSimObject *obj, void *usr) |
| static void | querySpatialSubdivisionConfigurationCallback (DtSimMessage *msg, void *usr) |
| static void | setSpatialSubdivisionConfigurationCallback (DtSimMessage *msg, void *usr) |
Protected Types | |
| typedef std::map< DtLosTestKey, DtVrfLineOfSightFunctorSP > | DtKeyedLineOfSightTestContainer |
| typedef DtKeyedLineOfSightTestContainer::iterator | DtMasterLosTestIter |
| typedef DtKeyedLineOfSightTestContainer::const_iterator | DtMasterLosTestConstIter |
| typedef DtLineOfSightTestContainer::iterator | DtLosTestIter |
| typedef DtLineOfSightTestContainer::const_iterator | DtLosTestConstIter |
Static Protected Member Functions | |
| static bool | canBlockLineOfSight (const DtSimObject *object, void *usr) |
Private Member Functions | |
| DtPhysicalWorld (const DtPhysicalWorld &orig) | |
| DtPhysicalWorld & | operator= (const DtPhysicalWorld &orig) |
Friends | |
| class | IntersectVrfObjectFunctor |
| virtual void | sendSensorDomains () |
| static void | requestSensorDomainsCallback (DtSimMessage *msg, void *usr) |
Spatial Organization of Simulation Objects | |
DtPhysicalWorld is responsible for maintaining a spatial organization of simulation objects in the scenario. This differs slightly from the list of objects maintained by the DtSimObjectManager in that the main purpose of this list is to be fast and easy to search using spatial searches. For example, searching to determine if a particular sight line is blocked by any simulation objects in the scenario is done by querying the DtPhysicalWorld. Internally, a spatially organized structure is used and updated each simulation frame, to optimize the searching of simulation objects based on physical location. These searches are done using methods such as getVrfObjects() and visitVrfObjects(). There are various versions of these methods that take different spatial structures, such as DtExtent objects, DtChord objects, and others.
| |
| typedef std::vector< const DtSimObject * > | DtVrfConstObjectUniqueContainer |
| bool | getVrfObjects (const DtExtent &extent, DtVrfConstObjectUniqueContainer &objects) const |
| bool | getVrfObjects (const DtVrfObjectPredicate &predicate, const DtExtent &extent, DtVrfConstObjectUniqueContainer &objects) const |
| bool | getVrfObjects (const DtChord &chord, std::vector< const DtSimObject * > &objects) const |
| bool | getVrfObjects (const DtVrfObjectPredicate &predicate, const DtChord &chord, std::vector< const DtSimObject * > &objects) const |
| typedef std::list<DtVrfLineOfSightFunctorSP> DtPhysicalWorld::DtLineOfSightTestContainer |
| typedef std::vector<const DtSimObject*> DtPhysicalWorld::DtVrfConstObjectUniqueContainer |
Used to get the relevant DtSimObjects from the object manager. If a primitive is specified, the function returns a container of DtSimObjects that is guaranteed to contain at least all the DtSimObjects that intersect the specified geometric primitive.
The extent and chord should be in local coordinates.
The following typedefs, functions, and other code are all related to the Line Of Sight calculations. Methods to add new visibility methods. Default are added in constructor.
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
| DtPhysicalWorld::DtPhysicalWorld | ( | DtSimulationServices * | simManager, |
| DtLocalObjectManager * | |||
| ) |
Constructor.
|
virtual |
Destructor.
|
private |
Copy constructor - not implemented.
|
private |
Assignment operator - not implemented.
|
virtual |
Initializes the physical world for use. This includes the following:
|
virtual |
Reinitializes the physical world, and all it contains, to an initial state. This mainly affects the DtSimObject spatial sorting, vector obstruction manager, and the sensor signature manager, as they are all reset to initial state. This is intended to be called when a scenario is closed. Note that this function currently leaves the physical world in an inconsistent state, which is restored when a new terrain is loaded (new scenario is loaded or started).
|
virtual |
Resets system to initial state. Calls reinitialize() and deletes myParameters.
|
virtual |
Calls createParameters() to get a new instance of the parameter object, and calls getSelf() on the parameters to load them from the file. Assigns the newly loaded parameters to myParameters and processes parameters specified.
|
virtual |
Called from loadParametersFromFile, will create a parameters list and merge any contents from the supplied file into it. Use this routine to load multiple physical world files. Called from loadParametersFromFile. If this routine is used, and not loadParametersFromFile, make sure to call processParameters() after all files are loaded.
|
virtual |
Initializes managers with parameters loaded from files.
|
inline |
Returns the value of the last file loaded.
References myPhysicalWorldFile.
|
virtual |
|
virtual |
Callbacks invoked just before new parameters are loaded. The callback function signature is callback(void* usr)
|
virtual |
Callbacks invoked just before new parameters are loaded. The callback function signature is callback(void* usr)
|
virtual |
Callbacks invoked just after new parameters are loaded. The callback function signature is callback(void* usr)
|
virtual |
Callbacks invoked just after new parameters are loaded. The callback function signature is callback(void* usr)
|
virtual |
This function returns whether or not the physical world instance is in a valid state to perform its operations or not. It should be called before all non-initialization or core-state change functions, unless you are sure its state is valid and unchanged or are changing the state explicitly yourself. (For instance setting the terrain database or object manager)
Currently, the physical world is in a valid state when it can perform all of its operations. This primarily means that:
|
virtual |
The tick function is responsible for updating the state of the physical world to account for anything that changed in the last tick. For instance, if spatial DtSimObjects are spatially sorted, this will update the sorting to account for any changes to the spatial DtSimObjects - removals or additions - in addition to general location/state changes.
|
virtual |
Returns a pointer to the Coordinate_System used by the current terrain database.
|
virtual |
Returns a pointer to the Coordinate_System used by the current terrain database.
|
virtual |
Converts the specified vector from geocentric to database coordinates.
|
virtual |
Converts the specified rotation matrix from geocentric to database coordinates.
|
virtual |
Converts the specified vector and rotation matrix from geocentric to database coordinates.
|
virtual |
Converts the specified extent from geocentric to database coordinates.
|
virtual |
Converts the specified vector from database to geocentric coordinates.
|
virtual |
Converts the specified rotation matrix from database to geocentric coordinates.
|
virtual |
Converts the specified vector and rotation matrix from database to geocentric coordinates.
|
virtual |
Converts the specified extent from database to geocentric coordinates.
|
virtual |
Converts the specified position from database to geodetic coordinates.
|
virtual |
Converts the specified position from database to geodetic coordinates. The component order in the output vector is (lon, lat, alt)
|
virtual |
Converts the specified extent from database to geodetic coordinates.
|
virtual |
Converts the specified position from geodetic to database coordinates.
|
virtual |
Converts the specified position from geodetic to database coordinates.
|
virtual |
Converts the specified position from geodetic to database coordinates. The component order in the input vector must be (lon, lat, alt)
|
virtual |
Creates a rotation matrix for going between topographic and database coordinates, at a given database position.
|
virtual |
Creates a rotation matrices for going between database and topographic coordinates, at a given database position.
Calculates and returns the down vector, representing gravity, at the specified database location. Unlike the above version, this will version will return a default 0,0,-1 vector if there is no way to calculate the down vector (almost always no terrain database loaded)
|
virtual |
Queries the World Magnetic Model to get the magnetic north direction at a location returns the angle between true north and magnetic north in radians.
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
This function gets the ground surface underneath the water at the given location. It provides the elevation, the surface structure for the ground, the height of the water surface, and a flag indicating whether the surface is actually under water (vs. above water level).
| Output | |
| groundHeight | The height of the [underwater] ground at the location. If no terrain intersection was found, but there is global water at the location, this is a made-up height using the water height and the default water depth. |
| groundSurface | The surface (structure) of the ground. If no ground was found, but there is global water, this is filled in as Ground/unspecified soil. |
| groundNormal | The normal vector of the ground surface, in local database coordinates. |
| waterHeight | The height of the water surface at the location. The water height could come from a water polygon, an unspecified polygon, or even a global sea level value for the database. If there is only ground found, or ground above water, topSurfaceMedium == Ground, and this parameter value is undefined. |
| topSurfaceMedium | Returns the medium of the top surface, which will be either Ground, WaterSurface, or UnspecifiedMedium. If it is Ground, then the ground surface data will be in the ground height, surface, and normal parameters, and waterHeight will be invalid. If it is UnspecifiedMedium, it was the only surface found, and could be either water or ground; the calling code must determine what to do with it. The ground parameters will be set with a synthesized sea-floor surface as if the top surface was water, but waterHeight will be set to the height of the unspecified surface. If it is WaterSurface, then waterHeight will be set to the water surface height, and the ground parameters will be set to the values for the sea floor (either another surface, or a synthesized sea floor). |
| dataAvailable | Please see "Synchronous and asynchronous calls with paged terrains" in the class documentation for DtTerrainInterface for information on how to specify that this function be blocking or non-blocking. If the terrain data is not yet paged in, dataAvailable will be set to false. |
| overrideBlockingAssert | when set to true this parameter will prevent an assertion from being thrown when the terrain implementation has myAssertOnBlockingTerrainCalls set to true. This should only be done when the call is being made from outside the main simulation thread and a blocking call would not cause a a problem. |
| true | Data from the terrain database is available, i.e. paged in. |
| false | Data from the database has not been paged in yet. |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
Location is specified as a DtPoint in database coordinates.
|
virtual |
Same as above closestTerrainLocation, but accepts location in lat/lon. vectorDatarecord and vectorIntersectionRecord are ignored.
|
virtual |
Same as above closestTerrainLocation, but accepts location as a vector.
|
virtual |
Same as above closestTerrainLocation, but returns the entire intersection record, and not just the intersection point.
|
virtual |
Temp call as test until all surface calls are turned over to use vector features.
|
virtual |
Same as above closestTerrainLocation, but accepts location in lat/lon. vectorDatarecord and vectorIntersectionRecord are ignored.
|
virtual |
Same as above closestTerrainLocation, but accepts location as a vector.
|
virtual |
Returns true if a there is a terrain intersection at the given local position. The algorithm checks for intersections along a chord in the direction of gravity at that location (from halfHeightOfChord above to halfHeightOfChord below localPosition).
| Input | |
| curPostion | position to test |
| ignoreWater | if set to true, advances through list of intersection returned until first DtSurface that is not a water surface is found. |
| Output | |
| intersection | the point of intersection, left unchanged if dataAvailable is set to false. |
| dataAvailable | Please see "Synchronous and asynchronous calls with paged terrains" in the class documentation for DtTerrainInterface for information on how to specify that this function be blocking or non-blocking. If the terrain data is not yet paged in, dataAvailable will be set to false. |
| overrideBlockingAssert | when set to true this parameter will prevent an assertion from being thrown when the terrain implementation has myAssertOnBlockingTerrainCalls set to true. This should only be done when the call is being made from outside the main simulation thread and a blocking call would not cause a a problem. |
| true | a terrain intersection was found |
| false | if there is no terrain instersection at the location; OR there is no data available at the location. The latter case is not relevant if dataAvailable was not provided. |
|
virtual |
Intersect calls which do not use down vector modification Calculates the first terrain intersection point along a chord given in Database Coordinates.
| Input | |
| chord | the chord to test |
| Output | |
| intersectionPoint | location of the intersection or left unchanged if there's no intersection or the data is not yet available (see dataAvailable). |
| intersectionTime | time of the intersection along the input chord or left unchanged if there's no intersection or the data is not yet available (see dataAvailable). |
| record | |
| intersectionRecord | |
| dataAvailable | Please see "Synchronous and asynchronous calls with paged terrains" in the class documentation for DtTerrainInterface for information on how to specify that this function be blocking or non-blocking. If the terrain data is not yet paged in, dataAvailable will be set to false. |
| overrideBlockingAssert | when set to true this parameter will prevent an assertion from being thrown when the terrain implementation has myAssertOnBlockingTerrainCalls set to true. This should only be done when the call is being made from outside the main simulation thread and a blocking call would not cause a a problem. |
| true | a terrain intersection was found |
| false | if there is no terrain instersection at the location; OR there is no data available at the location. The latter case is not relevant if dataAvailable was not provided. |
|
virtual |
Returns complete intersection information about the first terrain intersection point along a chord given in Database Coordinates. The irtFlag value specifies which data should be calculated and returned for each intersection point.
| Input | |
| chord | the chord to test |
| irtFlag | specifies which data should be calculated and returned for each intersection point |
| Output | |
| record | the result of the terrain intersection |
| vectorDataRecord | |
| vectorIntersectionRecord | |
| dataAvailable | Please see "Synchronous and asynchronous calls with paged terrains" in the class documentation for DtTerrainInterface for information on how to specify that this function be blocking or non-blocking. If the terrain data is not yet paged in, dataAvailable will be set to false. |
| overrideBlockingAssert | when set to true this parameter will prevent an assertion from being thrown when the terrain implementation has myAssertOnBlockingTerrainCalls set to true. This should only be done when the call is being made from outside the main simulation thread and a blocking call would not cause a a problem. |
| true | a terrain intersection was found |
| false | if there is no terrain instersection at the location; OR there is no data available at the location. The latter case is not relevant if dataAvailable was not provided. |
|
virtual |
Computes the list of all intersections of a chord (in Database Coordinates) with the terrain database.
| Input | |
| chord | the chord to test |
| irtFlag | specifies which data should be calculated and returned for each intersection point |
| Output | |
| intList | the result of the terrain intersection |
| dataAvailable | Please see Synchronous and Asynchronous Calls with Paged Terrains for information on how to specify that this function be blocking or non-blocking. If the data is not yet paged in, dataAvailable will be set to false and intList will not reflect any terrain intersections |
| overrideBlockingAssert | when set to true this parameter will prevent an assertion from being thrown when the terrain implementation has myAssertOnBlockingTerrainCalls set to true. This should only be done when the call is being made from outside the main simulation thread and a blocking call would not cause a a problem. |
| true | if the chord intersects the terrain |
| false | if dataAvailable was specified and returns true, then the chord does not intersect the terrain. Otherwise false indicates that the data is not yet available. |
|
virtual |
Put the passed point "offset" meters from the ground. Passes DtPoint.
| Input | |
| databaseCoord | location to ground clamp |
| offset | height above the ground |
| Output | |
| databaseCoord | ground clamped output |
| dataAvailable | If specified, this parameter prevents the terrain intersection call from blocking if the terrain data is not yet available. In that case, dataAvailable will be set to false and offset will be added to databaseCoord without checking the terrain. |
| overrideBlockingAssert | when set to true this parameter will prevent an assertion from being thrown when the terrain implementation has myAssertOnBlockingTerrainCalls set to true. This should only be done when the call is being made from outside the main simulation thread and a blocking call would not cause a a problem. |
|
virtual |
put the passed point "offset" meters from the ground. Passes a DtVector.
| Input | |
| databaseCoord | location to ground clamp |
| offset | height above the ground |
| Output | |
| databaseCoord | ground clamped output |
| dataAvailable | If specified, this parameter prevents the terrain intersection call from blocking if the terrain data is not yet available. In that case, dataAvailable will be set to false and offset will be added to databaseCoord without checking the terrain. |
| overrideBlockingAssert | when set to true this parameter will prevent an assertion from being thrown when the terrain implementation has myAssertOnBlockingTerrainCalls set to true. This should only be done when the call is being made from outside the main simulation thread and a blocking call would not cause a a problem. |
|
static |
Request/return sensor domains.
|
virtual |
Request/return sensor domains.
|
virtual |
|
virtual |
|
virtual |
Sets the terrain database.
|
virtual |
Sets the environmental state manager.
|
virtual |
Sets the environmental state manager.
|
virtual |
Sets the environmental state manager.
| bool DtPhysicalWorld::getVrfObjects | ( | const DtExtent & | extent, |
| DtVrfConstObjectUniqueContainer & | objects | ||
| ) | const |
Used to get the relevant DtSimObjects from the object manager. If a primitive is specified, the function returns a container of DtSimObjects that is guaranteed to contain at least all the DtSimObjects that intersect the specified geometric primitive.
The extent and chord should be in local coordinates.
| bool DtPhysicalWorld::getVrfObjects | ( | const DtVrfObjectPredicate & | predicate, |
| const DtExtent & | extent, | ||
| DtVrfConstObjectUniqueContainer & | objects | ||
| ) | const |
Used to get the relevant DtSimObjects from the object manager. If a primitive is specified, the function returns a container of DtSimObjects that is guaranteed to contain at least all the DtSimObjects that intersect the specified geometric primitive.
The extent and chord should be in local coordinates.
| bool DtPhysicalWorld::getVrfObjects | ( | const DtChord & | chord, |
| std::vector< const DtSimObject * > & | objects | ||
| ) | const |
Used to get the relevant DtSimObjects from the object manager. If a primitive is specified, the function returns a container of DtSimObjects that is guaranteed to contain at least all the DtSimObjects that intersect the specified geometric primitive.
The extent and chord should be in local coordinates.
| bool DtPhysicalWorld::getVrfObjects | ( | const DtVrfObjectPredicate & | predicate, |
| const DtChord & | chord, | ||
| std::vector< const DtSimObject * > & | objects | ||
| ) | const |
Used to get the relevant DtSimObjects from the object manager. If a primitive is specified, the function returns a container of DtSimObjects that is guaranteed to contain at least all the DtSimObjects that intersect the specified geometric primitive.
The extent and chord should be in local coordinates.
| void DtPhysicalWorld::visitVrfObjects | ( | const DtExtent & | extent, |
| class DtSpatialSelectionFunctor & | callback | ||
| ) | const |
These functions call the specified functor for every object intersecting the requested region (whether chord or extent). The functor should return false while additional processing should be done, and true if processing is complete and visitVrfObjects() should return. Note that processing is not guaranteed to stop immediately when the functor returns true; it is only a recommendation that processing can stop at any time.
The extent and chord should use local coordinates.
| void DtPhysicalWorld::visitVrfObjects | ( | const DtChord & | chord, |
| class DtSpatialSelectionFunctor & | callback | ||
| ) | const |
These functions call the specified functor for every object intersecting the requested region (whether chord or extent). The functor should return false while additional processing should be done, and true if processing is complete and visitVrfObjects() should return. Note that processing is not guaranteed to stop immediately when the functor returns true; it is only a recommendation that processing can stop at any time.
The extent and chord should use local coordinates.
|
virtual |
|
virtual |
Gets the list of DtSimObjects managed, using the spatial organization predicate to select the DtSimObjects. Used when initializing the spatial organization of DtSimObjects.
|
virtual |
|
virtual |
Analyzes the objects to be spatially sorted, and determines appropriate numbers of subdivisions in each dimension. If the user has specified the resolution to use, then make a note of it so that the specified settings are not overwritten by calculated values.
|
virtual |
This function should be overridden to allow for a more selective spatial organization if desired.
|
static |
Calls the virtual processSpatialOrganizationObjectFilterFcn() on the instance pointed to by usr.
|
virtual |
|
static |
SpatialSubdivision configuration message callback functions.
|
static |
SpatialSubdivision configuration message callback functions.
|
virtual |
Process requests to determine and requests to set the terrain databases spatial subdivision settings.
|
virtual |
Process requests to determine and requests to set the terrain databases spatial subdivision settings.
|
virtual |
Whether or not to spatially organize the DtSimObjects.
|
virtual |
Whether or not to spatially organize the DtSimObjects.
|
virtual |
Specifies whether or not the user has specified the spatial manager resolution. If not, the default calculation values are used.
|
virtual |
Specifies whether or not the user has specified the spatial manager resolution. If not, the default calculation values are used.
Accesses the spatial subdivision resolution.
Accesses the spatial subdivision resolution.
Accesses the spatial subdivision resolution.
|
virtual |
Sets the spatial subdivision resolution. Note that this value will be overridden each tick by calcSpatialMgrResolution unless setSpatialMgrResolutionUserSpecified(true) is called.
|
virtual |
Sets the spatial subdivision resolution. Note that this value will be overridden each tick by calcSpatialMgrResolution unless setSpatialMgrResolutionUserSpecified(true) is called.
|
virtual |
Sets the spatial subdivision resolution. Note that this value will be overridden each tick by calcSpatialMgrResolution unless setSpatialMgrResolutionUserSpecified(true) is called.
|
virtual |
Returns the DtSensorSignatureManager owned by this physical world. This provides access to querying apparent signatures of objects in the world.
|
virtual |
Returns the DtSensorSignatureManager owned by this physical world. This provides access to querying apparent signatures of objects in the world.
|
virtual |
Accessors for the Simulation Services.
|
virtual |
Accessors for the Simulation Services.
|
virtual |
|
virtual |
|
virtual |
|
virtual |
Returns the feature set which contains features maintained by the dynamic features controller.
|
virtual |
Returns the parameters for this DtPhysicalWorld.
|
virtual |
Returns the parameters for this DtPhysicalWorld.
|
virtual |
Determines if targetObject is visible from the databaseViewingPoint (without allowing the viewingObject to block the LOS). The specific target location is determined by localLineOfSightTestLocation().
Uses any LOS tests configured in myLineOfSightTestsToPerform. The default is to check terrain, entities, and features (see data/simulationModelSets/default/physicalWorldParams.mtl, line-of-sight-tests).
Entities that can block LOS are defined in canBlockLineOfSight().
ViewingObject and targetObject will not block line of sight. (i.e. the viewer should not be in his own way). Assuming a terrain LOS test is performed, terrainDataAvailable will be set to false if the terrain is still being paged in. If it is not specified, this will be a blocking call (which should usually not be done from a tick function). If terrain is not available, the function will return false, but really the result is undefined.
The featureQueryName parameter determines which named query in featureconfig.txt to use. The default value will use whatever query name is defined in terrainInterfaceConfig.mtl. If an empty string is passed in, no features will be tested.
|
virtual |
Determines if target location is visible from the viewingObject (specifically, from the databaseViewingPoint).
Uses any LOS tests configured in myLineOfSightTestsToPerform. The default is to check terrain, features, and entities (see data/simulationModelSets/default/physicalWorldParams.mtl, line-of-sight-tests).
Entities that can block LOS are defined in canBlockLineOfSight().
ViewingObject and targetObject will not block line of sight. (i.e. the viewer should not be in his own way). Assuming a terrain LOS test is performed, terrainDataAvailable will be set to false if the terrain is still being paged in. If it is not specified, this will be a blocking call (which should usually not be done from a tick function).
|
virtual |
Determines if targetObject is visible from the databaseViewingPoint. The specific target location is determined by localLineOfSightTestLocation().
Uses any LOS tests configured in myLineOfSightTestsToPerform. The default is to check terrain, features, and entities (see data/simulationModelSets/default/physicalWorldParams.mtl, line-of-sight-tests).
Entities that can block LOS are defined in canBlockLineOfSight(). TargetObject will not block line of sight.
Assuming a terrain LOS test is performed, terrainDataAvailable will be set to false if the terrain is still being paged in. If it is not specified, this will be a blocking call (which should generally not be done from a tick function).
|
virtual |
Determines if the given target point can be seen from the viewing point. This test checks terrain and features, but not entities: It removes the "Entity" LOS test from the set to test before making the check, then restores "Entity" to the set afterwards so that the other checkLineOfSight function work normally.
Assuming a terrain LOS test is performed, terrainDataAvailable will be set to false if the terrain is still being paged in. If it is not specified, this will be a blocking call (which should generally not be done from a tick function).
|
virtual |
Similar to the checkLineOfFire functions returns intersection information if there is an intersection. This combination of parameters is useful when tracing the flight of a munition to its maximum range to see what it hits, but the firing and target entities are ignored. Ignoring the target entity is useful if other P(hit) calculations have already determined that the round missed its intended target.
The return values are in the last two parameters. If these are both null, then the function is more efficient because it stops checking for blockage when it finds an obstruction, even if it is not the first thing hit.
| normIntersectDistance | A number from 0-1 indicating where along the chord from viewing point to target point the intersection occurs. |
| intersectObject | A pointer to the object that is intersected, if an object blocks line of fire. |
| ignoredForceType | A pointer to a DtForceType value which the LOS check should ignore entities with this type. |
|
virtual |
See other checkLineOfFire(). This version omits the target object.
|
virtual |
See other checkLineOfFire(). This version omits the object parameters.
|
virtual |
Similar to the checkLineOfSightWithoutObjects The return values are in the last two parameters. If these are both null, then the function is more efficient because it stops checking for blockage when it finds an obstruction, even if it is not the first thing hit.
| normIntersectDistance | A number from 0-1 indicating where along the chord from viewing point to target point the intersection occurs. |
| intersectObject | A pointer to the object that is intersected, if an object blocks line of fire. |
|
virtual |
|
virtual |
Returns the a factor representing the distortion caused by crossing thermocline layers from local locations startPoint and endPoint.
|
virtual |
Runs all the tests in the specified list.
|
inline |
| const DtChord DtPhysicalWorld::createWorldIntersectionChord | ( | const DtVector & | databaseLocation | ) | const |
Creates a very large chord in the up/down direction (of gravity) at the specified database location.
|
virtual |
Adds a particular test to the master container of all LOS tests. Does NOT add the test to the container of tests to run.
|
virtual |
Returns the line of sight test for the given key.
|
virtual |
Removes a particular key/test pair from the master container of all LOS tests. Also removes the test from the container of tests to perform.
|
protectedvirtual |
|
protectedvirtual |
Routines for setting line of sight test order. The default call will set the order to be Polygon, Entity, Feature. The setLineOfSightTestOrder() call will order the tests according to the supplied string. In order to add more tests, call the addLineOfSightTest method (with the appropriate test function as defined above as DtLineOfSightTest)
|
protectedvirtual |
|
protectedvirtual |
Adds the test to the container of tests to perform, at the end. The test is only added once, so if it is added again, it is moved to the end of the container. This only adds a test that is associated with the specified LOS test key in the master test container.
|
protectedvirtual |
Removes the test from the container of tests to perform. This does not remove the test from the master container of all LOS tests that can be run.
|
protectedvirtual |
Removes the test from the container of tests to perform. This does not remove the test from the master container of all LOS tests that can be run.
|
staticprotected |
Used by checkLineOfSight to determine which physical elements can block visibility. Default implementation includes individual platforms, munitions, lifeforms, and cultural features.
| usr | Is not currently used. |
|
protectedvirtual |
|
protectedvirtual |
LOS test functions that can be used in checkLOS, referenced by test keys (see performTest() ). Update intersectionTime, intersectionPoint, intersectingObject in LOS Check Params if those members are non-NULL. If data is not available, return false (LOS blocked) and set terrainDataAvailable to false. Provide reasonable defaults for intersectionTime and intersectionPoint (if pointers to them are valid in losCheckParams) when data is not available, e.g. 1.0 for time.
|
protectedvirtual |
|
virtual |
Creates a chord from the start point to the end point and uses the spatialVrfObjectManager to visitVrfObjects that are in spatial divisions along the chord, checking each object found using intersectsVrfObject(). If the end point is supplied (non-zero) then that will be used, else the secondary vrf object's current location is used. If an object intersects and the intersectedObject is specified returns the position along the chord and the intersecting object.
|
virtual |
Creates a chord from the points and uses the spatialVrfObjectManager to visitVrfObjects that are in spatial divisions along the chord, checking each object found using intersectsVrfObject(). If an object intersects and the intersectedObject is specified returns the intersecting object in the given pointer.
|
virtual |
|
virtual |
|
virtual |
Ticks the dynamic terrain manager either as a job or directly.
|
protected |
|
protectedvirtual |
Accessors for the spatial DtLocalObjectManager.
|
protectedvirtual |
|
protectedvirtual |
|
protectedvirtual |
|
protectedvirtual |
|
protectedvirtual |
Tells mySpatialVrfObjectManager to remove given object.
| vrfObject | Pointer to the object about to be removed from the object manager. May be any type of DtLocalObject (entity, aggregate, control object). |
|
protectedvirtual |
Queries local DtLocalObject instances for their desired terrain preload and passes the information to the DtTerrainInterface.
| VRF4API_METHOD bool DtPhysicalWorld::checkLineOfFire | ( | const DtLocalObject & | viewingObject, |
| const DtVector & | databaseViewingPoint, | ||
| const DtLocalObject & | targetObject, | ||
| const DtVector & | databaseTargetPoint, | ||
| bool * | terrainDataAvailable = 0, |
||
| double * | normIntersectDistance = 0, |
||
| const DtSimObject ** | intersectObject = 0, |
||
| DtVector * | intersectingPoint = 0, |
||
| int * | ignoredForceType = 0 |
||
| ) | const |
These are backwards compatible methods that can be used if you define ALLOW_VRF4API in your header file.
| VRF4API_METHOD bool DtPhysicalWorld::checkLineOfFire | ( | const DtLocalObject & | viewingObject, |
| const DtVector & | databaseViewingPoint, | ||
| const DtVector & | databaseTargetPoint, | ||
| bool * | terrainDataAvailable = 0, |
||
| double * | normIntersectDistance = 0, |
||
| const DtSimObject ** | intersectionObject = 0, |
||
| DtVector * | intersectingPoint = 0, |
||
| int * | ignoredForceType = 0 |
||
| ) | const |
These are backwards compatible methods that can be used if you define ALLOW_VRF4API in your header file.
| VRF4API_METHOD DtSimulationServices* DtPhysicalWorld::simManager | ( | ) |
These are backwards compatible methods that can be used if you define ALLOW_VRF4API in your header file.
| VRF4API_METHOD const DtSimulationServices* DtPhysicalWorld::simManager | ( | ) | const |
These are backwards compatible methods that can be used if you define ALLOW_VRF4API in your header file.
| VRF4API_METHOD DtSimObjectManager* DtPhysicalWorld::objectManager | ( | ) |
These are backwards compatible methods that can be used if you define ALLOW_VRF4API in your header file.
|
friend |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
Not owned, just used for reference.
|
protected |
|
protected |
Parameters for this physical world.
|
protected |
|
protected |
|
protected |
|
protected |
Referenced by physicalWorldFile().
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |