VR-Forces 4.0.4 Class Documentation
Public Member Functions | Static Public Member Functions | Protected Member Functions | Static Protected Member Functions | Protected Attributes | Static Protected Attributes
DtVrfObject Class Reference

DtVrfObject is used to represent any type of simulated object (entities, aggregate, control objects) in a VR-Forces application. More...

Inheritance diagram for DtVrfObject:
Inheritance graph
[legend]

List of all members.

Public Types

typedef std::pair
< DtVrfObjectCallbackFunction,
void * > 
DtVrfObjectCallbackDataPair
 Definitions of container types used in the postInitFromParameters callback mechansim.
typedef std::pair< DtVrfObject
*, DtVrfObjectCallbackDataPair
DtVrfObjectCallbackDataPair2
 Definitions of container types used in the postInitFromParameters callback mechansim.

Public Member Functions

 DtVrfObject (const DtObjectType &objectType, DtVrfObjectManager *vrfObjectManager, bool createLocalObject=true, bool publishLocalObject=true, const DtEntityIdentifier &objectIdentifier=DtEntityIdentifier::nullId(), const DtGlobalObjectDesignator *globalId=0, DtReflectedObject *reflectedObject=0, const DtString &objectName=DtString::nullString(), const DtString &objectLabel=DtString::nullString(), DtForceType forceType=DtForceOther, const DtList *vertices=0, const DtTaitBryan *orientation=0, bool projection=false, bool closedFigure=false, const DtAppearance &appearance=DtAppearance::nullAppearance(), const DtString &readerWriterName="vrf-object", DtReaderWriterRegistry *parentRegistry=0)
virtual ~DtVrfObject ()
 destructor
virtual bool create ()
 Virtual construction - must be called before any other member functions are called.
virtual void createCommunicationsInterface ()
 Allows an external process to invoke creation of a communications interface, if myCommunicationInterface is NULL.
virtual void createCommunicationsInterface (const DtRadioDescriptorList &descList)
 Allows an external process to invoke creation of a communications interface, if myCommunicationInterface is NULL, and pass a radio descriptor list.
virtual void createSetDataManager ()
 Allows an external process to invoke creation of a DtSetDataManager, if mySetDataManager is NULL.
virtual bool init ()
 Initialization - must be called after create() and before any other member functions are called.
virtual void tick ()
 Called by create().
virtual bool createRepository (DtVrfObjectParameters *parameterEntry)
 Override createRepository() to check if repository created in base class version is a DtSimVrfObjectBaseStateRepository (or a derived type).
virtual bool createTaskManager ()
virtual bool createComponentManager ()
virtual bool createVrfObjectPlanManager ()
 Creates myVrfObjectPlanManager based on the type specified in mySubComponentTypes.
virtual bool createRadio ()
virtual const DtSimManagersimManager () const
 Get a pointer to our sim manager.
virtual DtSimManagersimManager ()
virtual DtSimTaskManagertaskManager () const
 Get pointers to our various types of subcomponents.
virtual DtSimComponentManagercomponentManager () const
virtual DtVrfObjectPlanManagervrfObjectPlanManager () const
virtual DtSimBaseRadioradio () const
virtual
DtVrfObjectStateRepository
vrfState () const
virtual DtExtent extent () const
 Returns the extent of the vrfObject, if the vrfObject has one.
virtual void expandExtent (DtExtent &extent) const
 If the vrfObject has geometry, and thus an extent, then this function expands the specified extent to include the vrfObjects extent.
virtual void sendVrfObjectCreated (unsigned long requestId=0)
 Create and send a DtVrfObjectCreated message about ourself.
virtual void setupFromMessageContent (DtIfModifyVrfObject *ifModVrfObject)
 Setup self from interface messages.
virtual bool isVrfSimulatedObject ()
 Returns true if object is being simulated by a VR-Forces-simulated object, false if not.
virtual void setIsVrfSimulatedObject (bool b)
virtual bool isSimulatingComponents () const
 returns true if object is simulating components VR-Forces components can be attached to non- VR-Forces entities.
virtual void putSelf (FILE *fp, int indentLevel=0, bool writeUnspecified=true, const DtFilename &path=DtReaderWriter::appPath())
 Override to write out <use-default> string for unspecified parameters.
virtual void getSelf (DtlObjPtr args, const DtFilename &searchPath, const DtVariableBindingsList &variableBindings)
 Override to do additional setup required when reading older oob, ovl files.
virtual bool setObjectName (const DtString &name, bool rename=true)
 Override to inform the vrfObjectManager when the name changes.
virtual void addNameAlias (const DtString &name)
 Adds a new string which can be used to reference this object by name.
virtual void unregisterAliases ()
 Unregisters all aliases with object manager and removes the aliases from the local alias list.
virtual void addVrfObjectChangedCallback (DtVrfObjectCallbackFunction function, void *userData)
 WARNING: These methods are obsolete but have been retained for backward compatibility.
virtual void removeVrfObjectChangedCallback (DtVrfObjectCallbackFunction function, void *userData)
virtual void addVrfObjectPredicateCallback (DtVrfObjectPredicateCallbackFunction function, const DtVrfObjectPredicate &predicate, DtTime evaluationPeriod=0, void *userData=0)
 Add/remove a callback function to be invoked when the DtVrfObject predicate object associated with it returns true().
virtual void removeVrfObjectPredicateCallback (DtVrfObjectPredicateCallbackFunction function, const DtVrfObjectPredicate &predicate, DtTime evaluationPeriod=0, void *userData=0)
virtual int predicateCallbackCount () const
 For testing.
virtual void invokeVrfObjectPredicateCallbacks ()
 Called each tick.
virtual void setCoordinateSystem (const Coordinate_System *coordinateSystem)
 Sets the coordinate system in mySimState (a DtVrfObjectStateRepository) and in myOvlVertices.
