VR-Forces 4.0.4 Class Documentation
Public Member Functions | Static Public Member Functions | Protected Types | Protected Member Functions | Static Protected Member Functions | Protected Attributes | Private Member Functions | Friends
DtPhysicalWorld Class Reference

The DtPhysicalWorld is the primary interface to and manager of all of the "physical" aspects of the simulated world. More...

List of all members.

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_SystemcoordinateSystem ()
 ! COORDINATE SYSTEM OPERATIONS
virtual const Coordinate_SystemcoordinateSystem () 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 intersect (const DtChord &chord, const std::list< const DtVrfObject * > objectsToIgnore=std::list< const DtVrfObject * >(), bool *dataAvailable=0, bool overrideBlockingAssert=false) const
 Performs an intersection with the physical world and the specified chord.
virtual bool closestTerrainLocation (const DtPoint &databaseLocation, DtPoint &intersectionPoint, DtVectorNetworkRecord *vectorNetworkRecord=0, DtVectorNetworkIntersectionRecord *vecNetworkIntersectionRecord=0, bool *dataAvailable=0, bool overrideBlockingAssert=false) const
 Similar to the terrainHeight functions above.
virtual bool closestTerrainLocation (double lat, double lon, DtPoint &intersectionPoint, DtVectorNetworkRecord *vectorNetworkRecord=0, DtVectorNetworkIntersectionRecord *vecNetworkIntersectionRecord=0, 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, DtVectorNetworkRecord *vectorNetworkRecord=0, DtVectorNetworkIntersectionRecord *vecNetworkIntersectionRecord=0, 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, DtVectorNetworkRecord *vectorDatarecord=0, DtVectorNetworkIntersectionRecord *vectorIntersectionRecord=0, 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 (double lat, double lon, DtChordIntersectionRecord &record, DtIntersectionRecord::DtIntersectionType irtFlag=DtIntersectionRecord::INT_ALL_DATA, DtVectorNetworkRecord *vectorDatarecord=0, DtVectorNetworkIntersectionRecord *vectorIntersectionRecord=0, 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, DtVectorNetworkRecord *vectorDatarecord=0, DtVectorNetworkIntersectionRecord *vectorIntersectionRecord=0, 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, DtVectorNetworkRecord *record=0, DtVectorNetworkIntersectionRecord *intersectionRecord=0, 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, DtVectorNetworkRecord *vectorDataRecord=0, DtVectorNetworkIntersectionRecord *vectorIntersectionRecord=0, 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 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 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
DtVectorObstructionManager
vectorObstructionManager ()
 The vector obstruction manager manages all of potential vector data obstructions in the physical world.
virtual const
DtVectorObstructionManager
vectorObstructionManager () const
virtual DtTerrainInterfaceterrainInterface ()
virtual const DtTerrainInterfaceterrainInterface () const
virtual void setTerrainInterface (DtTerrainInterface *newTerrainDatabase)
 Sets the terrain database.
virtual DtSimManagersimManager ()
virtual const DtSimManagersimManager () const
virtual void setSimManager (DtSimManager *newSimManager)
virtual DtVrfObjectManagerobjectManager ()
virtual const DtVrfObjectManagerobjectManager () const
virtual void setVrfObjectManager (DtVrfObjectManager *newObjectMgr)
virtual
DtEnvironmentalStateManager
environmentalStateManager ()
virtual const
DtEnvironmentalStateManager
environmentalStateManager () const
virtual void setEnvironmentalStateManager (DtEnvironmentalStateManager *manager)
virtual DtPhysicalWorldParamsparameters ()
virtual const
DtPhysicalWorldParams
parameters () const
virtual DtSensorSignatureManagersensorSignatureManager ()
virtual const
DtSensorSignatureManager
sensorSignatureManager () const
virtual bool checkLineOfSight (const DtVrfObject &viewingObject, const DtVector &databaseViewingPoint, const DtVrfObject &targetObject, bool *terrainDataAvailable=0) const
 Determines if targetObject is visible from the databaseViewingPoint.
virtual bool checkLineOfSight (const DtVector &databaseViewingPoint, const DtVrfObject &targetObject, bool *terrainDataAvailable=0) const
 Determines if targetObject is visible from the databaseViewingPoint.
virtual void expireDataLoadRequestsBeforeTime (const double &time)
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 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.
bool getVrfObjects (DtExtent &extent, std::set< const DtVrfObject * > &objects) const
 Set of functions used to get the relevant DtVrfObjects from the object manager.
bool getVrfObjects (DtExtent &extent, std::set< DtVrfObject * > &objects)
 Set of functions used to get the relevant DtVrfObjects from the object manager.
bool getVrfObjects (DtVrfObjectPredicate &predicate, DtExtent &extent, std::set< DtVrfObject * > &objects)
 Set of functions used to get the relevant DtVrfObjects from the object manager.
bool getVrfObjects (DtVrfObjectPredicate &predicate, DtExtent &extent, std::set< const DtVrfObject * > &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.
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 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 std::list
< DtVrfLineOfSightFunctorSP
DtLineOfSightTestContainer
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 void createFeatureSpecificationList (DtVectorNetworkRecord &vecNetworkRecord) const
virtual bool checkLineOfSight (const DtLineOfSightTestContainer &losTests, const DtVrfLineOfSightCheckParams &losCheckParams) const
 Runs all the tests in the specified list.
virtual DtVector localLineOfSightTestLocation (const DtVrfObject &object) const
virtual bool checkVrfObjectsForLOS (const DtVrfLineOfSightCheckParams &losCheckParams) const
virtual bool checkVectorNetworkForLOS (const DtVrfLineOfSightCheckParams &losCheckParams) const
virtual bool checkTerrainForLOS (const DtVrfLineOfSightCheckParams &losCheckParams) const
virtual bool intersectVrfObjects (const DtVrfObject &primaryVrfObject, const DtVector &databaseStartPoint, const DtVrfObject &secondaryVrfObject) const
virtual bool intersectsVrfObject (const DtVrfObject &vrfObjectToTest, const DtVector &databaseStartPoint, const DtVector &databaseEndPoint, double &distToIntersect) const
bool testInvariant () 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
DtSpatialVrfObjectManagerInterface
spatialVrfObjectManager ()
 Accessors for the spatial DtVrfObject manager.
virtual const
DtSpatialVrfObjectManagerInterface
spatialVrfObjectManager () const
virtual void setSpatialVrfObjectManager (DtSpatialVrfObjectManagerInterface *newSpatialVrfObjectMgr)
virtual DtPhysicalWorldParamscreateParameters ()
virtual DtSensorSignatureManagercreateSensorSignatureManager ()
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.

Static Protected Member Functions

static bool lineOfSightFilter (const DtVrfObject *object, void *usr)
 Used by checkLineOfSight to determine which physical elements can block visibility.

Protected Attributes

DtKeyedLineOfSightTestContainer myMasterLineOfSightTestContainer
DtLineOfSightTestContainer myLineOfSightTestsToPerform
DtManagedObjectListConstPtr myLineOfSightFilterList
 Shared list of visibility blocking objects.
DtTerrainInterfacemyTerrainInterface
DtVectorObstructionManagermyVectorObstructionManager
bool myUseVrfObjectSpatialManager
bool mySpatialMgrResolutionUserSpecified
unsigned int myVrfObjectSpatialSubXResolution
unsigned int myVrfObjectSpatialSubYResolution
unsigned int myVrfObjectSpatialSubZResolution
DtSpatialVrfObjectManagerInterfacemySpatialVrfObjectManager
DtManagedObjectListConstPtr mySpatiallyManagedVrfObjectList
DtSimManagermySimManager
 Not owned, just used for reference.
DtVrfObjectManagermyVrfObjectManager
 Not owned, just used for reference.
DtPhysicalWorldParamsmyParameters
 Parameters for this physical world.
DtSensorSignatureManagermySensorSignatureManager
DtEnvironmentalStateManagermyEnvironmentalStateManager
DtFilename myPhysicalWorldFile
DtTime myLastPreloadTerrainTime
DtExpireOlderThanCommandmyExpireOlderThanCommand

Private Member Functions

 DtPhysicalWorld (const DtPhysicalWorld &orig)
 Copy constructor - not implemented.
DtPhysicalWorldoperator= (const DtPhysicalWorld &orig)
 Assignment operator - not implemented.

Friends

class IntersectVrfObjectFunctor

Detailed Description

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.

See also:
LineOfSight
Note:
Application developers will want to ensure that any additions or subtractions to the physical elements in the environment, at a structural level, are accounted for in this classes interface. For instance, if a new type of terrain element, is added to the simulation, such as an implicit surface instead of a polygon, the queries of this class must be updated.

Member Typedef Documentation

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

typedef DtKeyedLineOfSightTestContainer::iterator DtPhysicalWorld::DtMasterLosTestIter [protected]
typedef DtKeyedLineOfSightTestContainer::const_iterator DtPhysicalWorld::DtMasterLosTestConstIter [protected]
typedef DtLineOfSightTestContainer::iterator DtPhysicalWorld::DtLosTestIter [protected]
typedef DtLineOfSightTestContainer::const_iterator DtPhysicalWorld::DtLosTestConstIter [protected]

Constructor & Destructor Documentation

Constructor.

virtual DtPhysicalWorld::~DtPhysicalWorld ( ) [virtual]

Destructor.

Copy constructor - not implemented.


Member Function Documentation

DtPhysicalWorld& DtPhysicalWorld::operator= ( const DtPhysicalWorld orig) [private]

Assignment operator - not implemented.

virtual bool DtPhysicalWorld::initialize ( ) [virtual]

Initializes the physical world for use.

This includes the following:

  • Registering for the spatial subdivision configuration message callbacks with the SimManager, so that users can specify the spatial subdivision settings through messages.
  • Creating the sensor signature manager.
  • If specified, extruding the vector obstructions as a temporary simplification for intersection testing (essentially turning the problem into a 2D intersection issue).
virtual bool DtPhysicalWorld::reinitialize ( ) [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).

Note:
The reinitialize function is very different from the initialize function.
virtual bool DtPhysicalWorld::reset ( ) [virtual]

Resets system to initial state. Calls reinitialize() and deletes myParameters.

virtual bool DtPhysicalWorld::loadParametersFromFile ( const DtFilename &  filename) [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.

Returns:
True on success.
virtual bool DtPhysicalWorld::loadPhysicalWorldFile ( const DtFilename &  filename) [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 void DtPhysicalWorld::processParameters ( ) [virtual]

Intializes managers with parameters loaded from files.

const DtFilename & DtPhysicalWorld::physicalWorldFile ( ) const [inline]

Returns the value of the last file loaded.

Returns:
Last parameter file loaded

References myPhysicalWorldFile.

virtual bool DtPhysicalWorld::parametersLoaded ( ) const [virtual]
Returns:
true if a parameter set has been loaded.
virtual bool DtPhysicalWorld::isValidState ( ) const [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:

  • It has a valid way to get the entities in the scenario (the object manager pointer is valid)
  • It has a working model of the terrain (for now, the terrain database and its associated coordinate system are loaded and created properly.)
Returns:
A boolean indicating whether or not the physical world instance is in a valid state to perform operations or not.
Note:
This is not the same as the testInvariant function, which is solely responsible for ensuring that the classes invariant is maintained.
virtual void DtPhysicalWorld::tick ( ) [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.

! 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 const Coordinate_System* DtPhysicalWorld::coordinateSystem ( ) const [virtual]
virtual void DtPhysicalWorld::geocentricToDatabase ( const DtVector in,
DtVector out 
) const [virtual]

Converts the specified vector from geocentric to database coordinates.

virtual void DtPhysicalWorld::geocentricToDatabase ( const DtDcm &  in,
DtDcm &  out 
) const [virtual]

Converts the specified rotation matrix from geocentric to database coordinates.

virtual void DtPhysicalWorld::geocentricToDatabase ( const DtVector vIn,
const DtDcm &  dIn,
DtVector vOut,
DtDcm &  dOut 
) const [virtual]

Converts the specified vector and rotation matrix from geocentric to database coordinates.

virtual void DtPhysicalWorld::geocentricToDatabase ( const DtExtent in,
DtExtent out 
) const [virtual]

Converts the specified extent from geocentric to database coordinates.

virtual void DtPhysicalWorld::databaseToGeocentric ( const DtVector in,
DtVector out 
) const [virtual]

Converts the specified vector from database to geocentric coordinates.

virtual void DtPhysicalWorld::databaseToGeocentric ( const DtDcm &  in,
DtDcm &  out 
) const [virtual]

Converts the specified rotation matrix from database to geocentric coordinates.

virtual void DtPhysicalWorld::databaseToGeocentric ( const DtVector vIn,
const DtDcm &  dIn,
DtVector vOut,
DtDcm &  dOut 
) const [virtual]

Converts the specified vector and rotation matrix from database to geocentric coordinates.

virtual void DtPhysicalWorld::databaseToGeocentric ( const DtExtent in,
DtExtent out 
) const [virtual]

Converts the specified extent from database to geocentric coordinates.

virtual void DtPhysicalWorld::databaseToGeodetic ( const DtVector databasePosition,
DtGeodeticCoord &  geodeticPosition 
) const [virtual]

Converts the specified position from database to geodetic coordinates.

virtual void DtPhysicalWorld::databaseToGeodetic ( const DtVector databasePosition,
DtVector geodeticPosition 
) const [virtual]

Converts the specified position from database to geodetic coordinates.

virtual void DtPhysicalWorld::databaseToGeodetic ( const DtExtent extent,
DtExtent destExtent 
) const [virtual]

Converts the specified extent from database to geodetic coordinates.

virtual void DtPhysicalWorld::geodeticToDatabase ( const DtExtent extent,
DtExtent destExtent 
) const [virtual]

Converts the specified position from geodetic to database coordinates.

virtual void DtPhysicalWorld::geodeticToDatabase ( const DtGeodeticCoord &  geodeticPosition,
DtVector databasePosition 
) const [virtual]

Converts the specified position from geodetic to database coordinates.

virtual void DtPhysicalWorld::geodeticToDatabase ( const DtVector geodeticPosition,
DtVector databasePosition 
) const [virtual]

Converts the specified position from geodetic to database coordinates.

virtual void DtPhysicalWorld::topoToDatabase ( const DtVector databasePosition,
DtDcm &  topoToDatabase 
) const [virtual]

Creates a rotation matrix for going between topographic and database coordinates, at a given database position.

virtual void DtPhysicalWorld::databaseToTopo ( const DtVector databasePosition,
DtDcm &  databaseToTopo 
) const [virtual]

Creates a rotation matrices for going between database and topographic coordinates, at a given database position.

virtual DtVector DtPhysicalWorld::down ( const DtVector databasePosition) const [virtual]

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)

Returns:
The unit vector pointing down (along the direction of gravity) at a given database position.
virtual bool DtPhysicalWorld::intersect ( const DtChord chord,
const std::list< const DtVrfObject * >  objectsToIgnore = std::list< const DtVrfObject * >(),
bool dataAvailable = 0,
bool  overrideBlockingAssert = false 
) const [virtual]

Performs an intersection with the physical world and the specified chord.

Both VR-Forces objects and the terrain database are queried. Useful for determining if anything physical obstructs the chord.

Parameters:
Input
chordchord to test
objectsToIgnoreAny objects listed here will be ignored in the intersection with VRF objects tests.
Output
dataAvailablePlease see "Sychronous 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.
overrideBlockingAssertwhen 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.
Returns:
result of the intersection or data availability
Return values:
trueif any intersection occurs
falseif dataAvailable was specified and returns true, then the database does not have an intersection at localLocation. Otherwise false indicates that the data is not yet available.
virtual double DtPhysicalWorld::terrainHeight ( const DtPoint databaseLocation,
bool dataAvailable = 0,
bool  overrideBlockingAssert = false 
) const [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.

Note:
1 - These functions only intersect terrain polygons - no feature data.

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.

Parameters:
Output
dataAvailablePlease see "Sychronous 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.
overrideBlockingAssertwhen 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.
Returns:
terrainHeight (or zero if the terrain is not yet available)
virtual double DtPhysicalWorld::terrainHeight ( double  lat,
double  lon,
bool dataAvailable = 0,
bool  overrideBlockingAssert = false 
) const [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.

Note:
1 - These functions only intersect terrain polygons - no feature data.

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.

Parameters:
Output
dataAvailablePlease see "Sychronous 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.
overrideBlockingAssertwhen 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.
Returns:
terrainHeight (or zero if the terrain is not yet available)
virtual double DtPhysicalWorld::terrainHeight ( const DtVector databaseLocation,
bool dataAvailable = 0,
bool  overrideBlockingAssert = false 
) const [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.

Note:
1 - These functions only intersect terrain polygons - no feature data.

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.

Parameters:
Output
dataAvailablePlease see "Sychronous 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.
overrideBlockingAssertwhen 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.
Returns:
terrainHeight (or zero if the terrain is not yet available)
virtual bool DtPhysicalWorld::terrainHeight ( const DtPoint databaseLocation,
double &  height,
bool dataAvailable = 0,
bool  overrideBlockingAssert = false 
) const [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.

Parameters:
Output
dataAvailablePlease see "Sychronous 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.
overrideBlockingAssertwhen 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.
Returns:
result of the terrain intersection or data availability
Return values:
truea terrain intersection was found
falseif dataAvailable was specified and returns true, then the database does not have an intersection at localLocation. Otherwise false indicates that the data is not yet available.
virtual bool DtPhysicalWorld::terrainHeight ( double  lat,
double  lon,
double &  height,
bool dataAvailable = 0,
bool  overrideBlockingAssert = false 
) const [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.

Parameters:
Output
dataAvailablePlease see "Sychronous 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.
overrideBlockingAssertwhen 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.
Returns:
result of the terrain intersection or data availability
Return values:
truea terrain intersection was found
falseif dataAvailable was specified and returns true, then the database does not have an intersection at localLocation. Otherwise false indicates that the data is not yet available.
virtual bool DtPhysicalWorld::terrainHeight ( const DtVector databaseLocation,
double &  height,
bool dataAvailable = 0,
bool  overrideBlockingAssert = false 
) const [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.

Parameters:
Output
dataAvailablePlease see "Sychronous 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.
overrideBlockingAssertwhen 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.
Returns:
result of the terrain intersection or data availability
Return values:
truea terrain intersection was found
falseif dataAvailable was specified and returns true, then the database does not have an intersection at localLocation. Otherwise false indicates that the data is not yet available.
virtual bool DtPhysicalWorld::terrainHeightAndSurface ( const DtPoint databaseLocation,
double &  height,
DtSurface surface,
bool dataAvailable = 0,
bool  overrideBlockingAssert = false 
) const [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"

Note:
1 - These functions to NOT intersect vector or geometric feature data - they are intended for finding the "ground" height. 2 - These functions determine the topmost intersection with the terrain. Thus if there are multiple levels of terrain, the highest intersection point will be returned as the height. In order to get the closest intersection points with terrain (and possibly features data, use the closestIntersection() functions below.
Parameters:
Output
dataAvailablePlease see "Sychronous 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.
overrideBlockingAssertwhen 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.
Returns:
result of the terrain intersection or data availability
Return values:
truea terrain intersection was found
falseif dataAvailable was specified and returns true, then the database does not have an intersection at localLocation. Otherwise false indicates that the data is not yet available.
virtual bool DtPhysicalWorld::terrainHeightAndSurface ( double  lat,
double  lon,
double &  height,
DtSurface surface,
bool dataAvailable = 0,
bool  overrideBlockingAssert = false 
) const [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"

Note:
1 - These functions to NOT intersect vector or geometric feature data - they are intended for finding the "ground" height. 2 - These functions determine the topmost intersection with the terrain. Thus if there are multiple levels of terrain, the highest intersection point will be returned as the height. In order to get the closest intersection points with terrain (and possibly features data, use the closestIntersection() functions below.
Parameters:
Output
dataAvailablePlease see "Sychronous 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.
overrideBlockingAssertwhen 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.
Returns:
result of the terrain intersection or data availability
Return values:
truea terrain intersection was found
falseif dataAvailable was specified and returns true, then the database does not have an intersection at localLocation. Otherwise false indicates that the data is not yet available.
virtual bool DtPhysicalWorld::terrainHeightAndSurface ( const DtVector databaseLocation,
double &  height,
DtSurface surface,
bool dataAvailable = 0,
bool  overrideBlockingAssert = false 
) const [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"

Note:
1 - These functions to NOT intersect vector or geometric feature data - they are intended for finding the "ground" height. 2 - These functions determine the topmost intersection with the terrain. Thus if there are multiple levels of terrain, the highest intersection point will be returned as the height. In order to get the closest intersection points with terrain (and possibly features data, use the closestIntersection() functions below.
Parameters:
Output
dataAvailablePlease see "Sychronous 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.
overrideBlockingAssertwhen 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.
Returns:
result of the terrain intersection or data availability
Return values:
truea terrain intersection was found
falseif dataAvailable was specified and returns true, then the database does not have an intersection at localLocation. Otherwise false indicates that the data is not yet available.
virtual bool DtPhysicalWorld::terrainHeightAndSurface ( const DtVector databaseLocation,
double &  heightAtLocation,
DtChordIntersectionRecord intersectionRec,
DtIntersectionRecord::DtIntersectionType  irtFlag = DtIntersectionRecord::INT_ALL_DATA,
bool dataAvailable = 0,
bool  overrideBlockingAssert = false 
) const [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"

Note:
1 - These functions to NOT intersect vector or geometric feature data - they are intended for finding the "ground" height. 2 - These functions determine the topmost intersection with the terrain. Thus if there are multiple levels of terrain, the highest intersection point will be returned as the height. In order to get the closest intersection points with terrain (and possibly features data, use the closestIntersection() functions below.
Parameters:
Output
dataAvailablePlease see "Sychronous 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.
overrideBlockingAssertwhen 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.
Returns:
result of the terrain intersection or data availability
Return values:
truea terrain intersection was found
falseif dataAvailable was specified and returns true, then the database does not have an intersection at localLocation. Otherwise false indicates that the data is not yet available.
virtual bool DtPhysicalWorld::terrainSurface ( const DtPoint databaseLocation,
DtSurface surface,
bool dataAvailable = 0,
bool  overrideBlockingAssert = false 
) const [virtual]

Functions for determining the surface of the terrain at a specified location.

Returns:
A boolean indicating whether or not the surface could be determined at the specified location. If false, likely no intersection occurred.
Note:
These functions do not intersect any non-terrain elements, or even the vector or geometric feature data. The are intended for finding the "ground" surface only. They also find the topmost intersection with the terrain. Thus if there are multiple levels of terrain, the highest intersection point's surface will be returned. In order to get the closest intersection points with terrain (and possibly features data, use the closestIntersection() functions below.
See also:
closestIntersection
Parameters:
Output
dataAvailablePlease see "Sychronous 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.
overrideBlockingAssertwhen 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.
Returns:
result of the terrain intersection or data availability
Return values:
truea terrain intersection was found
falseif dataAvailable was specified and returns true, then the database does not have an intersection at localLocation. Otherwise false indicates that the data is not yet available.
virtual bool DtPhysicalWorld::terrainSurface ( double  lat,
double  lon,
DtSurface surface,
bool dataAvailable = 0,
bool  overrideBlockingAssert = false 
) const [virtual]

Functions for determining the surface of the terrain at a specified location.

Returns:
A boolean indicating whether or not the surface could be determined at the specified location. If false, likely no intersection occurred.
Note:
These functions do not intersect any non-terrain elements, or even the vector or geometric feature data. The are intended for finding the "ground" surface only. They also find the topmost intersection with the terrain. Thus if there are multiple levels of terrain, the highest intersection point's surface will be returned. In order to get the closest intersection points with terrain (and possibly features data, use the closestIntersection() functions below.
See also:
closestIntersection
Parameters:
Output
dataAvailablePlease see "Sychronous 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.
overrideBlockingAssertwhen 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.
Returns:
result of the terrain intersection or data availability
Return values:
truea terrain intersection was found
falseif dataAvailable was specified and returns true, then the database does not have an intersection at localLocation. Otherwise false indicates that the data is not yet available.
virtual bool DtPhysicalWorld::terrainSurface ( const DtVector databaseLocation,
DtSurface surface,
bool dataAvailable = 0,
bool  overrideBlockingAssert = false 
) const [virtual]

Functions for determining the surface of the terrain at a specified location.

Returns:
A boolean indicating whether or not the surface could be determined at the specified location. If false, likely no intersection occurred.
Note:
These functions do not intersect any non-terrain elements, or even the vector or geometric feature data. The are intended for finding the "ground" surface only. They also find the topmost intersection with the terrain. Thus if there are multiple levels of terrain, the highest intersection point's surface will be returned. In order to get the closest intersection points with terrain (and possibly features data, use the closestIntersection() functions below.
See also:
closestIntersection
Parameters:
Output
dataAvailablePlease see "Sychronous 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.
overrideBlockingAssertwhen 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.
Returns:
result of the terrain intersection or data availability
Return values:
truea terrain intersection was found
falseif dataAvailable was specified and returns true, then the database does not have an intersection at localLocation. Otherwise false indicates that the data is not yet available.
virtual DtSurface DtPhysicalWorld::terrainSurface ( const DtPoint databaseLocation,
bool dataAvailable = 0,
bool  overrideBlockingAssert = false 
) const [virtual]

Functions for determining the surface of the terrain at a specified location.

Returns:
A boolean indicating whether or not the surface could be determined at the specified location. If false, likely no intersection occurred.
Note:
These functions do not intersect any non-terrain elements, or even the vector or geometric feature data. The are intended for finding the "ground" surface only. They also find the topmost intersection with the terrain. Thus if there are multiple levels of terrain, the highest intersection point's surface will be returned. In order to get the closest intersection points with terrain (and possibly features data, use the closestIntersection() functions below.
See also:
closestIntersection
Parameters:
Output
dataAvailablePlease see "Sychronous 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.
overrideBlockingAssertwhen 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.
Returns:
result of the terrain intersection or data availability
Return values:
truea terrain intersection was found
falseif dataAvailable was specified and returns true, then the database does not have an intersection at localLocation. Otherwise false indicates that the data is not yet available.
virtual DtSurface DtPhysicalWorld::terrainSurface ( double  lat,
double  lon,
bool dataAvailable = 0,
bool  overrideBlockingAssert = false 
) const [virtual]

Functions for determining the surface of the terrain at a specified location.

Returns:
A boolean indicating whether or not the surface could be determined at the specified location. If false, likely no intersection occurred.
Note:
These functions do not intersect any non-terrain elements, or even the vector or geometric feature data. The are intended for finding the "ground" surface only. They also find the topmost intersection with the terrain. Thus if there are multiple levels of terrain, the highest intersection point's surface will be returned. In order to get the closest intersection points with terrain (and possibly features data, use the closestIntersection() functions below.
See also:
closestIntersection
Parameters:
Output
dataAvailablePlease see "Sychronous 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.
overrideBlockingAssertwhen 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.
Returns:
result of the terrain intersection or data availability
Return values:
truea terrain intersection was found
falseif dataAvailable was specified and returns true, then the database does not have an intersection at localLocation. Otherwise false indicates that the data is not yet available.
virtual DtSurface DtPhysicalWorld::terrainSurface ( const DtVector databaseLocation,
bool dataAvailable = 0,
bool  overrideBlockingAssert = false 
) const [virtual]

Functions for determining the surface of the terrain at a specified location.

Returns:
A boolean indicating whether or not the surface could be determined at the specified location. If false, likely no intersection occurred.
Note:
These functions do not intersect any non-terrain elements, or even the vector or geometric feature data. The are intended for finding the "ground" surface only. They also find the topmost intersection with the terrain. Thus if there are multiple levels of terrain, the highest intersection point's surface will be returned. In order to get the closest intersection points with terrain (and possibly features data, use the closestIntersection() functions below.
See also:
closestIntersection
Parameters:
Output
dataAvailablePlease see "Sychronous 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.
overrideBlockingAssertwhen 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.
Returns:
result of the terrain intersection or data availability
Return values:
truea terrain intersection was found
falseif dataAvailable was specified and returns true, then the database does not have an intersection at localLocation. Otherwise false indicates that the data is not yet available.
virtual bool DtPhysicalWorld::closestTerrainLocation ( const DtPoint databaseLocation,
DtPoint intersectionPoint,
DtVectorNetworkRecord vectorNetworkRecord = 0,
DtVectorNetworkIntersectionRecord vecNetworkIntersectionRecord = 0,
bool dataAvailable = 0,
bool  overrideBlockingAssert = false 
) const [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.

Note:
Unlike the terrainHeight functions, if the vectorNetworkRecord and vectorNetworkIntersectionRecord are non-NULL, it will computes an intersection with the vector network and return the best intersection as defined by the metrics in the vectorNetworkRecord.

Return Values: True if any intersection, vector data or terrain, is found. If a vector data intersection is found, then the vecNetworkIntersectionRecord is set appropriately. If at least one terrain intersection is found, the intersectionPoint parameter is set to the closest intersection point.

Parameters:
Output
dataAvailablePlease see "Sychronous 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.
overrideBlockingAssertwhen 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.
Returns:
result of the terrain intersection or data availability
Return values:
truea terrain intersection was found
falseif dataAvailable was specified and returns true, then the database does not have an intersection at localLocation. Otherwise false indicates that the data is not yet available.
virtual bool DtPhysicalWorld::closestTerrainLocation ( double  lat,
double  lon,
DtPoint intersectionPoint,
DtVectorNetworkRecord vectorNetworkRecord = 0,
DtVectorNetworkIntersectionRecord vecNetworkIntersectionRecord = 0,
bool dataAvailable = 0,
bool  overrideBlockingAssert = false 
) const [virtual]

Same as above closestTerrainLocation, but accepts location in lat/lon.

vectorDatarecord and vectorIntersectionRecord are ignored.

virtual bool DtPhysicalWorld::closestTerrainLocation ( const DtVector databaseLocation,
DtPoint intersectionPoint,
DtVectorNetworkRecord vectorNetworkRecord = 0,
DtVectorNetworkIntersectionRecord vecNetworkIntersectionRecord = 0,
bool dataAvailable = 0,
bool  overrideBlockingAssert = false 
) const [virtual]

Same as above closestTerrainLocation, but accepts location as a vector.

virtual bool DtPhysicalWorld::closestTerrainLocation ( const DtPoint databaseLocation,
DtChordIntersectionRecord record,
DtIntersectionRecord::DtIntersectionType  irtFlag = DtIntersectionRecord::INT_ALL_DATA,
DtVectorNetworkRecord vectorDatarecord = 0,
DtVectorNetworkIntersectionRecord vectorIntersectionRecord = 0,
bool dataAvailable = 0,
bool  overrideBlockingAssert = false 
) const [virtual]

Same as above closestTerrainLocation, but returns the entire intersection record, and not just the intersection point.

virtual bool DtPhysicalWorld::closestTerrainLocation ( double  lat,
double  lon,
DtChordIntersectionRecord record,
DtIntersectionRecord::DtIntersectionType  irtFlag = DtIntersectionRecord::INT_ALL_DATA,
DtVectorNetworkRecord vectorDatarecord = 0,
DtVectorNetworkIntersectionRecord vectorIntersectionRecord = 0,
bool dataAvailable = 0,
bool  overrideBlockingAssert = false 
) const [virtual]

Same as above closestTerrainLocation, but accepts location in lat/lon.

vectorDatarecord and vectorIntersectionRecord are ignored.

virtual bool DtPhysicalWorld::closestTerrainLocation ( const DtVector databaseLocation,
DtChordIntersectionRecord record,
DtIntersectionRecord::DtIntersectionType  irtFlag = DtIntersectionRecord::INT_ALL_DATA,
DtVectorNetworkRecord vectorDatarecord = 0,
DtVectorNetworkIntersectionRecord vectorIntersectionRecord = 0,
bool dataAvailable = 0,
bool  overrideBlockingAssert = false 
) const [virtual]

Same as above closestTerrainLocation, but accepts location as a vector.

virtual bool DtPhysicalWorld::closestTerrainLocation ( const DtVector curPosition,
DtVector intersection,
bool  ignoreWater,
bool dataAvailable = 0,
bool  overrideBlockingAssert = false 
) const [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).

Parameters:
Input
curPostionposition to test
ignoreWaterif set to true, advances through list of intersection returned until first DtSurface that is not a water surface is found.
Output
intersectionthe point of intersection, left unchanged if dataAvailable is set to false.
dataAvailablePlease see "Sychronous 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.
overrideBlockingAssertwhen 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.
Returns:
result of the terrain intersection or data availability
Return values:
truea terrain intersection was found
falseif dataAvailable was specified and returns true, then the database does not have an intersection at localLocation. Otherwise false indicates that the data is not yet available.
virtual bool DtPhysicalWorld::intersect ( const DtChord chord,
DtPoint intersectionPoint,
double &  intersectionTime,
DtVectorNetworkRecord record = 0,
DtVectorNetworkIntersectionRecord intersectionRecord = 0,
bool dataAvailable = 0,
bool  overrideBlockingAssert = false 
) const [virtual]

Intersect calls which do not use down vector modification Calculates the first terrain intersection point along a chord given in Database Coordinates.

Parameters:
Input
chordthe chord to test
Output
intersectionPointlocation of the intersection or left unchanged if there's no intersection or the data is not yet available (see dataAvailable).
intersectionTimetime 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
dataAvailablePlease see "Sychronous 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.
overrideBlockingAssertwhen 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.
Returns:
result of the terrain intersection or data availability
Return values:
truea terrain intersection was found
falseif dataAvailable was specified and returns true, then the database does not have an intersection at localLocation. Otherwise false indicates that the data is not yet available.
virtual bool DtPhysicalWorld::intersect ( const DtChord chord,
DtChordIntersectionRecord record,
DtIntersectionRecord::DtIntersectionType  irtFlag = DtIntersectionRecord::INT_ALL_DATA,
DtVectorNetworkRecord vectorDataRecord = 0,
DtVectorNetworkIntersectionRecord vectorIntersectionRecord = 0,
bool dataAvailable = 0,
bool  overrideBlockingAssert = false 
) const [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.

Parameters:
Input
chordthe chord to test
irtFlagspecifies which data should be calculated and returned for each intersection point
Output
recordthe result of the terrain intersection
vectorDataRecord
vectorIntersectionRecord
dataAvailablePlease see "Sychronous 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.
overrideBlockingAssertwhen 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.
Returns:
result of the terrain intersection or data availability
Return values:
truea terrain intersection was found
falseif dataAvailable was specified and returns true, then the database does not have an intersection at localLocation. Otherwise false indicates that the data is not yet available.
bool DtPhysicalWorld::getVrfObjects ( DtExtent extent,
std::set< 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.

Note:
The containers may, and probably will, contain additional DtVrfObjects when a primitive is supplied. The are only guaranteed to not be missing any that do intersect. This is because the contents of all the intersected cells, as well as any non-spatially indexed objects are returned.
bool DtPhysicalWorld::getVrfObjects ( DtExtent extent,
std::set< 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.

Note:
The containers may, and probably will, contain additional DtVrfObjects when a primitive is supplied. The are only guaranteed to not be missing any that do intersect. This is because the contents of all the intersected cells, as well as any non-spatially indexed objects are returned.
bool DtPhysicalWorld::getVrfObjects ( DtVrfObjectPredicate predicate,
DtExtent extent,
std::set< 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.

Note:
The containers may, and probably will, contain additional DtVrfObjects when a primitive is supplied. The are only guaranteed to not be missing any that do intersect. This is because the contents of all the intersected cells, as well as any non-spatially indexed objects are returned.
bool DtPhysicalWorld::getVrfObjects ( DtVrfObjectPredicate predicate,
DtExtent extent,
std::set< 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.

Note:
The containers may, and probably will, contain additional DtVrfObjects when a primitive is supplied. The are only guaranteed to not be missing any that do intersect. This is because the contents of all the intersected cells, as well as any non-spatially indexed objects are returned.
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.

Note:
The containers may, and probably will, contain additional DtVrfObjects when a primitive is supplied. The are only guaranteed to not be missing any that do intersect. This is because the contents of all the intersected cells, as well as any non-spatially indexed objects are returned.
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.

Note:
The containers may, and probably will, contain additional DtVrfObjects when a primitive is supplied. The are only guaranteed to not be missing any that do intersect. This is because the contents of all the intersected cells, as well as any non-spatially indexed objects are returned.
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.

Note:
The containers may, and probably will, contain additional DtVrfObjects when a primitive is supplied. The are only guaranteed to not be missing any that do intersect. This is because the contents of all the intersected cells, as well as any non-spatially indexed objects are returned.
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.

Note:
The containers may, and probably will, contain additional DtVrfObjects when a primitive is supplied. The are only guaranteed to not be missing any that do intersect. This is because the contents of all the intersected cells, as well as any non-spatially indexed objects are returned.
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.

Note:
The functor may, and probably will, be called for additional DtVrfObjects when a primitive is supplied. We are only guaranteed not to miss any that do intersect.
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.

Note:
The functor may, and probably will, be called for additional DtVrfObjects when a primitive is supplied. We are only guaranteed not to miss any that do intersect.
virtual void DtPhysicalWorld::groundClamp ( DtPoint databaseCoord,
float const  offset = 0,
bool dataAvailable = 0,
bool  overrideBlockingAssert = false 
) const [virtual]

Put the passed point "offset" meters from the ground.

Passes DtPoint.

Parameters:
Input
databaseCoordlocation to ground clamp
offsetheight above the ground
Output
databaseCoordground clamped output
dataAvailableIf 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.
overrideBlockingAssertwhen 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 void DtPhysicalWorld::groundClamp ( DtVector databaseCoord,
float const  offset = 0,
bool dataAvailable = 0,
bool  overrideBlockingAssert = false 
) const [virtual]

put the passed point "offset" meters from the ground.

Passes a DtVector.

Parameters:
Input
databaseCoordlocation to ground clamp
offsetheight above the ground
Output
databaseCoordground clamped output
dataAvailableIf 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.
overrideBlockingAssertwhen 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 void DtPhysicalWorld::getVrfObjectsAlongChord ( const DtVector databaseStart,
const DtVector databaseEnd,
std::list< const DtVrfObject * > &  orderedList 
) const [virtual]
Returns:
An ordered list of all DtVrfObjects that the specified chord intersects. This includes only objects which the chord intersects. The chord is specified in database (local) coordinates. The returned list will be ordered starting with closest to the chord start.

Gets the list of DtVrfObjects managed, using the spatial organization predicate to select the DtVrfObjects.

Used when initializing the spatial organization of DtVrfObjects.

See also:
getList
getSpatialOrganizationPredicate
initializeSpatialVrfObjectOrganization;
Returns:
A boolean indicating success or failure in spatially organizing the DtVrfObjects.
Note:
Only DtVrfObjects specified by the spatial organization predicate are organized.
virtual void DtPhysicalWorld::calcSpatialMgrResolution ( const DtManagedObjectListConstPtr vrfObjList) [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.

Note:
Currently calculates the number of subdivisions so that, given evenly distributed vrfObjects, the cells would have a relatively constant fill rate of about DtMaxVrfObjectsPerCell (currently 10). The calculation is the sq. root. of the the number of objects divided by 10 (DtMaxVrfObjectsPerCell).
Returns:
a DtFilterFunctionPredicate based on spatialOrganizationObjectFilterFcn that is used to select the DtVrfObjects, from all managed, to be spatially organized.

This function should be overridden to allow for a more selective spatial organization if desired.

static bool DtPhysicalWorld::spatialOrganizationObjectFilterFcn ( const DtVrfObject obj,
void *  usr 
) [static]

Calls the virtual processSpatialOrganizationObjectFilterFcn() on the instance pointed to by usr.

Returns:
A boolean indicating whether or not the specified object should be part of the spatial subdivision. This is done based on the object type. If the physical world parameters have been loaded, then the type is compared against the list of types in the params file. Otherwise it is compared against the default list of types: DtObjectType::individualPlatformType() DtObjectType::individualLifeformType() DtArealObjectKind DtLinearObjectKind DtPointObjectKind
static void DtPhysicalWorld::querySpatialSubdivisionConfigurationCallback ( DtSimMessage msg,
void *  usr 
) [static]

SpatialSubdivision configuration message callback functions.

static void DtPhysicalWorld::setSpatialSubdivisionConfigurationCallback ( DtSimMessage msg,
void *  usr 
) [static]

Process requests to determine and requests to set the terrain databases spatial subdivision settings.

virtual bool DtPhysicalWorld::useVrfObjectSpatialSub ( ) const [virtual]
Returns:
A boolean indicating whether or not to spatially organize the DtVrfObjects.
virtual void DtPhysicalWorld::setUseVrfObjectSpatialSub ( bool  yesOrNo) [virtual]

Specifies whether or not the user has specified the spatial manager resolution.

If not, the default calculation values are used.

virtual void DtPhysicalWorld::setSpatialMgrResolutionUserSpecified ( bool  yesOrNo) [virtual]
virtual unsigned int DtPhysicalWorld::vrfObjectSpatialSubXResolution ( ) const [virtual]

Accesses the spatial subdivision resolution

virtual unsigned int DtPhysicalWorld::vrfObjectSpatialSubYResolution ( ) const [virtual]

Accesses the spatial subdivision resolution

virtual unsigned int DtPhysicalWorld::vrfObjectSpatialSubZResolution ( ) const [virtual]

Accesses the spatial subdivision resolution

virtual void DtPhysicalWorld::setVrfObjectSpatialSubXResolution ( unsigned int  newXResolution) [virtual]

Sets the spatial subdivision resolution. Note that this value will be overridden each tick by calcSpatialMgrResolution unless setSpatialMgrResolutionUserSpecified(true) is called

virtual void DtPhysicalWorld::setVrfObjectSpatialSubYResolution ( unsigned int  newYResolution) [virtual]

Sets the spatial subdivision resolution. Note that this value will be overridden each tick by calcSpatialMgrResolution unless setSpatialMgrResolutionUserSpecified(true) is called

virtual void DtPhysicalWorld::setVrfObjectSpatialSubZResolution ( unsigned int  newZResolution) [virtual]

Sets the spatial subdivision resolution. Note that this value will be overridden each tick by calcSpatialMgrResolution unless setSpatialMgrResolutionUserSpecified(true) is called

The vector obstruction manager manages all of potential vector data obstructions in the physical world.

Returns:
A pointer to the current vector obstruction manager, if it exists.
Returns:
Pointer to the currently loaded terrain interface, if it exists.
virtual const DtTerrainInterface* DtPhysicalWorld::terrainInterface ( ) const [virtual]
Returns:
Pointer to the currently loaded terrain interface, if it exists.
virtual void DtPhysicalWorld::setTerrainInterface ( DtTerrainInterface newTerrainDatabase) [virtual]

Sets the terrain database.

Note:
Does not delete it first.
virtual DtSimManager* DtPhysicalWorld::simManager ( ) [virtual]
virtual const DtSimManager* DtPhysicalWorld::simManager ( ) const [virtual]
virtual void DtPhysicalWorld::setSimManager ( DtSimManager newSimManager) [virtual]
virtual const DtVrfObjectManager* DtPhysicalWorld::objectManager ( ) const [virtual]
virtual void DtPhysicalWorld::setVrfObjectManager ( DtVrfObjectManager newObjectMgr) [virtual]
Returns:
The parameters for this DtPhysicalWorld.
virtual const DtPhysicalWorldParams* DtPhysicalWorld::parameters ( ) const [virtual]
Returns:
The DtSensorSignatureManager owned by this physical world. This provides access to querying apparent signatures of objects in the world.
virtual bool DtPhysicalWorld::checkLineOfSight ( const DtVrfObject viewingObject,
const DtVector databaseViewingPoint,
const DtVrfObject targetObject,
bool terrainDataAvailable = 0 
) const [virtual]

Determines if targetObject is visible from the databaseViewingPoint.

Uses any LOS tests configured in myLineOfSightTestsToPerform. If viewingObject is specified, it 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).

Returns:
True if there is a clear line of sight.
virtual bool DtPhysicalWorld::checkLineOfSight ( const DtVector databaseViewingPoint,
const DtVrfObject targetObject,
bool terrainDataAvailable = 0 
) const [virtual]

Determines if targetObject is visible from the databaseViewingPoint.

Uses any LOS tests configured in myLineOfSightTestsToPerform. 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).

Returns:
True if there is a clear line of sight.
static void DtPhysicalWorld::objectAboutToBeRemovedCb ( DtVrfObject vrfObject,
void *  usr 
) [static]

Callback registered with DtVrfObjectManager for notification when objects are removed.

Calls processObjectAboutToBeRemoved().

Parameters:
vrfObjectPointer to object representing the route we're following.
usrPointer to instance of this class.
virtual void DtPhysicalWorld::expireDataLoadRequestsBeforeTime ( const double &  time) [virtual]
virtual void DtPhysicalWorld::addInitialLosChecks ( ) [protected, virtual]
virtual void DtPhysicalWorld::setDefaultLineOfSightTestOrder ( const DtRwNLengthStringVector lineOfSightTestsAndOrder) [protected, virtual]

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)

virtual void DtPhysicalWorld::setLineOfSightTestOrder ( const DtRwNLengthStringVector lineOfSightTestsAndOrder) [protected, virtual]
virtual void DtPhysicalWorld::addLineOfSightTest ( const DtLosTestKey ,
DtVrfLineOfSightFunctorSP  losTest 
) [protected, 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.

Note:
If a particular test already exists with the specified test key, it will be replaced by the new test
virtual void DtPhysicalWorld::removeLineOfSightTest ( const DtLosTestKey testKey) [protected, 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.

virtual void DtPhysicalWorld::performTest ( const DtLosTestKey testToRun) [protected, virtual]

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.

virtual void DtPhysicalWorld::doNotPerformTest ( const DtLosTestKey testToRun) [protected, virtual]

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.

virtual void DtPhysicalWorld::doNotPerformTest ( DtVrfLineOfSightFunctorSP  losTest) [protected, virtual]

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.

static bool DtPhysicalWorld::lineOfSightFilter ( const DtVrfObject object,
void *  usr 
) [static, protected]

Used by checkLineOfSight to determine which physical elements can block visibility.

virtual void DtPhysicalWorld::createFeatureSpecificationList ( DtVectorNetworkRecord vecNetworkRecord) const [protected, virtual]
virtual bool DtPhysicalWorld::checkLineOfSight ( const DtLineOfSightTestContainer losTests,
const DtVrfLineOfSightCheckParams losCheckParams 
) const [protected, virtual]

Runs all the tests in the specified list.

Returns:
True only if all tests return true.
virtual DtVector DtPhysicalWorld::localLineOfSightTestLocation ( const DtVrfObject object) const [protected, virtual]
Returns:
the local coordinate which is the line of sight test location for the specified object. This is the point which must be viewable in order for the object to be considered viewable. This implementation returns the center of the bounding volume of the object.
virtual bool DtPhysicalWorld::checkVrfObjectsForLOS ( const DtVrfLineOfSightCheckParams losCheckParams) const [protected, virtual]
Returns:
True if no VRF Objects block the sight line specified in losCheckParams.
virtual bool DtPhysicalWorld::checkVectorNetworkForLOS ( const DtVrfLineOfSightCheckParams losCheckParams) const [protected, virtual]
Returns:
True if no terrain vector features block the sight line specified in losCheckParams.
virtual bool DtPhysicalWorld::checkTerrainForLOS ( const DtVrfLineOfSightCheckParams losCheckParams) const [protected, virtual]
Returns:
True if no terrain polygons block the sight line specified in losCheckParams.
virtual bool DtPhysicalWorld::intersectVrfObjects ( const DtVrfObject primaryVrfObject,
const DtVector databaseStartPoint,
const DtVrfObject secondaryVrfObject 
) const [protected, virtual]
virtual bool DtPhysicalWorld::intersectsVrfObject ( const DtVrfObject vrfObjectToTest,
const DtVector databaseStartPoint,
const DtVector databaseEndPoint,
double &  distToIntersect 
) const [protected, virtual]
Returns:
True if there is a vrfObject blocking the specified line of sight (chord) If True is returned, distToIntersect will be set to the distance in chord length (0 to 1) of the first intersection point.
bool DtPhysicalWorld::testInvariant ( ) const [protected]
const DtChord DtPhysicalWorld::createWorldIntersectionChord ( const DtVector databaseLocation) const [protected]

Creates a very large chord in the up/down direction (of gravity) at the specified database location.

Returns:
A chord in the up/down direction at the specified database location.
Note:
The length of the chord is defined to be 100000 meters (hard coded) for now.

Accessors for the spatial DtVrfObject manager.

virtual void DtPhysicalWorld::setSpatialVrfObjectManager ( DtSpatialVrfObjectManagerInterface newSpatialVrfObjectMgr) [protected, virtual]
virtual DtPhysicalWorldParams* DtPhysicalWorld::createParameters ( ) [protected, virtual]
Returns:
A new instance of DtPhysicalWorldParams. If new parameters are used in a derived version of this class, override this method to return a derived version of DtPhysicalWorldParams.
Returns:
A new instance of DtSensorSignatureManager, ready to be used by this DtPhysicalWorld.
virtual void DtPhysicalWorld::processObjectAboutToBeRemoved ( DtVrfObject vrfObject) [protected, virtual]

Tells mySpatialVrfObjectManager to remove given object.

Parameters:
vrfObjectPointer to the object about to be removed from the object manager. May be any type of DtVrfObject (entity, aggregate, control object).
virtual void DtPhysicalWorld::performTerrainPreload ( ) [protected, virtual]

Queries local DtVrfObject instances for their desired terrain preload and passes the information to the DtTerrainInterface.


Friends And Related Function Documentation

friend class IntersectVrfObjectFunctor [friend]

Member Data Documentation

Shared list of visibility blocking objects.

Not owned, just used for reference.

Not owned, just used for reference.

Parameters for this physical world.

DtFilename DtPhysicalWorld::myPhysicalWorldFile [protected]

Referenced by physicalWorldFile().


The documentation for this class was generated from the following file:

Document ID: Generated on Fri Jun 29 16:33:32 EDT 2012 from SVN revision 116588
Copyright © 2005-2012 VT MÄK Inc. All Rights Reserved (www.mak.com)