![]() |
VR-Forces Development_Version Class Documentation
|
The DtPhysicalWorld is the primary interface to and manager of all of the "physical" aspects of the simulated world. More...
Public Types | |
| typedef std::list < DtVrfLineOfSightFunctorSP > | DtLineOfSightTestContainer |
Public Member Functions | |
| DtPhysicalWorld (DtSimManager *simManager) | |
| Constructor. | |
| virtual | ~DtPhysicalWorld () |
| Destructor. | |
| virtual bool | initialize () |
| Initializes the physical world for use. | |
| virtual bool | reinitialize () |
| Reinitializes the physical world, and all it contains, to an initial state. | |
| virtual bool | reset () |
| Resets system to initial state. Calls reinitialize() and deletes myParameters. | |
| virtual bool | loadParametersFromFile (const DtFilename &filename) |
| Calls createParameters() to get a new instance of the parameter object, and calls getSelf() on the parameters to load them from the file. | |
| virtual bool | loadPhysicalWorldFile (const DtFilename &filename) |
| Called from loadParametersFromFile, will create a parameters list and merge any contents from the supplied file into it. | |
| virtual void | processParameters () |
| Intializes managers with parameters loaded from files. | |
| const DtFilename & | physicalWorldFile () const |
| Returns the value of the last file loaded. | |
| virtual bool | parametersLoaded () const |
| virtual bool | isValidState () const |
| This function returns whether or not the physical world instance is in a valid state to perform its operations or not. | |
| virtual void | tick () |
| The tick function is responsible for updating the state of the physical world to account for anything that changed in the last tick. | |
| virtual Coordinate_System * | coordinateSystem () |
| ! COORDINATE SYSTEM OPERATIONS | |
| virtual const Coordinate_System * | coordinateSystem () const |
| virtual void | geocentricToDatabase (const DtVector &in, DtVector &out) const |
| Converts the specified vector from geocentric to database coordinates. | |
| virtual void | geocentricToDatabase (const DtDcm &in, DtDcm &out) const |
| Converts the specified rotation matrix from geocentric to database coordinates. | |
| virtual void | geocentricToDatabase (const DtVector &vIn, const DtDcm &dIn, DtVector &vOut, DtDcm &dOut) const |
| Converts the specified vector and rotation matrix from geocentric to database coordinates. | |
| virtual void | geocentricToDatabase (const DtExtent &in, DtExtent &out) const |
| Converts the specified extent from geocentric to database coordinates. | |
| virtual void | databaseToGeocentric (const DtVector &in, DtVector &out) const |
| Converts the specified vector from database to geocentric coordinates. | |
| virtual void | databaseToGeocentric (const DtDcm &in, DtDcm &out) const |
| Converts the specified rotation matrix from database to geocentric coordinates. | |
| virtual void | databaseToGeocentric (const DtVector &vIn, const DtDcm &dIn, DtVector &vOut, DtDcm &dOut) const |
| Converts the specified vector and rotation matrix from database to geocentric coordinates. | |
| virtual void | databaseToGeocentric (const DtExtent &in, DtExtent &out) const |
| Converts the specified extent from database to geocentric coordinates. | |
| virtual void | databaseToGeodetic (const DtVector &databasePosition, DtGeodeticCoord &geodeticPosition) const |
| Converts the specified position from database to geodetic coordinates. | |
| virtual void | databaseToGeodetic (const DtVector &databasePosition, DtVector &geodeticPosition) const |
| Converts the specified position from database to geodetic coordinates. | |
| virtual void | databaseToGeodetic (const DtExtent &extent, DtExtent &destExtent) const |
| Converts the specified extent from database to geodetic coordinates. | |
| virtual void | geodeticToDatabase (const DtExtent &extent, DtExtent &destExtent) const |
| Converts the specified position from geodetic to database coordinates. | |
| virtual void | geodeticToDatabase (const DtGeodeticCoord &geodeticPosition, DtVector &databasePosition) const |
| Converts the specified position from geodetic to database coordinates. | |
| virtual void | geodeticToDatabase (const DtVector &geodeticPosition, DtVector &databasePosition) const |
| Converts the specified position from geodetic to database coordinates. | |
| virtual void | topoToDatabase (const DtVector &databasePosition, DtDcm &topoToDatabase) const |
| Creates a rotation matrix for going between topographic and database coordinates, at a given database position. | |
| virtual void | databaseToTopo (const DtVector &databasePosition, DtDcm &databaseToTopo) const |
| Creates a rotation matrices for going between database and topographic coordinates, at a given database position. | |
| virtual DtVector | down (const DtVector &databasePosition) const |
| Calculates and returns the down vector, representing gravity, at the specified database location. | |
| virtual bool | terrainHeightAndSurfaceBelow (const DtVector &databaseLocation, double &heightAtLocation, DtSurface &surfaceAtLocation, bool *dataAvailable=0, bool overrideBlockingAssert=false) const |
| This function is the same as terrainHeightAndSurface, but it looks below the input point rather than finding the highest surface at the xy of the input point. | |
| virtual bool | closestTerrainLocation (const DtPoint &databaseLocation, DtPoint &intersectionPoint, bool *dataAvailable=0, bool overrideBlockingAssert=false) const |
| Similar to the terrainHeight functions above. | |
| virtual bool | closestTerrainLocation (double lat, double lon, DtPoint &intersectionPoint, bool *dataAvailable=0, bool overrideBlockingAssert=false) const |
| Same as above closestTerrainLocation, but accepts location in lat/lon. | |
| virtual bool | closestTerrainLocation (const DtVector &databaseLocation, DtPoint &intersectionPoint, bool *dataAvailable=0, bool overrideBlockingAssert=false) const |
| Same as above closestTerrainLocation, but accepts location as a vector. | |
| virtual bool | closestTerrainLocation (const DtPoint &databaseLocation, DtChordIntersectionRecord &record, DtIntersectionRecord::DtIntersectionType irtFlag=DtIntersectionRecord::INT_ALL_DATA, bool *dataAvailable=0, bool overrideBlockingAssert=false) const |
| Same as above closestTerrainLocation, but returns the entire intersection record, and not just the intersection point. | |
| virtual bool | closestTerrainLocation (const DtPoint &databaseLocation, DtChordIntersectionRecord &record, const DtString &vectorFeatureLookup, DtIntersectionRecord::DtIntersectionType irtFlag=DtIntersectionRecord::INT_ALL_DATA, bool *dataAvailable=0, bool overrideBlockingAssert=false) const |
| Temp call as test until all surface calls are turned over to use vector features. | |
| virtual bool | closestTerrainLocation (double lat, double lon, DtChordIntersectionRecord &record, DtIntersectionRecord::DtIntersectionType irtFlag=DtIntersectionRecord::INT_ALL_DATA, bool *dataAvailable=0, bool overrideBlockingAssert=false) const |
| Same as above closestTerrainLocation, but accepts location in lat/lon. | |
| virtual bool | closestTerrainLocation (const DtVector &databaseLocation, DtChordIntersectionRecord &record, DtIntersectionRecord::DtIntersectionType irtFlag=DtIntersectionRecord::INT_ALL_DATA, bool *dataAvailable=0, bool overrideBlockingAssert=false) const |
| Same as above closestTerrainLocation, but accepts location as a vector. | |
| virtual bool | closestTerrainLocation (const DtVector &curPosition, DtVector &intersection, bool ignoreWater, bool *dataAvailable=0, bool overrideBlockingAssert=false) const |
| Returns true if a there is a terrain intersection at the given local position. | |
| virtual bool | intersect (const DtChord &chord, DtPoint &intersectionPoint, double &intersectionTime, bool *dataAvailable=0, bool overrideBlockingAssert=false) const |
| Intersect calls which do not use down vector modification Calculates the first terrain intersection point along a chord given in Database Coordinates. | |
| virtual bool | intersect (const DtChord &chord, DtChordIntersectionRecord &record, DtIntersectionRecord::DtIntersectionType irtFlag=DtIntersectionRecord::INT_ALL_DATA, bool *dataAvailable=0, bool overrideBlockingAssert=false) const |
| Returns complete intersection information about the first terrain intersection point along a chord given in Database Coordinates. | |
| virtual bool | allIntersectsAlongChord (const DtChord &chord, DtChordIntersectRecordList &intList, DtIntersectionRecord::DtIntersectionType irtFlag=DtIntersectionRecord::INT_ALL_DATA, bool *dataAvailable=0, bool overrideBlockingAssert=false) const |
| Computes the list of all intersections of a chord (in Database Coordinates) with the terrain database. | |
| virtual void | groundClamp (DtPoint &databaseCoord, float const offset=0, bool *dataAvailable=0, bool overrideBlockingAssert=false) const |
| Put the passed point "offset" meters from the ground. | |
| virtual void | groundClamp (DtVector &databaseCoord, float const offset=0, bool *dataAvailable=0, bool overrideBlockingAssert=false) const |
| put the passed point "offset" meters from the ground. | |
| virtual void | getVrfObjectsAlongChord (const DtVector &databaseStart, const DtVector &databaseEnd, std::list< const DtVrfObject * > &orderedList) const |
| virtual DtManagedObjectListConstPtr | getSpatiallyManagedVrfObjectList () |
| Gets the list of DtVrfObjects managed, using the spatial organization predicate to select the DtVrfObjects. | |
| virtual bool | initializeSpatialVrfObjectOrganization () |
| virtual void | calcSpatialMgrResolution (const DtManagedObjectListConstPtr &vrfObjList) |
| Analyzes the objects to be spatially sorted, and determines appropriate numbers of subdivisions in each dimension. | |
| virtual DtFilterFunctionPredicate | getSpatialOrganizationPredicate () |
| virtual bool | processSpatialOrganizationObjectFilterFcn (const DtVrfObject *obj) |
| virtual void | sendSensorDomains () |
| virtual void | processQuerySpatialSubdivisionConfiguration (DtSimMessage *msg) |
| Process requests to determine and requests to set the terrain databases spatial subdivision settings. | |
| virtual void | processSetSpatialSubdivisionConfiguration (DtSimMessage *msg) |
| virtual bool | useVrfObjectSpatialSub () const |
| virtual void | setUseVrfObjectSpatialSub (bool yesOrNo) |
| virtual bool | isSpatialMgrResolutionUserSpecified () const |
| Specifies whether or not the user has specified the spatial manager resolution. | |
| virtual void | setSpatialMgrResolutionUserSpecified (bool yesOrNo) |
| virtual DtTerrainInterface * | terrainInterface () |
| virtual const DtTerrainInterface * | terrainInterface () const |
| virtual void | setTerrainInterface (DtTerrainInterface *newTerrainDatabase) |
| Sets the terrain database. | |
| virtual DtSimManager * | simManager () |
| virtual const DtSimManager * | simManager () const |
| virtual void | setSimManager (DtSimManager *newSimManager) |
| virtual DtVrfObjectManager * | objectManager () |
| virtual const DtVrfObjectManager * | objectManager () const |
| virtual void | setVrfObjectManager (DtVrfObjectManager *newObjectMgr) |
| virtual DtEnvironmentalStateManager * | environmentalStateManager () |
| virtual const DtEnvironmentalStateManager * | environmentalStateManager () const |
| virtual void | setEnvironmentalStateManager (DtEnvironmentalStateManager *manager) |
| virtual MAKVRinTerra::DtDynamicFeatureSet * | dynamicObjectFeatures () const |
| Returns the feature set which contains features maintained by the dynamic features controller. | |
| virtual DtPhysicalWorldParams * | parameters () |
| virtual const DtPhysicalWorldParams * | parameters () const |
| virtual DtSensorSignatureManager * | sensorSignatureManager () |
| virtual const DtSensorSignatureManager * | sensorSignatureManager () const |
| virtual bool | checkLineOfSight (const DtVrfObject &viewingObject, const DtVector &databaseViewingPoint, const DtVrfObject &targetObject, bool *terrainDataAvailable=0, const DtString &featureQueryName="default", DtVector *intersectionPoint=0) const |
| Determines if targetObject is visible from the databaseViewingPoint (without allowing the viewingObject to block the LOS). | |
| virtual bool | checkLineOfSight (const DtVrfObject &viewingObject, const DtVector &databaseViewingPoint, const DtVector &databaseTargetPoint, bool *terrainDataAvailable=0, const DtString &featureQueryName="default", DtVector *intersectionPoint=0) const |
| Determines if target location is visible from the viewingObject (specifically, from the databaseViewingPoint). | |
| virtual bool | checkLineOfSight (const DtVector &databaseViewingPoint, const DtVrfObject &targetObject, bool *terrainDataAvailable=0, const DtString &featureQueryName="default", DtVector *intersectionPoint=0) const |
| Determines if targetObject is visible from the databaseViewingPoint. | |
| virtual bool | checkLineOfSightWithoutObjects (const DtVector &databaseViewingPoint, const DtVector &databaseTargetPoint, bool *terrainDataAvailable=0, const DtString &featureQueryName="default", DtVector *intersectionPoint=0) |
| Determines if the given target point can be seen from the viewing point. | |
| virtual bool | checkLineOfFire (const DtVrfObject &viewingObject, const DtVector &databaseViewingPoint, const DtVrfObject &targetObject, const DtVector &databaseTargetPoint, bool *terrainDataAvailable=0, double *normIntersectDistance=0, DtVrfObject **intersectObject=0, DtVector *intersectingPoint=0) |
| Similar to the checkLineOfSight functions except uses MAK_LOF_OBSTACLE for the feature query, and the function returns intersection information if there is an intersection. | |
| virtual bool | checkLineOfFire (const DtVrfObject &viewingObject, const DtVector &databaseViewingPoint, const DtVector &databaseTargetPoint, bool *terrainDataAvailable=0, double *normIntersectDistance=0, DtVrfObject **intersectionObject=0, DtVector *intersectingPoint=0) |
| See other checkLineOfFire(). This version omits the target object. | |
| virtual bool | checkLineOfFire (const DtVector &databaseViewingPoint, const DtVector &databaseTargetPoint, bool *terrainDataAvailable=0, double *normIntersectDistance=0, DtVrfObject **intersectionObject=0, DtVector *intersectingPoint=0) |
| See other checkLineOfFire(). This version omits the object parameters. | |
| virtual bool | checkLineOfFireWithoutObjects (const DtVector &databaseViewingPoint, const DtVector &databaseTargetPoint, bool *terrainDataAvailable=0, double *normIntersectDistance=0, DtVrfObject **intersectionObject=0, DtVector *intersectingPoint=0) |
| Similar to the checkLineOfSightWithoutObjects function above except uses MAK_LOF_OBSTACLE for the feature query, and returns intersection information if there is an intersection. | |
| virtual void | expireDataLoadRequestsBeforeTime (const double &time) |
| virtual double | thermoclinePermeability (const DtPoint &startPoint, const DtPoint &endPoint) const |
| Returns the a factor representing the distortion caused by crossing thermocline layers from local locations startPoint and endPoint. | |
| virtual bool | checkLineOfSight (const DtLineOfSightTestContainer &losTests, DtVrfLineOfSightCheckParams &losCheckParams) const |
| Runs all the tests in the specified list. | |
| const DtLineOfSightTestContainer & | lineOfSightTestsToPerform () const |
| const DtChord | createWorldIntersectionChord (const DtVector &databaseLocation) const |
| Creates a very large chord in the up/down direction (of gravity) at the specified database location. | |
| virtual double | terrainHeight (const DtPoint &databaseLocation, bool *dataAvailable=0, bool overrideBlockingAssert=false) const |
| These physical world queries only interact with the terrain elements, Functions for finding the height of the terrain at a specified location. | |
| virtual double | terrainHeight (double lat, double lon, bool *dataAvailable=0, bool overrideBlockingAssert=false) const |
| These physical world queries only interact with the terrain elements, Functions for finding the height of the terrain at a specified location. | |
| virtual double | terrainHeight (const DtVector &databaseLocation, bool *dataAvailable=0, bool overrideBlockingAssert=false) const |
| These physical world queries only interact with the terrain elements, Functions for finding the height of the terrain at a specified location. | |
| virtual bool | terrainHeight (const DtPoint &databaseLocation, double &height, bool *dataAvailable=0, bool overrideBlockingAssert=false) const |
| Similar to above functions, but return a boolean signifying whether or not an intersection with the terrain was found or not. | |
| virtual bool | terrainHeight (double lat, double lon, double &height, bool *dataAvailable=0, bool overrideBlockingAssert=false) const |
| Similar to above functions, but return a boolean signifying whether or not an intersection with the terrain was found or not. | |
| virtual bool | terrainHeight (const DtVector &databaseLocation, double &height, bool *dataAvailable=0, bool overrideBlockingAssert=false) const |
| Similar to above functions, but return a boolean signifying whether or not an intersection with the terrain was found or not. | |
| virtual bool | terrainHeightAndSurface (const DtPoint &databaseLocation, double &height, DtSurface &surface, bool *dataAvailable=0, bool overrideBlockingAssert=false) const |
| Functions for determining the height of the terrain at a specified location, AND the soil type of the terrain polygon intersected at that location. | |
| virtual bool | terrainHeightAndSurface (double lat, double lon, double &height, DtSurface &surface, bool *dataAvailable=0, bool overrideBlockingAssert=false) const |
| Functions for determining the height of the terrain at a specified location, AND the soil type of the terrain polygon intersected at that location. | |
| virtual bool | terrainHeightAndSurface (const DtVector &databaseLocation, double &height, DtSurface &surface, bool *dataAvailable=0, bool overrideBlockingAssert=false) const |
| Functions for determining the height of the terrain at a specified location, AND the soil type of the terrain polygon intersected at that location. | |
| virtual bool | terrainHeightAndSurface (const DtVector &databaseLocation, double &heightAtLocation, DtChordIntersectionRecord &intersectionRec, DtIntersectionRecord::DtIntersectionType irtFlag=DtIntersectionRecord::INT_ALL_DATA, bool *dataAvailable=0, bool overrideBlockingAssert=false) const |
| Functions for determining the height of the terrain at a specified location, AND the soil type of the terrain polygon intersected at that location. | |
| virtual bool | terrainHeightUnderWater (const DtVector &databaseLocation, double &groundHeight, DtSurface &groundSurface, DtVector &groundNormal, double &waterHeight, DtSurface::DtMedium &topSurfaceMedium, bool *dataAvailable=0, bool overrideBlockingAssert=false) |
| This function gets the ground surface underneath the water at the given location. | |
| virtual bool | terrainSurface (const DtPoint &databaseLocation, DtSurface &surface, bool *dataAvailable=0, bool overrideBlockingAssert=false) const |
| Functions for determining the surface of the terrain at a specified location. | |
| virtual bool | terrainSurface (double lat, double lon, DtSurface &surface, bool *dataAvailable=0, bool overrideBlockingAssert=false) const |
| Functions for determining the surface of the terrain at a specified location. | |
| virtual bool | terrainSurface (const DtVector &databaseLocation, DtSurface &surface, bool *dataAvailable=0, bool overrideBlockingAssert=false) const |
| Functions for determining the surface of the terrain at a specified location. | |
| virtual DtSurface | terrainSurface (const DtPoint &databaseLocation, bool *dataAvailable=0, bool overrideBlockingAssert=false) const |
| Functions for determining the surface of the terrain at a specified location. | |
| virtual DtSurface | terrainSurface (double lat, double lon, bool *dataAvailable=0, bool overrideBlockingAssert=false) const |
| Functions for determining the surface of the terrain at a specified location. | |
| virtual DtSurface | terrainSurface (const DtVector &databaseLocation, bool *dataAvailable=0, bool overrideBlockingAssert=false) const |
| Functions for determining the surface of the terrain at a specified location. | |
| void | visitVrfObjects (const DtExtent &extent, class DtSpatialSelectionFunctor &callback) const |
| Functions that call the specified functor for every object intersecting the requested region (whether chord or extent). | |
| void | visitVrfObjects (const DtChord &chord, class DtSpatialSelectionFunctor &callback) const |
| Functions that call the specified functor for every object intersecting the requested region (whether chord or extent). | |
| 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) |
Static Public Member Functions | |
| static bool | spatialOrganizationObjectFilterFcn (const DtVrfObject *obj, void *usr) |
| Calls the virtual processSpatialOrganizationObjectFilterFcn() on the instance pointed to by usr. | |
| static void | querySpatialSubdivisionConfigurationCallback (DtSimMessage *msg, void *usr) |
| SpatialSubdivision configuration message callback functions. | |
| static void | setSpatialSubdivisionConfigurationCallback (DtSimMessage *msg, void *usr) |
| static void | requestSensorDomainsCallback (DtSimMessage *msg, void *usr) |
| Request/return sensor domains. | |
| static void | objectAboutToBeRemovedCb (DtVrfObject *vrfObject, void *usr) |
| Callback registered with DtVrfObjectManager for notification when objects are removed. | |
Protected Types | |
| typedef DtString | DtLosTestKey |
| The following typedefs, functions, and other code are all related to the Line Of Sight calculations. | |
| typedef std::map< DtLosTestKey, DtVrfLineOfSightFunctorSP > | DtKeyedLineOfSightTestContainer |
| typedef DtKeyedLineOfSightTestContainer::iterator | DtMasterLosTestIter |
| typedef DtKeyedLineOfSightTestContainer::const_iterator | DtMasterLosTestConstIter |
| typedef DtLineOfSightTestContainer::iterator | DtLosTestIter |
| typedef DtLineOfSightTestContainer::const_iterator | DtLosTestConstIter |
Protected Member Functions | |
| virtual void | addInitialLosChecks () |
| virtual void | setDefaultLineOfSightTestOrder (const DtRwNLengthStringVector &lineOfSightTestsAndOrder) |
| Routines for setting line of sight test order. | |
| virtual void | setLineOfSightTestOrder (const DtRwNLengthStringVector &lineOfSightTestsAndOrder) |
| virtual void | addLineOfSightTest (const DtLosTestKey &, DtVrfLineOfSightFunctorSP losTest) |
| Adds a particular test to the master container of all LOS tests. | |
| virtual void | removeLineOfSightTest (const DtLosTestKey &testKey) |
| Removes a particular key/test pair from the master container of all LOS tests. | |
| virtual void | performTest (const DtLosTestKey &testToRun) |
| Adds the test to the container of tests to perform, at the end. | |
| virtual void | doNotPerformTest (const DtLosTestKey &testToRun) |
| Removes the test from the container of tests to perform. | |
| virtual void | doNotPerformTest (DtVrfLineOfSightFunctorSP losTest) |
| Removes the test from the container of tests to perform. | |
| virtual DtVector | localLineOfSightTestLocation (const DtVrfObject &object) const |
| virtual bool | intersectVrfObjects (const DtVrfObject *const primaryVrfObject, const DtVector &databaseStartPoint, const DtVrfObject *const secondaryVrfObject, const DtVector &databaseEndPoint, double &interxTime, DtVrfObject **intersectedObject=0) const |
| 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(). | |
| virtual bool | intersectVrfObjects (const DtVrfObject *const primaryVrfObject, const DtVector &databaseStartPoint, const DtVector &databaseEndPoint, double &interxTime, DtVrfObject **intersectedObject=0) const |
| 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(). | |
| virtual bool | intersectsVrfObject (const DtVrfObject &vrfObjectToTest, const DtVector &databaseStartPoint, const DtVector &databaseEndPoint, double &distToIntersect) const |
| bool | testInvariant () const |
| virtual DtSpatialVrfObjectManagerInterface * | spatialVrfObjectManager () |
| Accessors for the spatial DtVrfObject manager. | |
| virtual const DtSpatialVrfObjectManagerInterface * | spatialVrfObjectManager () const |
| virtual void | setSpatialVrfObjectManager (DtSpatialVrfObjectManagerInterface *newSpatialVrfObjectMgr) |
| virtual DtPhysicalWorldParams * | createParameters () |
| virtual DtSensorSignatureManager * | createSensorSignatureManager () |
| virtual void | processObjectAboutToBeRemoved (DtVrfObject *vrfObject) |
| Tells mySpatialVrfObjectManager to remove given object. | |
| virtual void | performTerrainPreload () |
| Queries local DtVrfObject instances for their desired terrain preload and passes the information to the DtTerrainInterface. | |
| virtual bool | checkVrfObjectsForLOS (const DtVrfLineOfSightCheckParams &losCheckParams) const |
| LOS test functions that can be used in checkLOS, referenced by test keys (see performTest() ). | |
| virtual bool | checkFeaturesForLOS (const DtVrfLineOfSightCheckParams &losCheckParams) const |
| virtual bool | checkTerrainForLOS (const DtVrfLineOfSightCheckParams &losCheckParams) const |
Static Protected Member Functions | |
| static bool | canBlockLineOfSight (const DtVrfObject *object, void *usr) |
| Used by checkLineOfSight to determine which physical elements can block visibility. | |
Private Member Functions | |
| DtPhysicalWorld (const DtPhysicalWorld &orig) | |
| Copy constructor - not implemented. | |
| DtPhysicalWorld & | operator= (const DtPhysicalWorld &orig) |
| Assignment operator - not implemented. | |
Friends | |
| class | IntersectVrfObjectFunctor |
| typedef boost::unordered_set < DtVrfObject * > | DtVrfObjectUniqueContainer |
| Set of functions used to get the relevant DtVrfObjects from the object manager. | |
| typedef boost::unordered_set < const DtVrfObject * > | DtVrfConstObjectUniqueContainer |
| Set of functions used to get the relevant DtVrfObjects from the object manager. | |
| bool | getVrfObjects (DtExtent &extent, DtVrfObjectUniqueContainer &objects) |
| Set of functions used to get the relevant DtVrfObjects from the object manager. | |
| bool | getVrfObjects (DtExtent &extent, DtVrfConstObjectUniqueContainer &objects) const |
| Set of functions used to get the relevant DtVrfObjects from the object manager. | |
| bool | getVrfObjects (DtVrfObjectPredicate &predicate, DtExtent &extent, DtVrfObjectUniqueContainer &objects) |
| Set of functions used to get the relevant DtVrfObjects from the object manager. | |
| bool | getVrfObjects (DtVrfObjectPredicate &predicate, DtExtent &extent, DtVrfConstObjectUniqueContainer &objects) const |
| Set of functions used to get the relevant DtVrfObjects from the object manager. | |
| bool | getVrfObjects (DtChord &chord, std::list< DtVrfObject * > &objects) |
| Set of functions used to get the relevant DtVrfObjects from the object manager. | |
| bool | getVrfObjects (DtChord &chord, std::list< const DtVrfObject * > &objects) const |
| Set of functions used to get the relevant DtVrfObjects from the object manager. | |
| bool | getVrfObjects (DtVrfObjectPredicate &predicate, DtChord &chord, std::list< DtVrfObject * > &objects) |
| Set of functions used to get the relevant DtVrfObjects from the object manager. | |
| bool | getVrfObjects (DtVrfObjectPredicate &predicate, DtChord &chord, std::list< const DtVrfObject * > &objects) const |
| Set of functions used to get the relevant DtVrfObjects from the object manager. | |
The DtPhysicalWorld is the primary interface to and manager of all of the "physical" aspects of the simulated world.
The DtPhysicalWorld is the primary interface to and manager of 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, DtVrfObjects, 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 be configured itself, which subsequently affects all related queries. For a specific example, look at the Line of Sight functions and related functionality.
| typedef std::list<DtVrfLineOfSightFunctorSP> DtPhysicalWorld::DtLineOfSightTestContainer |
| typedef boost::unordered_set<DtVrfObject*> DtPhysicalWorld::DtVrfObjectUniqueContainer |
Set of functions used to get the relevant DtVrfObjects from the object manager.
If a primitive is specified, the function returns a container of DtVrfObjects that is guaranteed to contain at least all the DtVrfObjects that intersect the specified geometric primitive.
| typedef boost::unordered_set<const DtVrfObject*> DtPhysicalWorld::DtVrfConstObjectUniqueContainer |
Set of functions used to get the relevant DtVrfObjects from the object manager.
If a primitive is specified, the function returns a container of DtVrfObjects that is guaranteed to contain at least all the DtVrfObjects that intersect the specified geometric primitive.
|
protected |
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 | ( | DtSimManager * | simManager | ) |
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 DtVrfObject 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 |
Intializes managers with parameters loaded from files.
|
inline |
Returns the value of the last file loaded.
References myPhysicalWorldFile.
|
virtual |
|
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 DtVrfObjects are spatially sorted, this will update the sorting to account for any changes to the spatial DtVrfObjects - removals or additions - in addition to general location/state changes.
|
virtual |
! COORDINATE SYSTEM OPERATIONS
The following functions provide general coordinate system functionality. This includes conversions between the specified coordinate systems, providing access to the current coordinate system object, and providing utility functionality, such as the down vector at a specified location.
|
virtual |
|
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 |
These physical world queries only interact with the terrain elements, 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.
| Output | |
| 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. |
|
virtual |
These physical world queries only interact with the terrain elements, 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.
| Output | |
| 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. |
|
virtual |
These physical world queries only interact with the terrain elements, 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.
| Output | |
| 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. |
|
virtual |
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.
| Output | |
| 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 |
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.
| Output | |
| 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 |
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.
| Output | |
| 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 |
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"
| Output | |
| 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 |
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"
| Output | |
| 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 |
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"
| Output | |
| 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 |
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"
| Output | |
| 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 |
This function is the same as terrainHeightAndSurface, but it looks below the input point rather than finding the highest surface at the xy of the input point.
|
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 |
Functions for determining the surface of the terrain at a specified location.
| Output | |
| 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 |
Functions for determining the surface of the terrain at a specified location.
| Output | |
| 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 |
Functions for determining the surface of the terrain at a specified location.
| Output | |
| 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 |
Functions for determining the surface of the terrain at a specified location.
| Output | |
| 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 |
Functions for determining the surface of the terrain at a specified location.
| Output | |
| 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 |
Functions for determining the surface of the terrain at a specified location.
| Output | |
| 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 |
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.
| Output | |
| 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 |
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. |
| bool DtPhysicalWorld::getVrfObjects | ( | DtExtent & | extent, |
| DtVrfObjectUniqueContainer & | objects | ||
| ) |
Set of functions used to get the relevant DtVrfObjects from the object manager.
If a primitive is specified, the function returns a container of DtVrfObjects that is guaranteed to contain at least all the DtVrfObjects that intersect the specified geometric primitive.
| bool DtPhysicalWorld::getVrfObjects | ( | DtExtent & | extent, |
| DtVrfConstObjectUniqueContainer & | objects | ||
| ) | const |
Set of functions used to get the relevant DtVrfObjects from the object manager.
If a primitive is specified, the function returns a container of DtVrfObjects that is guaranteed to contain at least all the DtVrfObjects that intersect the specified geometric primitive.
| bool DtPhysicalWorld::getVrfObjects | ( | DtVrfObjectPredicate & | predicate, |
| DtExtent & | extent, | ||
| DtVrfObjectUniqueContainer & | objects | ||
| ) |
Set of functions used to get the relevant DtVrfObjects from the object manager.
If a primitive is specified, the function returns a container of DtVrfObjects that is guaranteed to contain at least all the DtVrfObjects that intersect the specified geometric primitive.
| bool DtPhysicalWorld::getVrfObjects | ( | DtVrfObjectPredicate & | predicate, |
| DtExtent & | extent, | ||
| DtVrfConstObjectUniqueContainer & | objects | ||
| ) | const |
Set of functions used to get the relevant DtVrfObjects from the object manager.
If a primitive is specified, the function returns a container of DtVrfObjects that is guaranteed to contain at least all the DtVrfObjects that intersect the specified geometric primitive.
| bool DtPhysicalWorld::getVrfObjects | ( | DtChord & | chord, |
| std::list< DtVrfObject * > & | objects | ||
| ) |
Set of functions used to get the relevant DtVrfObjects from the object manager.
If a primitive is specified, the function returns a container of DtVrfObjects that is guaranteed to contain at least all the DtVrfObjects that intersect the specified geometric primitive.
| bool DtPhysicalWorld::getVrfObjects | ( | DtChord & | chord, |
| std::list< const DtVrfObject * > & | objects | ||
| ) | const |
Set of functions used to get the relevant DtVrfObjects from the object manager.
If a primitive is specified, the function returns a container of DtVrfObjects that is guaranteed to contain at least all the DtVrfObjects that intersect the specified geometric primitive.
| bool DtPhysicalWorld::getVrfObjects | ( | DtVrfObjectPredicate & | predicate, |
| DtChord & | chord, | ||
| std::list< DtVrfObject * > & | objects | ||
| ) |
Set of functions used to get the relevant DtVrfObjects from the object manager.
If a primitive is specified, the function returns a container of DtVrfObjects that is guaranteed to contain at least all the DtVrfObjects that intersect the specified geometric primitive.
| bool DtPhysicalWorld::getVrfObjects | ( | DtVrfObjectPredicate & | predicate, |
| DtChord & | chord, | ||
| std::list< const DtVrfObject * > & | objects | ||
| ) | const |
Set of functions used to get the relevant DtVrfObjects from the object manager.
If a primitive is specified, the function returns a container of DtVrfObjects that is guaranteed to contain at least all the DtVrfObjects that intersect the specified geometric primitive.
| void DtPhysicalWorld::visitVrfObjects | ( | const DtExtent & | extent, |
| class DtSpatialSelectionFunctor & | callback | ||
| ) | const |
Functions that 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.
| void DtPhysicalWorld::visitVrfObjects | ( | const DtChord & | chord, |
| class DtSpatialSelectionFunctor & | callback | ||
| ) | const |
Functions that 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.
|
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. |
|
virtual |
|
virtual |
Gets the list of DtVrfObjects managed, using the spatial organization predicate to select the DtVrfObjects.
Used when initializing the spatial organization of DtVrfObjects.
|
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 |
|
static |
Request/return sensor domains.
|
virtual |
|
virtual |
Process requests to determine and requests to set the terrain databases spatial subdivision settings.
|
virtual |
|
virtual |
|
virtual |
|
virtual |
Specifies whether or not the user has specified the spatial manager resolution.
If not, the default calculation values are used.
|
virtual |
|
virtual |
Accesses the spatial subdivision resolution
|
virtual |
Accesses the spatial subdivision resolution
|
virtual |
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 |
|
virtual |
|
virtual |
Sets the terrain database.
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
Returns the feature set which contains features maintained by the dynamic features controller.
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
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 checkLineOfSight functions except uses MAK_LOF_OBSTACLE for the feature query, and the function 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. |
|
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 function above except uses MAK_LOF_OBSTACLE for the feature query, and returns intersection information if there is an intersection.
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. |
|
static |
Callback registered with DtVrfObjectManager for notification when objects are removed.
Calls processObjectAboutToBeRemoved().
| vrfObject | Pointer to object representing the route we're following. |
| usr | Pointer to instance of this class. |
|
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.
|
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 a particular test to the master container of all LOS tests.
Does NOT add the test to the container of tests to run.
|
protectedvirtual |
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 |
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 |
|
protectedvirtual |
|
protectedvirtual |
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.
|
protectedvirtual |
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.
|
protectedvirtual |
|
protected |
|
protectedvirtual |
Accessors for the spatial DtVrfObject manager.
|
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 DtVrfObject (entity, aggregate, control object). |
|
protectedvirtual |
Queries local DtVrfObject instances for their desired terrain preload and passes the information to the DtTerrainInterface.
|
friend |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
Not owned, just used for reference.
|
protected |
Not owned, just used for reference.
|
protected |
Parameters for this physical world.
|
protected |
|
protected |
|
protected |
Referenced by physicalWorldFile().
|
protected |
|
protected |
|
protected |