virtual const DtVrfObjectManagersimObjectManager () const
virtual DtVrfObjectManagersimObjectManager ()
virtual void setSimObjectManager (DtVrfObjectManager *simObjectManager)
virtual bool createNetInterface ()
virtual void setGlobalId (const DtGlobalObjectDesignator &id)
 Set/get the entity's global Id.
virtual const
DtGlobalObjectDesignator & 
globalId () const
virtual bool baseSetObjectName (const DtString &name)
 Set/get the name of the object.
virtual const DtStringobjectName () const
virtual const DtStringobjectLabel () const
 Set/get the label of the object.
virtual void setObjectLabel (const DtString &objectLabel)
virtual const DtStringoverlayParent () const
 Set/get the overlay parent of the object.
virtual void setOverlayParent (const DtString &overlayParent)
virtual DtStateRepository * netState ()
 VR-Link network state repository.
virtual const DtStateRepository * netState () const
virtual DtSimObjectNetInterfacenetInterface ()
 VR-Forces network interface.
virtual const
DtSimObjectNetInterface
netInterface () const
virtual void setNetInterface (DtSimObjectNetInterface *netInterface)
virtual void setObjectIdentifier (const DtEntityIdentifier &objectId)
 Set/get the object identifier (DIS/RPR site:host:entity).
virtual const DtEntityIdentifier & objectIdentifier () const
virtual bool isLocal () const
 Returns true if object is local (has the same simulation address as the manager), false if not.
virtual DtString type () const
 set by factory on creation
virtual DtString objectClassType () const
virtual void setObjectClassType (const DtString &objectClassType)
 same as type()
virtual void clearVerticesChangedCallbacks ()
 Clear out vertices changed callback list.
virtual void clearRelativeVerticesChangedCallbacks ()
 Clear out relative vertices changed callback list.
virtual void clearPredicateCallbacks ()
 Clear out object predicate callback list.
virtual
DtSimObjectStateRepository
simState ()
virtual const
DtSimObjectStateRepository
simState () const
virtual void setSimState (DtVrfObjectStateRepository *simState)
void setEntityType (const DtEntityType &entityType)
const DtEntityType & entityType () const
void setDestroyed (bool destroyed)
bool isDestroyed () const
virtual void place (const DtVector &location, bool *dataAvailable=0, bool requireAllData=false)
 place entity at 'location', on the ground, keeping its current heading
virtual void place (const DtReal heading, bool *dataAvailable=0, bool requireAllData=false)
 give entity the specified 'heading', but stay at its current location
virtual void place (const DtVector &location, const DtReal heading, bool *dataAvailable=0, bool requireAllData=false)
 place entity at specified 'location' and 'heading' on the ground
const DtStringechelonIdString () const
virtual DtVrfObjectleadEntity () const
virtual const DtStringfirstSubordinate () const
virtual const DtStringlastSubordinate () const
virtual const DtStringfirstHealthySubordinate () const
 Returns first healthy subordinate if it exists, 0 if not.
virtual void echelonIdChanged ()
virtual const DtObjectId & objectId () const
virtual const DtObjectTypeobjectType () const
virtual bool isEmbarked () const
virtual bool isEmbarkedOn (const DtString &parent) const
DtAttachedTerrainterrainAttachedTo ()
const DtAttachedTerrainterrainAttachedTo () const
virtual const DtPhysicalWorldphysicalWorld () const
virtual DtPhysicalWorldphysicalWorld ()
void setAboutToBeRemoved (bool)
 Set to true when object is about to be removed.
bool aboutToBeRemoved () const
virtual DtSetDataManagersetDataManager ()
virtual
DtVrfObjectCommunicationInterface
communicationInterface ()
virtual
DtVrfObjectTerrainPreloadManager
terrainPreloadManager ()
DtVrfObjectSubComponentTypesvrfSubComponentTypes () const
 For use in virtual construction.
virtual bool hasPlan () const
virtual bool executingPlan () const
virtual bool isCurrentlyTasked () const
virtual DtU8 getNextEmitterSystemId ()
virtual void addVerticesChangedCallback (DtVrfObjectCallbackFunction function, void *userData)
 Adds/removes a callback to be invoked whenever an object's local vertices change.
virtual void removeVerticesChangedCallback (DtVrfObjectCallbackFunction function, void *userData)
 Adds/removes a callback to be invoked whenever an object's local vertices change.
virtual void addRelativeVerticesChangedCallback (DtVrfObjectCallbackFunction function, void *userData)
 Adds/removes a callback to be invoked whenever an object's relative vertices change.
virtual void removeRelativeVerticesChangedCallback (DtVrfObjectCallbackFunction function, void *userData)
 Adds/removes a callback to be invoked whenever an object's relative vertices change.
virtual void setPublishObject (bool publishObject)
 Set/get flag indicating whether or not object should be published.
virtual bool publishObject () const
 Set/get flag indicating whether or not object should be published.
virtual DtOutputStream & objectConsoleDebug () const
virtual DtOutputStream & objectConsoleVerbose () const
virtual DtOutputStream & objectConsoleInfo () const
virtual DtOutputStream & objectConsoleWarn () const
virtual DtOutputStream & objectConsoleError () const
virtual DtObjectConsoleobjectConsole ()
 Returns a pointer to the object console member of this object.
virtual const DtObjectConsoleobjectConsole () const
 Returns a pointer to the object console member of this object.
virtual void addPostInitFromParamsCallback (DtVrfObjectCallbackFunction fcn, void *usr)
 Add/remove callback function to be invoked immediately following the point at which the newly created object gets initialized from its parameter entry.
virtual void removePostInitFromParamsCallback (DtVrfObjectCallbackFunction fcn, void *usr)
 Add/remove callback function to be invoked immediately following the point at which the newly created object gets initialized from its parameter entry.
virtual void addObjectAboutToBeRemovedCallback (DtVrfObjectCallbackList::DtCallbackFunctionType fcn, void *usr)
 Callback that is invoked when the entity is about to be removed from the simulation.
virtual void removeObjectAboutToBeRemovedCallback (DtVrfObjectCallbackList::DtCallbackFunctionType fcn, void *usr)
 Callback that is invoked when the entity is about to be removed from the simulation.
virtual void invokeVrfObjectAboutToBeRemovedCallbacks ()
 Callback that is invoked when the entity is about to be removed from the simulation.

Static Public Member Functions

static void addSimObjectCreatorFcn (const DtString &type, DtSimObjectCreatorFcn fcn)
static DtSimObjectFactoryfactory ()
 a DtSimObjectFactory is allocated by the DtSimCreator, and this pointer is set.
static void setFactory (DtSimObjectFactory *factory)
static void setDefaultNotifyLevel (DtNotifyLevelType level)
 Sets the notify level for all object consoles.
static DtNotifyLevelType defaultNotifyLevel ()
static DtVrfObjectcreator (const DtObjectType &objectType, DtVrfObjectManager *simObjectManager, bool createLocalObject=true, bool publishLocalObject=true, const DtEntityIdentifier &objectIdentifier=DtEntityIdentifier::nullId(), const DtGlobalObjectDesignator *globalId=0, DtReflectedObject *reflectedObject=0, const DtString &objectName=DtString::nullString(), const DtString &objectLabel=DtString::nullString(), DtForceType forceType=DtForceOther, const DtList *vertices=0, const DtTaitBryan *orientation=0, bool projection=false, bool closedFigure=false, const DtAppearance &appearance=DtAppearance::nullAppearance(), const DtString &readerWriterName=DtString::nullString(), DtReaderWriterRegistry *parentRegistry=0)
 Returns a newly created DtVrfObject.
static DtVrfObjectcreateObject (const DtObjectType &objectType, DtVrfObjectManager *vrfObjectManager, const DtString &classType, bool createLocalObject=true, bool publishLocalObject=true, const DtEntityIdentifier &objectIdentifier=DtEntityIdentifier::nullId(), const DtGlobalObjectDesignator *globalId=0, DtReflectedObject *reflectedObject=0, const DtString &objectName=DtString::nullString(), const DtString &objectLabel=DtString::nullString(), DtForceType forceType=DtForceOther, const DtList *vertices=0, const DtTaitBryan *orientation=0, bool projection=false, bool closedFigure=false, const DtAppearance &appearance=DtAppearance::nullAppearance(), const DtString &readerWriterName=DtString::nullString(), DtReaderWriterRegistry *parentRegistry=0)
 Create and initialize a new sim object, using the factory.
static DtVrfObjectcreateObject (const DtObjectType &objectType, DtVrfObjectManager *vrfObjectManager, const DtString &classType, bool createLocalObject=true, bool publishLocalObject=true, const DtEntityIdentifier &objectIdentifier=DtEntityIdentifier::nullId(), const DtGlobalObjectDesignator *globalId=0, DtReflectedObject *reflectedObject=0, const DtString &objectName=DtString::nullString(), const DtString &objectLabel=DtString::nullString(), DtForceType forceType=DtForceOther, const DtVector &location=DtVector::zero(), const DtTaitBryan *orientation=0, bool projection=false, bool closedFigure=false, const DtAppearance &appearance=DtAppearance::nullAppearance(), const DtString &readerWriterName=DtString::nullString(), DtReaderWriterRegistry *parentRegistry=0)
 Create and initialize a new sim object, using the factory.
static DtVrfObjectcreateAndInit (DtVrfObjectManager *vrfObjectManager, DtlObjPtr mtlStream)
 Create and initialize a new sim object from a mtl stream.
static void verticesChangedCallback (DtVrfObject *obj, DtVrfObjectPredicateEvaluator *predicateEval, void *userData)
 Invokes all vertices-changed callbacks that have registered with the object.
static void relativeVerticesChangedCallback (DtVrfObject *obj, DtVrfObjectPredicateEvaluator *predicateEval, void *userData)
 Invokes all relative-vertices-changed callbacks.
static void postInitFromParamsCallback (DtVrfObjectStateRepository &stateRepository, void *usr)
 Callback function registered with object's state repository.

Protected Member Functions

 DtVrfObject ()
 Abstract base classes should not be constructed.
 DtVrfObject (const DtVrfObject &orig)
 copy constructor
DtVrfObjectoperator= (const DtVrfObject &orig)
 assignment operator
virtual void setupStateRepository ()
 Called by init() after state repository's init() has been called.
virtual void setupNetInterface ()
 Called by init() after net interface's init() has been called.
void emptyVertexList ()
 Non virtual utility function - called in destructor.
void copyVertexList (const DtList &orig)
 Non-virtual utility function called in constructor.
virtual void validateObjectType ()
 Validates the object type to make sure there are no -1s in the object type.
virtual void processPostInitFromParamsCallback (DtVrfObjectCallbackFunction fcn, void *usr)
 Invokes callback added through a call to addPostInitFromParamsCallback.
virtual void initializeCommunicationInterfaceCallbacks ()
 Adds admin content callback registration.
virtual void processSetOverlayLayerTask (const DtVrfObjectMessage *msg)

Static Protected Member Functions

static void setOverlayLayerTaskCallback (const DtVrfObjectMessage *msg, void *usr)

Protected Attributes

DtRwString myObjectClassType
DtEntityIdentifier myObjectIdentifier
DtRwObjectType myObjectType
 passed in to constructor, held for SR construction
DtRwString myObjectName
DtRwString myObjectLabel
DtRwString myOverlayParent
DtGlobalObjectDesignator myGlobalId
DtVrfObjectManagermySimObjectManager
DtVrfObjectStateRepositorymySimState
DtSimObjectNetInterfacemyNetInterface
DtRwBoolean myPublishObject
bool myCreateLocalObject
 isLocal() used to check simulation address against object identifier to see if this was a local object, but myCreateLocalObject should already contain this information
bool myIsVrfSimulatedObject
 Returns true if this is a vrf simulated object.
DtReflectedObject * myReflectedObject
 Passed into constructor - held only to pass into create() function for virtual construction.
DtForceType myForceType
DtList myVertices
DtTaitBryan myOrientation
bool myProjection
bool myClosedFigure
DtAppearance myAppearance
DtVrfObjectSubComponentTypesmySubComponentTypes
 Used in create().
DtSimManagermySimManager
DtSimTaskManagermyTaskManager
DtSimBaseRadiomyRadio
DtSimComponentManagermyComponentManager
DtVrfObjectPlanManagermyVrfObjectPlanManager
DtLocalVertexList myOvlVertices
 The following member data are backward compatible reading of ovl files No accessors/mutators provided.
DtRwVector myOvlTargetLocation
DtRwVector myOvlStartPoint
DtRwVector myOvlEndPoint
DtObstacleAreaCompatilibility myOvlObstacleArea
DtRwBoolean myOvlObstacleIsBreached
DtList myPredicateCallbackList
 List of predicate function callbacks.
DtList myVerticesChangedCallbackList
 List of DtSimObjectCallbackFunction's, to be invoked when the object's position changes.
DtList myRelativeVerticesChangedCallbackList
 List of DtSimObjectCallbackFunction's, to be invoked when the object's relative position changes.
DtVrfObjectCallbackList myAboutToBeRemovedCallbackList
DtList myNameAliasList
bool myAboutToBeRemoved
 Set to true if this object is about to be removed from the object manager list.
DtObjectConsolemyObjectConsole
DtSetDataManagermySetDataManager
DtVrfObjectCommunicationInterfacemyCommunicationInterface
DtU8 myNextEmitterSystemId
DtVrfObjectTerrainPreloadManagermyTerrainPreloadManager

Static Protected Attributes

static DtSimObjectFactorytheFactory
static int theDefaultNotifyLevel
virtual void processReadDRThresholdSettings (const DtSettingsObject *settings)
 Callback function registered with the DtVrfSimSettings class.
static void readDRThresholdSettingsCallback (const DtSettingsObject *settings, void *usr)
 Callback function registered with the DtVrfSimSettings class.

Detailed Description

DtVrfObject is used to represent any type of simulated object (entities, aggregate, control objects) in a VR-Forces application.

It has the following elements:


Member Typedef Documentation

Definitions of container types used in the postInitFromParameters callback mechansim.

Definitions of container types used in the postInitFromParameters callback mechansim.


Constructor & Destructor Documentation

DtVrfObject::DtVrfObject ( ) [protected]

Abstract base classes should not be constructed.

DtVrfObject::DtVrfObject ( const DtObjectType objectType,
DtVrfObjectManager vrfObjectManager,
bool  createLocalObject = true,
bool  publishLocalObject = true,
const DtEntityIdentifier &  objectIdentifier = DtEntityIdentifier::nullId(),
const DtGlobalObjectDesignator *  globalId = 0,
DtReflectedObject *  reflectedObject = 0,
const DtString objectName = DtString::nullString(),
const DtString objectLabel = DtString::nullString(),
DtForceType  forceType = DtForceOther,
const DtList *  vertices = 0,
const DtTaitBryan *  orientation = 0,
bool  projection = false,
bool  closedFigure = false,
const DtAppearance &  appearance = DtAppearance::nullAppearance(),
const DtString readerWriterName = "vrf-object",
DtReaderWriterRegistry parentRegistry = 0 
)
virtual DtVrfObject::~DtVrfObject ( ) [virtual]

destructor

DtVrfObject::DtVrfObject ( const DtVrfObject orig) [protected]

copy constructor


Member Function Documentation

virtual bool DtVrfObject::create ( ) [virtual]

Virtual construction - must be called before any other member functions are called.

virtual void DtVrfObject::createCommunicationsInterface ( ) [virtual]

Allows an external process to invoke creation of a communications interface, if myCommunicationInterface is NULL.

virtual void DtVrfObject::createCommunicationsInterface ( const DtRadioDescriptorList descList) [virtual]

Allows an external process to invoke creation of a communications interface, if myCommunicationInterface is NULL, and pass a radio descriptor list.

virtual void DtVrfObject::createSetDataManager ( ) [virtual]

Allows an external process to invoke creation of a DtSetDataManager, if mySetDataManager is NULL.

virtual bool DtVrfObject::init ( ) [virtual]

Initialization - must be called after create() and before any other member functions are called.

virtual void DtVrfObject::tick ( ) [virtual]

Called by create().

Ticks object's organization manager, task manager, and component manager, and then calls down to base class tick. Calls invokeVrfObjectPredicateCallbacks.

virtual bool DtVrfObject::createRepository ( DtVrfObjectParameters parameterEntry) [virtual]

Override createRepository() to check if repository created in base class version is a DtSimVrfObjectBaseStateRepository (or a derived type).

If it is, returns true, if not Returns false.

virtual bool DtVrfObject::createTaskManager ( ) [virtual]

Creates myVrfObjectPlanManager based on the type specified in mySubComponentTypes.

virtual bool DtVrfObject::createRadio ( ) [virtual]
virtual const DtSimManager* DtVrfObject::simManager ( ) const [virtual]

Get a pointer to our sim manager.

virtual DtSimManager* DtVrfObject::simManager ( ) [virtual]
virtual DtSimTaskManager* DtVrfObject::taskManager ( ) const [virtual]

Get pointers to our various types of subcomponents.

virtual DtSimBaseRadio* DtVrfObject::radio ( ) const [virtual]
virtual DtVrfObjectStateRepository* DtVrfObject::vrfState ( ) const [virtual]
virtual DtExtent DtVrfObject::extent ( ) const [virtual]

Returns the extent of the vrfObject, if the vrfObject has one.

If the vrfObject does not have an extent, and uninitialized extent is returned.

Implementation Detail: The extent is determined by transforming the vrfObjects local bounding volume to it's current location/orientation and then fitting an axis-aligned extent around the resulting world bounding volume.

virtual void DtVrfObject::expandExtent ( DtExtent extent) const [virtual]

If the vrfObject has geometry, and thus an extent, then this function expands the specified extent to include the vrfObjects extent.

See the DtSsExtentIntersector for more information on why this function is necessary.

virtual void DtVrfObject::sendVrfObjectCreated ( unsigned long  requestId = 0) [virtual]

Create and send a DtVrfObjectCreated message about ourself.

requestId is the requestId to be used in the message (request Ids are used to link a DtIfVrfCreated message to a DtCreateVrfObject message).

virtual void DtVrfObject::setupFromMessageContent ( DtIfModifyVrfObject ifModVrfObject) [virtual]

Setup self from interface messages.

virtual bool DtVrfObject::isVrfSimulatedObject ( ) [virtual]

Returns true if object is being simulated by a VR-Forces-simulated object, false if not.

virtual void DtVrfObject::setIsVrfSimulatedObject ( bool  b) [virtual]
virtual bool DtVrfObject::isSimulatingComponents ( ) const [virtual]

returns true if object is simulating components VR-Forces components can be attached to non- VR-Forces entities.

In that case a call to isLocal() will be false, and a call to isVrfSimulatedObject() might be true. Neither will indicate if the components are being simulated on this back end. Method isSimulatingComponents() will interrogate the component manager. The presence of components in the component manager indicates that this back end is responsible for handling ride-along attachment.

virtual void DtVrfObject::putSelf ( FILE *  fp,
int  indentLevel = 0,
bool  writeUnspecified = true,
const DtFilename &  path = DtReaderWriter::appPath() 
) [virtual]

Override to write out <use-default> string for unspecified parameters.

Reimplemented from DtReaderWriter.

virtual void DtVrfObject::getSelf ( DtlObjPtr  args,
const DtFilename &  searchPath,
const DtVariableBindingsList variableBindings 
) [virtual]

Override to do additional setup required when reading older oob, ovl files.

virtual bool DtVrfObject::setObjectName ( const DtString name,
bool  rename = true 
) [virtual]

Override to inform the vrfObjectManager when the name changes.

Returns true if successful. Names which are too long may cause a failure, see baseSetObjectName(). If the baseSetObjectName() fails and rename is true, this function generates the next standard name for the object, calls baseSetObjectName with that name and then returns false. If rename is false when the set name fails, the name is left unchanged and the function returns false.

virtual void DtVrfObject::addNameAlias ( const DtString name) [virtual]

Adds a new string which can be used to reference this object by name.

The object will register the alias with the ObjectManager.

virtual void DtVrfObject::unregisterAliases ( ) [virtual]

Unregisters all aliases with object manager and removes the aliases from the local alias list.

virtual void DtVrfObject::addVrfObjectChangedCallback ( DtVrfObjectCallbackFunction  function,
void *  userData 
) [virtual]

WARNING: These methods are obsolete but have been retained for backward compatibility.

These methods may be removed in a future release. If you are testing for changes in an object's vertices, then the methods addVerticesChangedCallback and removeVerticesChangedCallback should be used instead. These methods are now equivalent to the {add/remove}VerticesChangedCallback functions. If you need to check for changes to the object other than/in addition to changes to vertices, then define your own DtVrfObjectPredicate function, and register a callback associated with that predicate object using the addVrfObjectPredicateCallback function.

Register/remove a callback function to be invoked when the object changes.

virtual void DtVrfObject::removeVrfObjectChangedCallback ( DtVrfObjectCallbackFunction  function,
void *  userData 
) [virtual]
virtual void DtVrfObject::addVerticesChangedCallback ( DtVrfObjectCallbackFunction  function,
void *  userData 
) [virtual]

Adds/removes a callback to be invoked whenever an object's local vertices change.

If an object is attached to another object, this callback will be called for every movement of the parent object. If you desire callbacks invoked only on modification of the geometry, use addRelativeVerticesChangedCallback().

virtual void DtVrfObject::removeVerticesChangedCallback ( DtVrfObjectCallbackFunction  function,
void *  userData 
) [virtual]

Adds/removes a callback to be invoked whenever an object's local vertices change.

If an object is attached to another object, this callback will be called for every movement of the parent object. If you desire callbacks invoked only on modification of the geometry, use addRelativeVerticesChangedCallback().

virtual void DtVrfObject::addRelativeVerticesChangedCallback ( DtVrfObjectCallbackFunction  function,
void *  userData 
) [virtual]

Adds/removes a callback to be invoked whenever an object's relative vertices change.

I.e: A route attached to a moving object will have its local vertices changing, but not it's relative vertices.

virtual void DtVrfObject::removeRelativeVerticesChangedCallback ( DtVrfObjectCallbackFunction  function,
void *  userData 
) [virtual]

Adds/removes a callback to be invoked whenever an object's relative vertices change.

I.e: A route attached to a moving object will have its local vertices changing, but not it's relative vertices.

virtual void DtVrfObject::addVrfObjectPredicateCallback ( DtVrfObjectPredicateCallbackFunction  function,
const DtVrfObjectPredicate predicate,
DtTime  evaluationPeriod = 0,
void *  userData = 0 
) [virtual]

Add/remove a callback function to be invoked when the DtVrfObject predicate object associated with it returns true().

virtual void DtVrfObject::removeVrfObjectPredicateCallback ( DtVrfObjectPredicateCallbackFunction  function,
const DtVrfObjectPredicate predicate,
DtTime  evaluationPeriod = 0,
void *  userData = 0 
) [virtual]
virtual int DtVrfObject::predicateCallbackCount ( ) const [virtual]

For testing.

Returns the number of predicate callbacks registered with this object.

Called each tick.

Iterates through myPredicateCallbackList, calling the predicate object's isTrue() function. If it time to test the predicate (isTimeToTest()) and the predicate's isTrue() function returns true, it invokes the associated callback function.

virtual void DtVrfObject::setCoordinateSystem ( const Coordinate_System coordinateSystem) [virtual]

Sets the coordinate system in mySimState (a DtVrfObjectStateRepository) and in myOvlVertices.

virtual const DtVrfObjectManager* DtVrfObject::simObjectManager ( ) const [virtual]
virtual void DtVrfObject::setSimObjectManager ( DtVrfObjectManager simObjectManager) [virtual]
virtual bool DtVrfObject::createNetInterface ( ) [virtual]
virtual void DtVrfObject::setGlobalId ( const DtGlobalObjectDesignator &  id) [virtual]

Set/get the entity's global Id.

The global Id can be used to uniquely identify an entity across all other applications/federates. Under HLA/RPR, DtGlobalObjectDesignator is typdef'd to a DtString, and under DIS, it is typedef'd to a DtObjectId.

virtual const DtGlobalObjectDesignator& DtVrfObject::globalId ( ) const [virtual]
virtual bool DtVrfObject::baseSetObjectName ( const DtString name) [virtual]

Set/get the name of the object.

Returns true if the name set was successful. Since there are length restrictions on the name (depending on the type of net interface and protocol being used) name setting may fail.

virtual const DtString& DtVrfObject::objectName ( ) const [virtual]
virtual const DtString& DtVrfObject::objectLabel ( ) const [virtual]

Set/get the label of the object.

virtual void DtVrfObject::setObjectLabel ( const DtString objectLabel) [virtual]
virtual const DtString& DtVrfObject::overlayParent ( ) const [virtual]

Set/get the overlay parent of the object.

virtual void DtVrfObject::setOverlayParent ( const DtString overlayParent) [virtual]
virtual DtStateRepository* DtVrfObject::netState ( ) [virtual]

VR-Link network state repository.

virtual const DtStateRepository* DtVrfObject::netState ( ) const [virtual]

VR-Forces network interface.

virtual const DtSimObjectNetInterface* DtVrfObject::netInterface ( ) const [virtual]
virtual void DtVrfObject::setNetInterface ( DtSimObjectNetInterface netInterface) [virtual]
virtual void DtVrfObject::setObjectIdentifier ( const DtEntityIdentifier &  objectId) [virtual]

Set/get the object identifier (DIS/RPR site:host:entity).

virtual const DtEntityIdentifier& DtVrfObject::objectIdentifier ( ) const [virtual]
virtual bool DtVrfObject::isLocal ( ) const [virtual]

Returns true if object is local (has the same simulation address as the manager), false if not.

virtual void DtVrfObject::setPublishObject ( bool  publishObject) [virtual]

Set/get flag indicating whether or not object should be published.

Note:
This will not cause the object to become or stop publishing after the object has been created.
virtual bool DtVrfObject::publishObject ( ) const [virtual]

Set/get flag indicating whether or not object should be published.

Note:
This will not cause the object to become or stop publishing after the object has been created.
virtual DtString DtVrfObject::type ( ) const [virtual]

set by factory on creation

virtual DtString DtVrfObject::objectClassType ( ) const [virtual]
virtual void DtVrfObject::setObjectClassType ( const DtString objectClassType) [virtual]

same as type()

virtual void DtVrfObject::clearVerticesChangedCallbacks ( ) [virtual]

Clear out vertices changed callback list.

Should only be called by the DtVrfObjectManager, upon queuing object for removal and deletion.

Clear out relative vertices changed callback list.

Should only be called by the DtVrfObjectManager, upon queuing object for removal and deletion.

virtual void DtVrfObject::clearPredicateCallbacks ( ) [virtual]

Clear out object predicate callback list.

Should only be called by the DtVrfObjectManager, upon queuing object for removal and deletion.

static void DtVrfObject::addSimObjectCreatorFcn ( const DtString type,
DtSimObjectCreatorFcn  fcn 
) [static]

a DtSimObjectFactory is allocated by the DtSimCreator, and this pointer is set.

The DtSimCreator deletes this pointer when it is deleted. This is done this way because we don't allow static initialization

Reimplemented from DtReaderWriter.

static void DtVrfObject::setFactory ( DtSimObjectFactory factory) [static]
virtual const DtSimObjectStateRepository* DtVrfObject::simState ( ) const [virtual]
virtual void DtVrfObject::setSimState ( DtVrfObjectStateRepository simState) [virtual]
void DtVrfObject::setEntityType ( const DtEntityType &  entityType)
const DtEntityType& DtVrfObject::entityType ( ) const
void DtVrfObject::setDestroyed ( bool  destroyed)
virtual void DtVrfObject::place ( const DtVector location,
bool dataAvailable = 0,
bool  requireAllData = false 
) [virtual]

place entity at 'location', on the ground, keeping its current heading

Parameters:
Input
locationnew location for the entity
requireAllDataif true and dataAvailable is also specified this call will not make any changes to the entity unless all intersections have terrain data available.
Output
dataAvailableprevents the call from blocking due to terrain paging and will get a true value if the terrain intersections are successful. See DtVrfMovingObjectStateRepository::clampToGround for more information.
virtual void DtVrfObject::place ( const DtReal  heading,
bool dataAvailable = 0,
bool  requireAllData = false 
) [virtual]

give entity the specified 'heading', but stay at its current location

Parameters:
Input
headingnew heading for the entity
requireAllDataif true and dataAvailable is also specified this call will not make any changes to the entity unless all intersections have terrain data available.
Output
dataAvailableprevents the call from blocking due to terrain paging and will get a true value if the terrain intersections are successful. See DtVrfMovingObjectStateRepository::clampToGround for more information.
virtual void DtVrfObject::place ( const DtVector location,
const DtReal  heading,
bool dataAvailable = 0,
bool  requireAllData = false 
) [virtual]

place entity at specified 'location' and 'heading' on the ground

Parameters:
Input
locationnew location for the entity
headingnew heading for the entity
requireAllDataif true and dataAvailable is also specified this call will not make any changes to the entity unless all intersections have terrain data available.
Output
dataAvailableprevents the call from blocking due to terrain paging and will get a true value if the terrain intersections are successful. See DtVrfMovingObjectStateRepository::clampToGround for more information.
virtual DtVrfObject* DtVrfObject::leadEntity ( ) const [virtual]
virtual const DtString& DtVrfObject::firstSubordinate ( ) const [virtual]
virtual const DtString& DtVrfObject::lastSubordinate ( ) const [virtual]
virtual const DtString& DtVrfObject::firstHealthySubordinate ( ) const [virtual]

Returns first healthy subordinate if it exists, 0 if not.

virtual void DtVrfObject::echelonIdChanged ( ) [inline, virtual]
virtual const DtObjectId& DtVrfObject::objectId ( ) const [virtual]
virtual const DtObjectType& DtVrfObject::objectType ( ) const [virtual]
virtual bool DtVrfObject::isEmbarked ( ) const [virtual]
Returns:
True if the state repository has a parent attachment
virtual bool DtVrfObject::isEmbarkedOn ( const DtString parent) const [virtual]
Returns:
True if this entity is embarked on the parent, or is embarked on something that is embarked on the parent
virtual const DtPhysicalWorld* DtVrfObject::physicalWorld ( ) const [virtual]
void DtVrfObject::setAboutToBeRemoved ( bool  b) [inline]

Set to true when object is about to be removed.

References myAboutToBeRemoved.

bool DtVrfObject::aboutToBeRemoved ( ) const [inline]

References myAboutToBeRemoved.

virtual DtOutputStream& DtVrfObject::objectConsoleDebug ( ) const [virtual]
Returns:
The stream that is routed to the object's console.
virtual DtOutputStream& DtVrfObject::objectConsoleVerbose ( ) const [virtual]
Returns:
The stream that is routed to the object's console.
virtual DtOutputStream& DtVrfObject::objectConsoleInfo ( ) const [virtual]
Returns:
The stream that is routed to the object's console.
virtual DtOutputStream& DtVrfObject::objectConsoleWarn ( ) const [virtual]
Returns:
The stream that is routed to the object's console.
virtual DtOutputStream& DtVrfObject::objectConsoleError ( ) const [virtual]
Returns:
The stream that is routed to the object's console.

Returns a pointer to the object console member of this object.

virtual const DtObjectConsole* DtVrfObject::objectConsole ( ) const [virtual]

Returns a pointer to the object console member of this object.

Returns:
The DtSetDataManager for this object. Any part of the object wishing notification of a set data request should register with this manager instead of registering directly with the radio. Any set data request can be invoked on the entity by passing it into this manager.
Returns:
The DtVrfObjectCommunicationInterface for this object. This is the central point for all processing of messages to/from this object, whether they are though a radio or though the internal communication mechanism of VR-Forces.
Returns:
The terrain preload manager for this object. Use this to register providers which have data to help determine what parts of the terrain will be needed by this object in the near future.

For use in virtual construction.

Casts mySubComponentTypes to derived type.

virtual bool DtVrfObject::hasPlan ( ) const [virtual]
Returns:
True if this object has a plan associated with it. Does not mean the entity is executing the plan. Use executingPlan() for this.
virtual bool DtVrfObject::executingPlan ( ) const [virtual]
Returns:
True if the object is currently executing it's plan.
virtual bool DtVrfObject::isCurrentlyTasked ( ) const [virtual]
Returns:
True if this object is currently tasked
virtual void DtVrfObject::addPostInitFromParamsCallback ( DtVrfObjectCallbackFunction  fcn,
void *  usr 
) [virtual]

Add/remove callback function to be invoked immediately following the point at which the newly created object gets initialized from its parameter entry.

The call to add a callback must be called before DtVrfObject::init gets called.

virtual void DtVrfObject::removePostInitFromParamsCallback ( DtVrfObjectCallbackFunction  fcn,
void *  usr 
) [virtual]

Add/remove callback function to be invoked immediately following the point at which the newly created object gets initialized from its parameter entry.

The call to add a callback must be called before DtVrfObject::init gets called.

virtual DtU8 DtVrfObject::getNextEmitterSystemId ( ) [virtual]
Returns:
A new integer emitter system ID that has not been returned previously from this function, on an object-by-object basis. : This ID is not saved, so it will start from 0 after the scenario is loaded.
static void DtVrfObject::setDefaultNotifyLevel ( DtNotifyLevelType  level) [static]

Sets the notify level for all object consoles.

static DtNotifyLevelType DtVrfObject::defaultNotifyLevel ( ) [static]
Returns:
The current default notification level.
static DtVrfObject* DtVrfObject::creator ( const DtObjectType objectType,
DtVrfObjectManager simObjectManager,
bool  createLocalObject = true,
bool  publishLocalObject = true,
const DtEntityIdentifier &  objectIdentifier = DtEntityIdentifier::nullId(),
const DtGlobalObjectDesignator *  globalId = 0,
DtReflectedObject *  reflectedObject = 0,
const DtString objectName = DtString::nullString(),
const DtString objectLabel = DtString::nullString(),
DtForceType  forceType = DtForceOther,
const DtList *  vertices = 0,
const DtTaitBryan *  orientation = 0,
bool  projection = false,
bool  closedFigure = false,
const DtAppearance &  appearance = DtAppearance::nullAppearance(),
const DtString readerWriterName = DtString::nullString(),
DtReaderWriterRegistry parentRegistry = 0 
) [static]

Returns a newly created DtVrfObject.

This is the function that gets registered with the factory.

static DtVrfObject* DtVrfObject::createObject ( const DtObjectType objectType,
DtVrfObjectManager vrfObjectManager,
const DtString classType,
bool  createLocalObject = true,
bool  publishLocalObject = true,
const DtEntityIdentifier &  objectIdentifier = DtEntityIdentifier::nullId(),
const DtGlobalObjectDesignator *  globalId = 0,
DtReflectedObject *  reflectedObject = 0,
const DtString objectName = DtString::nullString(),
const DtString objectLabel = DtString::nullString(),
DtForceType  forceType = DtForceOther,
const DtList *  vertices = 0,
const DtTaitBryan *  orientation = 0,
bool  projection = false,
bool  closedFigure = false,
const DtAppearance &  appearance = DtAppearance::nullAppearance(),
const DtString readerWriterName = DtString::nullString(),
DtReaderWriterRegistry parentRegistry = 0 
) [static]

Create and initialize a new sim object, using the factory.

static DtVrfObject* DtVrfObject::createObject ( const DtObjectType objectType,
DtVrfObjectManager vrfObjectManager,
const DtString classType,
bool  createLocalObject = true,
bool  publishLocalObject = true,
const DtEntityIdentifier &  objectIdentifier = DtEntityIdentifier::nullId(),
const DtGlobalObjectDesignator *  globalId = 0,
DtReflectedObject *  reflectedObject = 0,
const DtString objectName = DtString::nullString(),
const DtString objectLabel = DtString::nullString(),
DtForceType  forceType = DtForceOther,
const DtVector location = DtVector::zero(),
const DtTaitBryan *  orientation = 0,
bool  projection = false,
bool  closedFigure = false,
const DtAppearance &  appearance = DtAppearance::nullAppearance(),
const DtString readerWriterName = DtString::nullString(),
DtReaderWriterRegistry parentRegistry = 0 
) [static]

Create and initialize a new sim object, using the factory.

static DtVrfObject* DtVrfObject::createAndInit ( DtVrfObjectManager vrfObjectManager,
DtlObjPtr  mtlStream 
) [static]

Create and initialize a new sim object from a mtl stream.

static void DtVrfObject::verticesChangedCallback ( DtVrfObject obj,
DtVrfObjectPredicateEvaluator predicateEval,
void *  userData 
) [static]

Invokes all vertices-changed callbacks that have registered with the object.

Updates the predicate's (DtLclVerticesNotEqualPredicate) vertices.

static void DtVrfObject::relativeVerticesChangedCallback ( DtVrfObject obj,
DtVrfObjectPredicateEvaluator predicateEval,
void *  userData 
) [static]

Invokes all relative-vertices-changed callbacks.

static void DtVrfObject::postInitFromParamsCallback ( DtVrfObjectStateRepository stateRepository,
void *  usr 
) [static]

Callback function registered with object's state repository.

Gets called immediately after DtVrfObjectStateRepository::initializeFromParameters gets called. Calls processPostInitFromParamsCallback.

static void DtVrfObject::readDRThresholdSettingsCallback ( const DtSettingsObject settings,
void *  usr 
) [static]

Callback function registered with the DtVrfSimSettings class.

Called by DtVrfObject::init().

virtual void DtVrfObject::processReadDRThresholdSettings ( const DtSettingsObject settings) [virtual]

Callback function registered with the DtVrfSimSettings class.

Called by DtVrfObject::init().

Callback that is invoked when the entity is about to be removed from the simulation.

Callback that is invoked when the entity is about to be removed from the simulation.

Callback that is invoked when the entity is about to be removed from the simulation.

DtVrfObject& DtVrfObject::operator= ( const DtVrfObject orig) [protected]

assignment operator

virtual void DtVrfObject::setupStateRepository ( ) [protected, virtual]

Called by init() after state repository's init() has been called.

virtual void DtVrfObject::setupNetInterface ( ) [protected, virtual]

Called by init() after net interface's init() has been called.

void DtVrfObject::emptyVertexList ( ) [protected]

Non virtual utility function - called in destructor.

void DtVrfObject::copyVertexList ( const DtList &  orig) [protected]

Non-virtual utility function called in constructor.

virtual void DtVrfObject::validateObjectType ( ) [protected, virtual]

Validates the object type to make sure there are no -1s in the object type.

If there are, it will change them to 0's

virtual void DtVrfObject::processPostInitFromParamsCallback ( DtVrfObjectCallbackFunction  fcn,
void *  usr 
) [protected, virtual]

Invokes callback added through a call to addPostInitFromParamsCallback.

virtual void DtVrfObject::initializeCommunicationInterfaceCallbacks ( ) [protected, virtual]

Adds admin content callback registration.

Currently registers for DtSetOverlayLayerAdmin message

static void DtVrfObject::setOverlayLayerTaskCallback ( const DtVrfObjectMessage msg,
void *  usr 
) [static, protected]
virtual void DtVrfObject::processSetOverlayLayerTask ( const DtVrfObjectMessage msg) [protected, virtual]

Member Data Documentation

Reimplemented from DtReaderWriter.

DtEntityIdentifier DtVrfObject::myObjectIdentifier [protected]

passed in to constructor, held for SR construction

DtGlobalObjectDesignator DtVrfObject::myGlobalId [protected]

isLocal() used to check simulation address against object identifier to see if this was a local object, but myCreateLocalObject should already contain this information

Returns true if this is a vrf simulated object.

Locally set to the same value as passed into constructor for createLocal

DtReflectedObject* DtVrfObject::myReflectedObject [protected]

Passed into constructor - held only to pass into create() function for virtual construction.

DtForceType DtVrfObject::myForceType [protected]
DtList DtVrfObject::myVertices [protected]
DtTaitBryan DtVrfObject::myOrientation [protected]
DtAppearance DtVrfObject::myAppearance [protected]

Used in create().

The following member data are backward compatible reading of ovl files No accessors/mutators provided.

They are just used in reading old ovl files.

List of predicate function callbacks.

Users can register callbacks associated with a DtVrfObjectPredicate object. This class evaluates the isTrue() function associated with each predicate object. When isTrue() returns true, it invokes the callback function that it was registered with.

List of DtSimObjectCallbackFunction's, to be invoked when the object's position changes.

List of DtSimObjectCallbackFunction's, to be invoked when the object's relative position changes.

DtList DtVrfObject::myNameAliasList [protected]

Set to true if this object is about to be removed from the object manager list.

Referenced by aboutToBeRemoved(), and setAboutToBeRemoved().

int DtVrfObject::theDefaultNotifyLevel [static, protected]

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)