VR-Forces 4.6.1 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Types | 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]

Public Types

enum  ChangeFlag {
  MarkingText = 1, ForceType, ObjectLabel, OverlayParent,
  ObjectType, SubordinateOfForceLevel
}
typedef std::list
< DtLuaScriptInterfaceExtension::CreatorUserPair
ScriptInterfaceExtensions
typedef std::pair
< DtVrfObjectCallbackFunction,
void * > 
DtVrfObjectCallbackDataPair
 Definitions of container types used in the postInitFromParameters callback mechanism.
typedef std::pair< DtVrfObject
*, DtVrfObjectCallbackDataPair
DtVrfObjectCallbackDataPair2
typedef std::pair
< DtObjectDataChangedCallbackFunction,
void * > 
DtVrfObjectDataChangedCallbackDataPair
- Public Types inherited from DtReaderWriter
typedef std::vector
< DtSymbolString
aliasContainer
typedef std::vector
< DtSymbolString >::iterator 
aliasIter
typedef std::vector
< DtSymbolString >
::const_iterator 
aliasConstIter
typedef std::vector< DtFilename > SearchPaths
typedef std::pair
< DtSymbolString, DtString
DtVariableNameType
typedef DtReaderWriterFactory *(* DtReaderWriterFactoryCreatorFcn )()

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, const DtUUID &uuid=DtUUID::nullUUID(), bool connectToRadioNetowrk=true)
virtual ~DtVrfObject ()
 destructor
virtual bool create (bool createNetworkInterface=true)
 Virtual construction - must be called before any other member functions are called.
virtual bool finalizeObjectCreation ()
 Called to create the network interface (if not already created) and finalize other object creation.
virtual void finalizeObjectRead ()
 Called after the object has been read from a saved scenario.
virtual void setSimulationCapable (bool)
 Get/set whether or not this object is simulation capable.
virtual bool simulationCapable () const
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 int vrfSessionId () const
 Return the session id of this object.
virtual bool init ()
 Initialization - must be called after create() and before any other member functions are called.
virtual void tick ()
 Called by create().
virtual void startTick ()
virtual void tickComponents ()
virtual void endTick ()
virtual void tickPublisherOnly ()
 Ticks only the publisher (net interface)
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 createScriptInterfaceHandler ()
virtual bool createComponentManager ()
virtual bool createVrfObjectPlanManager ()
 Creates myVrfObjectPlanManager based on the type specified in mySubComponentTypes.
virtual bool createRadio ()
virtual bool createNavigationInterfaceManager ()
virtual void setNavigationEnabled (bool)
 Accessors for navigation enabled.
virtual bool navigationEnabled () const
virtual void addToPotentialLuaScripts (int)
 Durning object reload from sccenario, controllers can add to this variable, such that when the read is done, an amount of scripts can be preallocated in the lua script manager based on the total number of objects.
virtual int potentialLuaScripts () const
virtual int scenarioRunId () const
 The id of the scenario being run (if set). Retrieved from the sim manager.
virtual double timeOfDay () const
 Gets the current time of day from the environment manager.
virtual double dateAndTimeOfDay () const
 Gets the current date and time of day from the environment manager.
virtual DtSharedVrfObjectReference sharedReference ()
 Returns the shared object reference to this object. Looks it up in object manager.
virtual DtSharedVrfObjectReference sharedReference () const
virtual double illumination () const
 How illuminated this object is.
virtual DtVrfObjectweather () const
 Returns the weather object last calculated when the illumination was updated.
virtual
MAKVRinTerra::DtFeatureGeometry 
featureGeometry () const
 Compute DtFeatureGeometry representation of object geometry.
virtual void updateIllumination () const
 Updates illumination value by providing local position to environment manager to calculate illumination value.
virtual void updateWeather ()
 Updates weather object at the entities location.
virtual void setRangeRingsParametersPublisherTickRange (double d)
 Sets the tick rate for updating range rings. Default is 5 seconds plus a random value (set in the range ring publisher)
virtual void createAndInitializeRangeRingsParameterPublisher ()
 Creates range ring publisher and sets tick rate to 5 seconds plus a random value (set in the range ring publisher)
virtual bool needsIlluminationUpdate () const
 Returns true if the entity has moved more than half a degree since (either in lat or lon) the last time the illumination was checked or the calculation time has changed.
virtual bool isOnTopOf (const DtVrfObject *) const
 Returns true if the entity is almost on top of the entity specified.
virtual bool isOnTopOf (const DtVrfObject *, double d) const
virtual bool isSimulationObject () const
 Returns true if this is an entity or a unit.
virtual bool isEntity () const
virtual bool isUnit () const
virtual bool intersect (const DtChord &, DtVrfChordIntersectionRecord *record=0) const
 Returns true if this chord intersects this entity. Uses the entities object geometry model.
virtual bool checkAndDisembarkIfEmbarked (const DtVector &localPosition)
 Check terrain hit, and, if entity is embarked, and there is no terrain hit on parent, disembark. Will only check if embarked.
virtual bool checkIfMoveOntoEmbarked (const DtVector &localPosition, DtVrfObject *&hit, const std::list< DtUUID > &additionalIgnore=std::list< DtUUID >())
 Check to see if there are any entities at the location given that can be moved onto for embarkation.
virtual bool hasHighFidelityObjectGeometryModel () const
 Returns true if the object geometry model is high fidelity (loaded from an medf file)
virtual bool isEmbeddedInTerrain () const
 Returns true if the object has its object geometry model embedded into the terrain.
virtual bool needsWeatherAreaUpdate () const
 Returns true if the entity has moved more than half a degree since (either in lat or lon) the last time the illumination was checked or the calculation time has changed for weather.
virtual bool isGlobalPlan () const
 Returns true if this object represents a global plan.
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 DtScriptInterfaceHandlerscriptInterfaceHandler () const
virtual DtSimComponentManagercomponentManager () const
virtual DtVrfObjectPlanManagervrfObjectPlanManager () const
virtual DtSimRadioradio () const
virtual
DtVrfObjectStateRepository
vrfState () const
virtual DtExtent extent () const
 Returns the extent of the vrfObject, if the vrfObject has one.
virtual DtExtent roughExtent () const
const DtVrfObjectParametersparameterEntry () const
 Parameters used by this object in it's definition.
const DtMovingObjectParametersmovingObjectParameterEntry () const
 Moving object parameters used by this object.
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, bool requestCreated=true)
 Create and send a DtVrfObjectCreated message about ourself.
virtual void setupFromMessageContent (DtIfModifyVrfObject *ifModVrfObject)
 Setup self from interface messages.
virtual void setIsVrfSimulatedObject (bool b)
 Returns true if object is being simulated by a VR-Forces-simulated object, false if not.
virtual bool isVrfSimulatedObject () const
virtual bool isVrfSimulated () const
virtual bool isSimulatingComponents () const
 returns true if object is simulating components VR-Forces components can be attached to non- VR-Forces entities.
virtual void save (std::string &)
 Saves the object to the given std::string.
virtual void putSelf (std::string &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 DtReaderWriter::SearchPaths &searchPaths, const DtVariableBindingsList &variableBindings)
 Override to do additional setup required when reading older oob, ovl files.
virtual bool validNameLength (const DtString &name) const
virtual bool setMarkingText (const DtString &name, bool rename=true)
 Override to inform the vrfObjectManager when the name changes.
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 addNavigationInterfaceChangedCallback (DtVrfObjectCallbackFunction function, void *userData)
 Add/remove callback for when the navigation interface has changed due to navigation being enabled/disabled.
virtual void removeNavigationInterfaceChangedCallback (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 const DtStringglobalIdString () const
 Produces the same result as globalId().string(), but the result is cached for faster access in the future.
virtual bool baseSetMarkingText (const DtString &name)
 Set/get the name of the object.
virtual const DtStringmarkingText () const
virtual const DtStringobjectName () const
 Deprecated as of 4.4 Used for backwards compatibility only.
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 setUUID (const DtUUID &)
 Sets the UUID of this object. Use only if you know the repercussions of setting it!
virtual const DtUUIDuuid () const
 Returns the UUID of this object.
virtual const DtStringobjectLabel () const
 Set/get the label of the object.
virtual void setObjectLabel (const DtString &objectLabel)
virtual DtForceType forceType () const
 Set/get force type.
virtual void setForceType (DtForceType f)
virtual void setIsSubordinateOfForceLevel (bool)
 Get/set whether or not this item is a subordinate of force level. If changes a change callback will be made.
virtual bool isSubordinateOfForceLevel () const
virtual const DtStringoverlayParent () const
 Set/get the overlay parent of the object.
virtual void setOverlayParent (const DtString &overlayParent)
virtual DtStateRepositorynetState ()
 VR-Link network state repository.
virtual const DtStateRepositorynetState () 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 const DtStringobjectIdentifierString () const
 Produces the same result as objectIdentifier().string(), but the result is cached for faster access in the future.
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 void processObjectAboutToBeRemoved (DtVrfObject *)
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 DtSharedVrfObjectReference leadEntity () const
virtual DtSharedVrfObjectReference firstSubordinate () const
virtual DtSharedVrfObjectReference lastSubordinate () const
virtual DtSharedVrfObjectReference firstHealthySubordinate () 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 DtVector locationRelativeTo (const DtVector &, DtVrfObject *relativeTo) const
 Given the local position vector, return a location that is relative to this entity given that position (in parent coordinates)
virtual DtVector velocityRelativeTo (const DtVector &, DtVrfObject *relativeTo) const
 Given the local velocity vector, return a velocity that is relative to this entity given that velocity (in parent coordinates)
virtual DtVector accelerationRelativeTo (const DtVector &, DtVrfObject *relativeTo) const
 Given the local acceleration vector, return an acceleration that is relative to this entity given that acceleration (in parent coordinates)
virtual DtTaitBryan orientationRelativeTo (const DtTaitBryan &, DtVrfObject *relativeTo) const
 Given the local orientation vector, return an orientation that is relative to this entity given that orientation (in parent coordinates)
virtual DtVrfObjectembarkedOn () const
virtual bool isEmbarkedOn (const DtUUID &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 const DtSetDataManagersetDataManager () const
virtual
DtVrfObjectCommunicationInterface
communicationInterface ()
virtual DtVrfObjectNavInterfacenavInterface ()
virtual
DtVrfObjectTerrainPreloadManager
terrainPreloadManager ()
DtVrfObjectSubComponentTypesvrfSubComponentTypes () const
 For use in virtual construction.
virtual void duplicateVrfSubComponentTypes ()
 Duplicates the sub component type.
virtual void restoreDuplicatedVrfSubComponentTypes ()
 Restores (if duplicated) to parameter default for sub component types.
virtual bool hasPlan () const
virtual bool executingPlan () const
virtual bool isCurrentlyTasked () const
virtual bool isEllipsoid () const
 Returns true if this object is an ellipsoid object.
virtual DtU8 getNextEmitterSystemId ()
virtual void addScriptExtension (DtLuaScriptInterfaceExtension::CreatorFcn extension, void *usr)
 Add a lua script extension for this entity only.
virtual void removeScriptExtension (DtLuaScriptInterfaceExtension::CreatorFcn extension, void *usr)
 Remove a lua script extension that was previously added.
virtual const
ScriptInterfaceExtensions
scriptExtensions () const
virtual void regenerateUUIDForImport ()
 Regenerates the existing UUID and maps it to be updated for import.
virtual void addedToObjectManager ()
 Called right after this object is added to the object manager.
virtual DtVrfUnderwaterAcousticsunderwaterAcoustics ()
 Accesses acoustics publisher. Use to set sonar or propulstion noise.
virtual DtVrfObjectDeletionHandle objectDeletionHandle ()
virtual void updateTerrainEmbeddedGeometry (bool force=false)
 Updates geometry embedded into terrain (if configured) with current info.
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)
virtual void addObjectDataChangedCallback (DtObjectDataChangedCallbackFunction, void *)
 Adds/removes callbacks for when values in the object have changed.
virtual void removeObjectDataChangedCallback (DtObjectDataChangedCallbackFunction, void *)
virtual void invokeObjectDataChangedCallbacks (ChangeFlag)
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)
virtual void setPublishObject (bool publishObject)
 Set/get flag indicating whether or not object should be published.
virtual bool publishObject () const
virtual DtOutputStream & objectConsoleDebug (const DtString &channel="") const
virtual DtOutputStream & objectConsoleVerbose (const DtString &channel="") const
virtual DtOutputStream & objectConsoleInfo (const DtString &channel="") const
virtual DtOutputStream & objectConsoleWarn (const DtString &channel="") const
virtual DtOutputStream & objectConsoleError (const DtString &channel="") const
virtual DtObjectConsoleobjectConsole ()
 Returns a pointer to the object console member of this object.
virtual const DtObjectConsoleobjectConsole () const
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)
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)
virtual void invokeVrfObjectAboutToBeRemovedCallbacks ()
virtual void addObjectModifiedViaMessageCallback (DtVrfObjectCallbackList::DtCallbackFunctionType fcn, void *usr)
 Callback that is triggered when the object is modified via a VRF modify message.
virtual void removeObjectModifiedViaMessageCallback (DtVrfObjectCallbackList::DtCallbackFunctionType fcn, void *usr)
virtual void invokeObjectModifiedViaMessageCallback ()
virtual void addNewSensorContactCallback (DtVrfObjectCallbackList::DtCallbackFunctionType fcn, void *usr)
 Callback that is invoked when the entity detects a new sensor contact or when a sensor contact's CID level is increased.
virtual void removeNewSensorContactCallback (DtVrfObjectCallbackList::DtCallbackFunctionType fcn, void *usr)
virtual void invokeNewSensorContactCallbacks ()
virtual void addSetLocationCompleteCallback (DtVrfObjectCallbackList::DtCallbackFunctionType fcn, void *usr)
 Callback that is invoked when a set location request is completed.
virtual void removeSetLocationCompleteCallback (DtVrfObjectCallbackList::DtCallbackFunctionType fcn, void *usr)
virtual void invokeSetLocationCompleteCallbacks ()
- Public Member Functions inherited from DtReaderWriter
 DtReaderWriter ()
 default constructor
 DtReaderWriter (const DtString &name, DtReaderWriterRegistry *parentRegistry=NULL, bool readonly=false)
 real constructor Setting the readonly flag prevents object from writing itself to the stream.
 DtReaderWriter (const DtSymbolString &name, DtReaderWriterRegistry *parentRegistry=NULL, bool readonly=false)
 DtReaderWriter (const DtString &name, const DtReaderWriter &orig, DtReaderWriterRegistry *parentRegistry=NULL)
 pseudo-copy constructor
 DtReaderWriter (const DtSymbolString &name, const DtReaderWriter &orig, DtReaderWriterRegistry *parentRegistry=NULL)
 DtReaderWriter (const DtReaderWriter &, DtReaderWriterRegistry *parentRegistry=NULL)
 copy constructor
const DtReaderWriteroperator= (const DtReaderWriter &orig)
 assignment operator
bool operator== (const DtReaderWriter &) const
 Equivalence operator.
bool operator!= (const DtReaderWriter &rhs)
virtual ~DtReaderWriter ()
 destructor
virtual void postPutSelf ()
 Called after either version of put self (file or environment). Default is no-op.
virtual void prePutSelf ()
 Called before either version of put self (file or environment). Default is no-op.
virtual void getSelf (DtlObjPtr args, const DtReaderWriter::SearchPaths &searchPaths=SearchPaths(), const DtVariableBindingsList &variableBindings=nullVariableReference())
 Top level to read itself from an input stream.
virtual void postGetSelf ()
 Called after either version of getSelf (mtl or environment). Default is no-op.
virtual void preGetSelf ()
 Called before either version of get self (file or environment). Default is no-op.
virtual void writeSelf (std::string &fp, int indentLevel=0, bool writeUnspecified=false, const DtFilename &path=DtFilename::nullFilename())
 Called from putSelf, calls myRegistry.putSelf which in turn calls putSelf on each reader/writer in the registry.
virtual DtSymbolString name () const
 Accessor for name of this readable/writable object.
virtual void addAlias (const DtSymbolString &alias)
 Add an alias as an alternative name for this object.
virtual void addAlias (const DtString &alias)
virtual bool hasAlias (const DtSymbolString &alias)
virtual const aliasContaineraliases () const
virtual void setReadonly (bool flag)
 Set read-only flag.
bool isReadonly () const
virtual void reset ()
 For those reader/writer items that support it, resets the reader/writer value to original state Default is no-op.
virtual int alignment () const
 For those items that are sent over the network via HLA, this will give the network alignment.
virtual bool variableIsBound () const
virtual void unbindVariable ()
 Sets the myVariableIsBound flag to false.
virtual void setName (const DtString &)
 Set the name of the object.
virtual const charreaderWriterType () const
 Used to supply a string type that this reader writer type is.
virtual const charxmlType () const
virtual DtString prettyPrint () const
 Routine to return a human readable form of the reader/writer variable.
std::string debugText () const
virtual void bindVariables (DtVariableBindingsList variableBindings)
 Runs a variable binding pass on this reader writer and any of its children.
virtual std::list
< DtVariableNameType
unboundVariables () const
bool invalid () const
virtual bool hasChild (const DtReaderWriter *p) const
 Returns true if this variable has a child p in it's chain.
virtual bool hasVariableReference () const
 Returns true if this item or any item in the registry (recursive) is a variable reference.
virtual void bindLocalVariables (const DtVariableBindingsList &variableBindings)
 Checks to see if this RW object is a variable reference that can be bound using the provided bindings.
virtual void recordUpdateTime () const
 Can be implemented in subclasses to stamp the time when updated.
virtual bool wasUpdatedSince (DtTime t) const
 Can be implemented in subclasses to return true if an update occurred after the specified time.
virtual bool changedSinceLastChecked ()
 Returns true if this objects value has changed since the last time this function was called.
virtual bool peekChangedSinceLastChecked () const
 Returns the value that changedSinceLastChecked would return but does not reset the internal flag.
virtual void putData (std::string &fp, int indentLevel=0)
 Deriving class overrides these to get/put class specific data.
virtual DtlObjPtr getData (DtlObjPtr args, const SearchPaths &searchPaths, const DtVariableBindingsList &variableBindings)
virtual void setValueSpecified (bool specified, bool recurse=false)
 The specified flags are used for optional values.
virtual bool valueSpecified () const
virtual bool isVariableReference () const
 Specifies whether or not this reader writer is really a variable that is specified elsewhere.
virtual void setIsVariableReference (bool value)
virtual void clearAllVariableReferenceFlags ()
 Clears out all variable reference flags from all readerwriter items in registry recursively.
virtual DtSymbolString variableName () const
 The variable name, if this object is a variable reference.
virtual void setVariableName (const DtSymbolString variableName)
virtual const DtReaderWriterdefaultRWValue () const
 The default value to use if the reader/writer object is a variable and that variable is not specified.
virtual DtReaderWriterdefaultRWValue ()
virtual void setDefaultRWValue (DtReaderWriter *)
 Previous default value, if exists, will be removed and replaced with a clone of the supplied variable.
virtual bool checkAndSetDefaultRWValue (DtlObjPtr args, const DtReaderWriter::SearchPaths &searchPaths=SearchPaths(), const DtVariableBindingsList &variableBindings=nullVariableReference())
 Give the stream, if the stream contains a default value then set it here.
const DtReaderWriterRegistryregistry () const
 Collection of child DtReaderWriter nodes owned by this object.
DtReaderWriterRegistryregistry ()
virtual DtPropertyInterfaceproperty ()
virtual const DtPropertyInterfaceproperty () const
virtual DtString toXml () const
virtual bool toXml (const DtFilename &) const
 Writes contents of xml result to the given filename.
virtual bool fromXml (const DtString &)
 Restores object from given xml string. Returns true if valid.
virtual bool fromXmlFile (const DtFilename &)
 Restores object from given xml file.
virtual void putSelf (DtEnvironmentSP, DtEnvValueSP parent) const
virtual void putData (DtEnvironmentSP, DtEnvValueSP value) const
 Override to add attributes of actual data.
virtual void putVariableReference (DtEnvironmentSP, DtEnvValueSP value) const
 Called when the item is a variable reference.
virtual void getSelf (const DtEnvironmentSP, const DtEnvValueSP root, const SearchPaths &searchPaths=SearchPaths(), const DtVariableBindingsList &bindings=DtVariableBindingsList())
virtual void getData (const DtEnvironmentSP, const DtEnvValueSP, const SearchPaths &searchPaths=SearchPaths(), const DtVariableBindingsList &bindings=DtVariableBindingsList())
 Gets data from the environment value.
virtual void unrecognizedItem (const DtEnvironmentSP env, const DtEnvValueSP root, const SearchPaths &searchPaths, const DtVariableBindingsList &varBindings)
 Called when the xml reader tries to parse an unknown reader/writer item. Default is a no-op.
virtual void getVariableReference (DtEnvironmentSP, DtEnvValueSP value)
 Called when the item is a variable reference.

Static Public Member Functions

static void enableSingleObjectMode ()
 Puts VRF in "single object mode" which limits it to simulating only a single local entity or lifeform object.
static bool singleObjectModeActive ()
static void addSimObjectCreatorFcn (const DtString &type, DtSimObjectCreatorFcn fcn)
static void objectAboutToBeRemoved (DtVrfObject *msg, void *usr)
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, const DtUUID &uuid=DtUUID::nullUUID(), bool connectToRadioNetowrk=true)
 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, const DtUUID &initialUUID=DtUUID::nullUUID(), bool connectToRadioNetowrk=true)
 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, const DtUUID &uuid=DtUUID::nullUUID(), bool connectToRadioNetowrk=true)
 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 DtVrfObjectcreateAndInitForSimulationObjectGroup (DtVrfObjectManager *vrfObjectManager, DtlObjPtr mtlStream, int flags, int force, const DtVector &geocentricOffsetLocation, double offsetRotation=0.)
 Create and initialize a new sim object from a mtl stream as created as part of a simulation object group.
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.
- Static Public Member Functions inherited from DtReaderWriter
static void putIndent (std::string &fp, int indentLevel)
static const
DtVariableBindingsList
nullVariableReference ()
static void setPostGetSelfCallback (DtGetSelfCallbackFcn fcn, void *usrData)
static void setPrePutSelfCallback (DtPutSelfCallbackFcn fcn, void *usrData)
static void setPutIndent (bool)
static bool putIndent ()
static const chartheXmlType ()
 The type that is used when archiving to an XML stream.
static const DtFilename & appPath ()
 Gets the current working directory.
static void setFactoryCreatorFunction (DtReaderWriterFactoryCreatorFcn fcn)
 Sets the function to create the DtReaderWriterFactory.
static void createReaderWriterFactory ()
static void cleanupFactory ()
static DtReaderWritercreateFromXmlFile (const DtFilename &, bool createAsProperty=false)
 Given a filename, returns a newly created reader/writer object from the object found within.
static DtReaderWritercreateFromXml (const DtString &, bool createAsProperty=false)
 Given a xml string, returns a newly created reader/writer object from the object found within.
static DtReaderWritercreateFromEnvironment (DtEnvironmentSP, bool createAsProperty=false)
 Given a xml environment, returns a newly created reader/writer object from the object found within.
static DtString getAttribute (DtEnvironmentSP env, const DtString &name, DtEnvValueSP root)
 Gets the named attribute from a DtEnvValueSP.
- Static Public Member Functions inherited from DtObjectDebugger< DtReaderWriter >
static DtObjectCounter::CounterType ObjectCount ()
static const DtObjectContainer * ObjectContainer ()
- Static Public Member Functions inherited from DtObjectDebugger< DtVrfObject >
static DtObjectCounter::CounterType ObjectCount ()
static const DtObjectContainer * ObjectContainer ()

Protected Member Functions

 DtVrfObject ()
 Abstract base classes should not be constructed.
 DtVrfObject (const DtVrfObject &orig)
 copy constructor
DtVrfObjectoperator= (const DtVrfObject &orig)
 assignment operator
virtual bool initializeNetInterface ()
 Initializes network interface (either from init() if created or finalizeObjectCreation())
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)
virtual void updateBoundingVolumeBasedOnPosture ()
 Based on the entities current posture, update bounding geometry based on whether or not the entity is standing, prone or kneeling.
virtual DtExtent computeExtent () const
 Compute the extent, not lazy.
virtual void initializeObjectGeometryModel ()
 Initializes object geometry for this model.
- Protected Member Functions inherited from DtReaderWriter
virtual void bindToRwAsVariable (const DtReaderWriter *rw)
 Copies values from the specified DtReaderWriter.
- Protected Member Functions inherited from DtObjectDebugger< DtReaderWriter >
 DtObjectDebugger ()
 DtObjectDebugger (const DtObjectDebugger &)
 ~DtObjectDebugger ()
- Protected Member Functions inherited from DtObjectDebugger< DtVrfObject >
 DtObjectDebugger ()
 DtObjectDebugger (const DtObjectDebugger &)
 ~DtObjectDebugger ()

Static Protected Member Functions

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

Protected Attributes

DtExtent myExtent
bool myExtentInvalid
 lazy per-tick cache of extent
DtRwString myObjectClassType
DtRwEntityIdentifier myObjectIdentifier
DtString myMutableObjectIdStringCache
DtRwObjectType myObjectType
 passed in to constructor, held for SR construction
DtRwVrfObjectName myMarkingText
DtRwString myObjectLabel
DtRwString myOverlayParent
DtGlobalObjectDesignator myGlobalId
DtString myMutableGlobalIdStringCache
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.
DtReflectedObjectmyReflectedObject
 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
DtScriptInterfaceHandlermyScriptInterfaceHandler
DtSimRadiomyRadio
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.
DtVrfObjectCallbackList myVerticesChangedCallbackList
 List of DtSimObjectCallbackFunction's, to be invoked when the object's position changes.
DtVrfObjectCallbackList myNavigationInterfaceChangedCallbackList
 List of functions to call when the navigation interface has changed.
DtList myRelativeVerticesChangedCallbackList
 List of functions to call when some object data has changed.
std::map
< DtObjectDataChangedCallbackFunction,
std::set< void * > > 
myObjectDataChangedCallbackList
 List of callback functions to call when object data has changed.
DtVrfObjectCallbackList myAboutToBeRemovedCallbackList
DtVrfObjectCallbackList mySetLocationCompleteCallbackList
DtVrfObjectCallbackList myNewSensorContactCallbackList
DtVrfObjectCallbackList myObjectModifiedViaMessage
DtVrfUnderwaterAcousticsmyVrfUnderwaterAcoustics
bool myAboutToBeRemoved
 Set to true if this object is about to be removed from the object manager list.
DtObjectConsolemyObjectConsole
DtSetDataManagermySetDataManager
DtVrfObjectCommunicationInterfacemyCommunicationInterface
DtNavInterfaceManagermyNavInterfaceManager
DtU8 myNextEmitterSystemId
DtVrfObjectTerrainPreloadManagermyTerrainPreloadManager
ScriptInterfaceExtensions myScriptInterfaceExtensions
DtRangeRingsParametersPublishermyRangeRingsParametersPublisher
 This object will manage range rings from state and parameter data.
DtVrfObjectParametersmyParameterEntry
DtMovingObjectParametersmyMovingObject
int myPotentialLuaScripts
double myIlluminationValue
double myLastTimeIlluminationCalculated
double myLastTimeWeatherAreaCalculated
DtGeodeticCoord myLastIlluminationPosition
bool myMutableIlluminationCalculatedThisTick
 Tracks whether illumination has been calculated this tick or not. Only calculate it once for performance.
tbb::spin_rw_mutex myIlluminationMutex
DtVrfObjectmyWeatherObject
 The weather object retrieved the last time illumination was calculated.
bool myWeatherIsGlobal
bool myMutableWeatherObjectUpdatedThisTick
tbb::spin_rw_mutex myWeatherMutex
DtVrfObjectDeletionHandle myObjectDeletionHandle
bool myUseDayNightIlluminationModel
DtVrfObjectUUID myUUID
std::set< DtStringmyNameAliasList
DtSharedVrfObjectReference mySharedReference
bool myWarnedObjectName
bool mySimulationCapable
const bool myConnectToRadioNetwork
DtAttachedTerrain myObjectGeometryModel
 The object geometry that this object can use to see if it intersects with a higher level fidelity model.
DtTerrainGeometryHandlemyTerrainEmbeddedGeometry
 If the geometry for this object is embedded in the terrain this handle allows control.
DtTime myLastTerrainEmbeddedGeometryUpdateTime
double myLastWeatherHeading
bool myDuplicatedSubComponents
- Protected Attributes inherited from DtReaderWriter
const DtSymbolString myName
DtReaderWriterRegistry myRegistry
DtReaderWriterRegistrymyParentRegistry
bool myValueSpecified
bool myReadOnlyFlag
bool myIsVariableReference
DtSymbolString myVariableName
bool myVariableIsBound
DtReaderWritermyDefaultValue
aliasContainer myAliases
 Container for the aliases which represent alternative names for the object.
bool myInvalid
 Set to true if there is a problem reading this item.
bool myChangedFlag
 Set to true when value changes Set to false when value checked with changedSinceLastChecked.

Static Protected Attributes

static DtSimObjectFactorytheFactory
static int theDefaultNotifyLevel
- Static Protected Attributes inherited from DtReaderWriter
static DtString theUnspecifiedValue
static DtGetSelfCallbackInfo thePostGetSelfCallback
static DtPutSelfCallbackInfo thePrePutSelfCallback
static const DtVariableBindingsList theEmptyVariableBindingsList
static bool theCreatorFcnSet
static DtReaderWriterFactorytheFactory
static
DtReaderWriterFactoryCreatorFcn 
theFactoryCreatorFcn
static bool thePutIndent
virtual void processReadDRThresholdSettings (const DtSettingsObject *settings)
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:

Most Back End Examples can be explored for reference.

Member Typedef Documentation

Definitions of container types used in the postInitFromParameters callback mechanism.

Member Enumeration Documentation

Enumerator:
MarkingText 
ForceType 
ObjectLabel 
OverlayParent 
ObjectType 
SubordinateOfForceLevel 

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,
const DtUUID uuid = DtUUID::nullUUID(),
bool  connectToRadioNetowrk = true 
)
virtual DtVrfObject::~DtVrfObject ( )
virtual

destructor

DtVrfObject::DtVrfObject ( const DtVrfObject orig)
protected

copy constructor

Member Function Documentation

static void DtVrfObject::enableSingleObjectMode ( )
static

Puts VRF in "single object mode" which limits it to simulating only a single local entity or lifeform object.

Note: This mode cannot be turned off once it is enabled.

static bool DtVrfObject::singleObjectModeActive ( )
static
Returns
True if VRF is current in Single Object Mode.
virtual bool DtVrfObject::create ( bool  createNetworkInterface = true)
virtual

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

If createNetworkInterface is false then it will not create the network interface. Do this if you want to make sure all data is present in the object before it is on the network. When it is, call createNetworkInterface

virtual bool DtVrfObject::finalizeObjectCreation ( )
virtual

Called to create the network interface (if not already created) and finalize other object creation.

Will also set is simulationCapable to true. Will only be used if not currently simulation capable

virtual void DtVrfObject::finalizeObjectRead ( )
virtual

Called after the object has been read from a saved scenario.

virtual void DtVrfObject::setSimulationCapable ( bool  )
virtual

Get/set whether or not this object is simulation capable.

If not will not be ticked nor considered part of the simulation. Objects that are not simulation capable will be part of a group of imported objects where some of the objects are not yet valid

virtual bool DtVrfObject::simulationCapable ( ) const
virtual
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 int DtVrfObject::vrfSessionId ( ) const
virtual

Return the session id of this object.

This will need to be sure the netState is of a VRF type and it can return the session id

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 void DtVrfObject::startTick ( )
virtual
virtual void DtVrfObject::tickComponents ( )
virtual
virtual void DtVrfObject::endTick ( )
virtual
virtual void DtVrfObject::tickPublisherOnly ( )
virtual

Ticks only the publisher (net interface)

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
virtual bool DtVrfObject::createScriptInterfaceHandler ( )
virtual
virtual bool DtVrfObject::createComponentManager ( )
virtual
virtual bool DtVrfObject::createVrfObjectPlanManager ( )
virtual

Creates myVrfObjectPlanManager based on the type specified in mySubComponentTypes.

virtual bool DtVrfObject::createRadio ( )
virtual
virtual bool DtVrfObject::createNavigationInterfaceManager ( )
virtual
virtual void DtVrfObject::setNavigationEnabled ( bool  )
virtual

Accessors for navigation enabled.

The actual state is stored in the vrfState(). This will also be changed in the navigation interface (if created). If not created will be set into the interface when it is

virtual bool DtVrfObject::navigationEnabled ( ) const
virtual
virtual void DtVrfObject::addToPotentialLuaScripts ( int  )
virtual

Durning object reload from sccenario, controllers can add to this variable, such that when the read is done, an amount of scripts can be preallocated in the lua script manager based on the total number of objects.

Note that this value is only valid as of the time of a putSelf on this object

virtual int DtVrfObject::potentialLuaScripts ( ) const
virtual
virtual int DtVrfObject::scenarioRunId ( ) const
virtual

The id of the scenario being run (if set). Retrieved from the sim manager.

virtual double DtVrfObject::timeOfDay ( ) const
virtual

Gets the current time of day from the environment manager.

virtual double DtVrfObject::dateAndTimeOfDay ( ) const
virtual

Gets the current date and time of day from the environment manager.

virtual DtSharedVrfObjectReference DtVrfObject::sharedReference ( )
virtual

Returns the shared object reference to this object. Looks it up in object manager.

virtual DtSharedVrfObjectReference DtVrfObject::sharedReference ( ) const
virtual
virtual double DtVrfObject::illumination ( ) const
virtual

How illuminated this object is.

Calculated from position and date/time to given sun/moon position. Calculated so often as defined in the moving object parameter

virtual DtVrfObject* DtVrfObject::weather ( ) const
virtual

Returns the weather object last calculated when the illumination was updated.

virtual MAKVRinTerra::DtFeatureGeometry DtVrfObject::featureGeometry ( ) const
virtual

Compute DtFeatureGeometry representation of object geometry.

virtual void DtVrfObject::updateIllumination ( ) const
virtual

Updates illumination value by providing local position to environment manager to calculate illumination value.

virtual void DtVrfObject::updateWeather ( )
virtual

Updates weather object at the entities location.

virtual void DtVrfObject::setRangeRingsParametersPublisherTickRange ( double  d)
virtual

Sets the tick rate for updating range rings. Default is 5 seconds plus a random value (set in the range ring publisher)

virtual void DtVrfObject::createAndInitializeRangeRingsParameterPublisher ( )
virtual

Creates range ring publisher and sets tick rate to 5 seconds plus a random value (set in the range ring publisher)

virtual bool DtVrfObject::needsIlluminationUpdate ( ) const
virtual

Returns true if the entity has moved more than half a degree since (either in lat or lon) the last time the illumination was checked or the calculation time has changed.

virtual bool DtVrfObject::isOnTopOf ( const DtVrfObject ) const
virtual

Returns true if the entity is almost on top of the entity specified.

If no distance is given, the entities half height + .5m is used

virtual bool DtVrfObject::isOnTopOf ( const DtVrfObject ,
double  d 
) const
virtual
virtual bool DtVrfObject::isSimulationObject ( ) const
virtual

Returns true if this is an entity or a unit.

virtual bool DtVrfObject::isEntity ( ) const
virtual
virtual bool DtVrfObject::isUnit ( ) const
virtual
virtual bool DtVrfObject::intersect ( const DtChord ,
DtVrfChordIntersectionRecord record = 0 
) const
virtual

Returns true if this chord intersects this entity. Uses the entities object geometry model.

virtual bool DtVrfObject::checkAndDisembarkIfEmbarked ( const DtVector localPosition)
virtual

Check terrain hit, and, if entity is embarked, and there is no terrain hit on parent, disembark. Will only check if embarked.

virtual bool DtVrfObject::checkIfMoveOntoEmbarked ( const DtVector localPosition,
DtVrfObject *&  hit,
const std::list< DtUUID > &  additionalIgnore = std::list< DtUUID >() 
)
virtual

Check to see if there are any entities at the location given that can be moved onto for embarkation.

If ther are then check to see if they are intersected. Return true if is

virtual bool DtVrfObject::hasHighFidelityObjectGeometryModel ( ) const
virtual

Returns true if the object geometry model is high fidelity (loaded from an medf file)

virtual bool DtVrfObject::isEmbeddedInTerrain ( ) const
virtual

Returns true if the object has its object geometry model embedded into the terrain.

virtual bool DtVrfObject::needsWeatherAreaUpdate ( ) const
virtual

Returns true if the entity has moved more than half a degree since (either in lat or lon) the last time the illumination was checked or the calculation time has changed for weather.

If illumination update is needed this will update weather as well

virtual bool DtVrfObject::isGlobalPlan ( ) const
virtual

Returns true if this object represents a global plan.

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 DtScriptInterfaceHandler* DtVrfObject::scriptInterfaceHandler ( ) const
virtual
virtual DtSimComponentManager* DtVrfObject::componentManager ( ) const
virtual
virtual DtVrfObjectPlanManager* DtVrfObject::vrfObjectPlanManager ( ) const
virtual
virtual DtSimRadio* 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.

Note
If you don't require the minimum fitting extent to the bounding volume, use roughExtent() instead, as it is faster to execute.
virtual DtExtent DtVrfObject::roughExtent ( ) const
virtual
Returns
A DtExtent that contains the bounding volume of this object, but may not be the minimum extent that contains the object.
Note
This function is significantly faster than extent(), but is not the minimum extent.
May return the same value as extent() if this value is already cached and valid.
const DtVrfObjectParameters* DtVrfObject::parameterEntry ( ) const

Parameters used by this object in it's definition.

const DtMovingObjectParameters* DtVrfObject::movingObjectParameterEntry ( ) const

Moving object parameters used by this object.

Returns null if the parameter entry is of a different type.

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,
bool  requestCreated = true 
)
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 void DtVrfObject::setIsVrfSimulatedObject ( bool  b)
virtual

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

virtual bool DtVrfObject::isVrfSimulatedObject ( ) const
virtual
virtual bool DtVrfObject::isVrfSimulated ( ) const
inlinevirtual
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::save ( std::string &  )
virtual

Saves the object to the given std::string.

virtual void DtVrfObject::putSelf ( std::string &  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 DtReaderWriter::SearchPaths searchPaths,
const DtVariableBindingsList variableBindings 
)
virtual

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

virtual bool DtVrfObject::validNameLength ( const DtString name) const
virtual
virtual bool DtVrfObject::setMarkingText ( 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 baseSetMarkingTest(). If the baseSetMarkingTest() fails and rename is true, this function generates the next standard name for the object, calls baseSetMarkingTest 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::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::addNavigationInterfaceChangedCallback ( DtVrfObjectCallbackFunction  function,
void *  userData 
)
virtual

Add/remove callback for when the navigation interface has changed due to navigation being enabled/disabled.

virtual void DtVrfObject::removeNavigationInterfaceChangedCallback ( 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
virtual void DtVrfObject::addObjectDataChangedCallback ( DtObjectDataChangedCallbackFunction  ,
void *   
)
virtual

Adds/removes callbacks for when values in the object have changed.

This callback does not send the old value but rather just notifies (by flag) the value has changed

virtual void DtVrfObject::removeObjectDataChangedCallback ( DtObjectDataChangedCallbackFunction  ,
void *   
)
virtual
virtual void DtVrfObject::invokeObjectDataChangedCallbacks ( ChangeFlag  )
virtual
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
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.

virtual void DtVrfObject::invokeVrfObjectPredicateCallbacks ( )
virtual

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 DtVrfObjectManager* DtVrfObject::simObjectManager ( )
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 const DtString& DtVrfObject::globalIdString ( ) const
virtual

Produces the same result as globalId().string(), but the result is cached for faster access in the future.

virtual bool DtVrfObject::baseSetMarkingText ( 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::markingText ( ) const
virtual
virtual const DtString& DtVrfObject::objectName ( ) const
virtual

Deprecated as of 4.4 Used for backwards compatibility only.

If using as a means to lookup objects or send messages, use the uuid() method. For printing the actual marking text of the object use the markingText() method.

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::setUUID ( const DtUUID )
virtual

Sets the UUID of this object. Use only if you know the repercussions of setting it!

virtual const DtUUID& DtVrfObject::uuid ( ) const
virtual

Returns the UUID of this object.

virtual const DtString& DtVrfObject::objectLabel ( ) const
virtual

Set/get the label of the object.

virtual void DtVrfObject::setObjectLabel ( const DtString objectLabel)
virtual
virtual DtForceType DtVrfObject::forceType ( ) const
virtual

Set/get force type.

virtual void DtVrfObject::setForceType ( DtForceType  f)
virtual
virtual void DtVrfObject::setIsSubordinateOfForceLevel ( bool  )
virtual

Get/set whether or not this item is a subordinate of force level. If changes a change callback will be made.

virtual bool DtVrfObject::isSubordinateOfForceLevel ( ) const
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
virtual DtSimObjectNetInterface* DtVrfObject::netInterface ( )
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 const DtString& DtVrfObject::objectIdentifierString ( ) const
virtual

Produces the same result as objectIdentifier().string(), but the result is cached for faster access in the future.

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
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.

virtual void DtVrfObject::clearRelativeVerticesChangedCallbacks ( )
virtual

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
static void DtVrfObject::objectAboutToBeRemoved ( DtVrfObject msg,
void *  usr 
)
static
virtual void DtVrfObject::processObjectAboutToBeRemoved ( DtVrfObject )
virtual
static DtSimObjectFactory* DtVrfObject::factory ( )
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 DtSimObjectStateRepository* DtVrfObject::simState ( )
virtual
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)
bool DtVrfObject::isDestroyed ( ) const
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.
const DtString& DtVrfObject::echelonIdString ( ) const
virtual DtSharedVrfObjectReference DtVrfObject::leadEntity ( ) const
virtual
virtual DtSharedVrfObjectReference DtVrfObject::firstSubordinate ( ) const
virtual
virtual DtSharedVrfObjectReference DtVrfObject::lastSubordinate ( ) const
virtual
virtual DtSharedVrfObjectReference DtVrfObject::firstHealthySubordinate ( ) const
virtual

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

virtual void DtVrfObject::echelonIdChanged ( )
inlinevirtual
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 DtVector DtVrfObject::locationRelativeTo ( const DtVector ,
DtVrfObject relativeTo 
) const
virtual

Given the local position vector, return a location that is relative to this entity given that position (in parent coordinates)

virtual DtVector DtVrfObject::velocityRelativeTo ( const DtVector ,
DtVrfObject relativeTo 
) const
virtual

Given the local velocity vector, return a velocity that is relative to this entity given that velocity (in parent coordinates)

virtual DtVector DtVrfObject::accelerationRelativeTo ( const DtVector ,
DtVrfObject relativeTo 
) const
virtual

Given the local acceleration vector, return an acceleration that is relative to this entity given that acceleration (in parent coordinates)

virtual DtTaitBryan DtVrfObject::orientationRelativeTo ( const DtTaitBryan &  ,
DtVrfObject relativeTo 
) const
virtual

Given the local orientation vector, return an orientation that is relative to this entity given that orientation (in parent coordinates)

virtual DtVrfObject* DtVrfObject::embarkedOn ( ) const
virtual
Returns
The object this object is embarked on (if embarked)
virtual bool DtVrfObject::isEmbarkedOn ( const DtUUID parent) const
virtual
Returns
True if this entity is embarked on the parent, or is embarked on something that is embarked on the parent
DtAttachedTerrain* DtVrfObject::terrainAttachedTo ( )
const DtAttachedTerrain* DtVrfObject::terrainAttachedTo ( ) const
virtual const DtPhysicalWorld* DtVrfObject::physicalWorld ( ) const
virtual
virtual DtPhysicalWorld* DtVrfObject::physicalWorld ( )
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 DtString channel = "") const
virtual
Returns
The stream that is routed to the object's console.
virtual DtOutputStream& DtVrfObject::objectConsoleVerbose ( const DtString channel = "") const
virtual
virtual DtOutputStream& DtVrfObject::objectConsoleInfo ( const DtString channel = "") const
virtual
virtual DtOutputStream& DtVrfObject::objectConsoleWarn ( const DtString channel = "") const
virtual
virtual DtOutputStream& DtVrfObject::objectConsoleError ( const DtString channel = "") const
virtual
virtual DtObjectConsole* DtVrfObject::objectConsole ( )
virtual

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

virtual const DtObjectConsole* DtVrfObject::objectConsole ( ) const
virtual
virtual DtSetDataManager* DtVrfObject::setDataManager ( )
virtual
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.
virtual const DtSetDataManager* DtVrfObject::setDataManager ( ) const
virtual
virtual DtVrfObjectCommunicationInterface* DtVrfObject::communicationInterface ( )
virtual
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.
virtual DtVrfObjectNavInterface* DtVrfObject::navInterface ( )
virtual
Returns
The DtVrfObjectNavInterface for this object. This is the entry point for interfacing with the navigation mesh subysstem of VRF for a specific sim object.
virtual DtVrfObjectTerrainPreloadManager* DtVrfObject::terrainPreloadManager ( )
virtual
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.
DtVrfObjectSubComponentTypes* DtVrfObject::vrfSubComponentTypes ( ) const

For use in virtual construction.

Casts mySubComponentTypes to derived type.

virtual void DtVrfObject::duplicateVrfSubComponentTypes ( )
virtual

Duplicates the sub component type.

Call this if you need to modify the sub compoenent type as changing the default will change all objects that use this sub component type

virtual void DtVrfObject::restoreDuplicatedVrfSubComponentTypes ( )
virtual

Restores (if duplicated) to parameter default for sub component types.

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 bool DtVrfObject::isEllipsoid ( ) const
virtual

Returns true if this object is an ellipsoid object.

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
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.
virtual void DtVrfObject::addScriptExtension ( DtLuaScriptInterfaceExtension::CreatorFcn  extension,
void *  usr 
)
virtual

Add a lua script extension for this entity only.

The creator function passed in will be called every time a lua environment is created for this entity.

virtual void DtVrfObject::removeScriptExtension ( DtLuaScriptInterfaceExtension::CreatorFcn  extension,
void *  usr 
)
virtual

Remove a lua script extension that was previously added.

virtual const ScriptInterfaceExtensions& DtVrfObject::scriptExtensions ( ) const
virtual
Returns
The current set of script extensions.
virtual void DtVrfObject::regenerateUUIDForImport ( )
virtual

Regenerates the existing UUID and maps it to be updated for import.

If scheduled to be read on load will set a flag to say that it should ignore the next getSelf on this as it has already been reworked

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,
const DtUUID uuid = DtUUID::nullUUID(),
bool  connectToRadioNetowrk = true 
)
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,
const DtUUID initialUUID = DtUUID::nullUUID(),
bool  connectToRadioNetowrk = true 
)
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,
const DtUUID uuid = DtUUID::nullUUID(),
bool  connectToRadioNetowrk = true 
)
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 DtVrfObject* DtVrfObject::createAndInitForSimulationObjectGroup ( DtVrfObjectManager vrfObjectManager,
DtlObjPtr  mtlStream,
int  flags,
int  force,
const DtVector geocentricOffsetLocation,
double  offsetRotation = 0. 
)
static

Create and initialize a new sim object from a mtl stream as created as part of a simulation object group.

The offset rotation is the amount to rotate the entire simulation object group around the center of mass (including changing headings). Angle is in radians

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
virtual void DtVrfObject::addedToObjectManager ( )
virtual

Called right after this object is added to the object manager.

virtual void DtVrfObject::addObjectAboutToBeRemovedCallback ( DtVrfObjectCallbackList::DtCallbackFunctionType  fcn,
void *  usr 
)
virtual

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

virtual void DtVrfObject::removeObjectAboutToBeRemovedCallback ( DtVrfObjectCallbackList::DtCallbackFunctionType  fcn,
void *  usr 
)
virtual
virtual void DtVrfObject::invokeVrfObjectAboutToBeRemovedCallbacks ( )
virtual
virtual void DtVrfObject::addObjectModifiedViaMessageCallback ( DtVrfObjectCallbackList::DtCallbackFunctionType  fcn,
void *  usr 
)
virtual

Callback that is triggered when the object is modified via a VRF modify message.

virtual void DtVrfObject::removeObjectModifiedViaMessageCallback ( DtVrfObjectCallbackList::DtCallbackFunctionType  fcn,
void *  usr 
)
virtual
virtual void DtVrfObject::invokeObjectModifiedViaMessageCallback ( )
virtual
virtual void DtVrfObject::addNewSensorContactCallback ( DtVrfObjectCallbackList::DtCallbackFunctionType  fcn,
void *  usr 
)
virtual

Callback that is invoked when the entity detects a new sensor contact or when a sensor contact's CID level is increased.

virtual void DtVrfObject::removeNewSensorContactCallback ( DtVrfObjectCallbackList::DtCallbackFunctionType  fcn,
void *  usr 
)
virtual
virtual void DtVrfObject::invokeNewSensorContactCallbacks ( )
virtual
virtual void DtVrfObject::addSetLocationCompleteCallback ( DtVrfObjectCallbackList::DtCallbackFunctionType  fcn,
void *  usr 
)
virtual

Callback that is invoked when a set location request is completed.

virtual void DtVrfObject::removeSetLocationCompleteCallback ( DtVrfObjectCallbackList::DtCallbackFunctionType  fcn,
void *  usr 
)
virtual
virtual void DtVrfObject::invokeSetLocationCompleteCallbacks ( )
virtual
virtual DtVrfUnderwaterAcoustics* DtVrfObject::underwaterAcoustics ( )
virtual

Accesses acoustics publisher. Use to set sonar or propulstion noise.

virtual DtVrfObjectDeletionHandle DtVrfObject::objectDeletionHandle ( )
virtual
virtual void DtVrfObject::updateTerrainEmbeddedGeometry ( bool  force = false)
virtual

Updates geometry embedded into terrain (if configured) with current info.

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

assignment operator

virtual bool DtVrfObject::initializeNetInterface ( )
protectedvirtual

Initializes network interface (either from init() if created or finalizeObjectCreation())

virtual void DtVrfObject::setupStateRepository ( )
protectedvirtual

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

virtual void DtVrfObject::setupNetInterface ( )
protectedvirtual

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 ( )
protectedvirtual

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 
)
protectedvirtual

Invokes callback added through a call to addPostInitFromParamsCallback.

virtual void DtVrfObject::initializeCommunicationInterfaceCallbacks ( )
protectedvirtual

Adds admin content callback registration.

Currently registers for DtSetOverlayLayerAdmin message

static void DtVrfObject::setOverlayLayerTaskCallback ( const DtVrfObjectMessage msg,
void *  usr 
)
staticprotected
virtual void DtVrfObject::processSetOverlayLayerTask ( const DtVrfObjectMessage msg)
protectedvirtual
virtual void DtVrfObject::updateBoundingVolumeBasedOnPosture ( )
protectedvirtual

Based on the entities current posture, update bounding geometry based on whether or not the entity is standing, prone or kneeling.

Calls down to human state repository to do the change

virtual DtExtent DtVrfObject::computeExtent ( ) const
protectedvirtual

Compute the extent, not lazy.

virtual void DtVrfObject::initializeObjectGeometryModel ( )
protectedvirtual

Initializes object geometry for this model.

Member Data Documentation

DtExtent DtVrfObject::myExtent
mutableprotected
bool DtVrfObject::myExtentInvalid
mutableprotected

lazy per-tick cache of extent

DtRwString DtVrfObject::myObjectClassType
protected
DtSimObjectFactory* DtVrfObject::theFactory
staticprotected
DtRwEntityIdentifier DtVrfObject::myObjectIdentifier
protected
DtString DtVrfObject::myMutableObjectIdStringCache
mutableprotected
DtRwObjectType DtVrfObject::myObjectType
protected

passed in to constructor, held for SR construction

DtRwVrfObjectName DtVrfObject::myMarkingText
protected
DtRwString DtVrfObject::myObjectLabel
protected
DtRwString DtVrfObject::myOverlayParent
protected
DtGlobalObjectDesignator DtVrfObject::myGlobalId
protected
DtString DtVrfObject::myMutableGlobalIdStringCache
mutableprotected
DtVrfObjectManager* DtVrfObject::mySimObjectManager
protected
DtVrfObjectStateRepository* DtVrfObject::mySimState
protected
DtSimObjectNetInterface* DtVrfObject::myNetInterface
protected
DtRwBoolean DtVrfObject::myPublishObject
protected
bool DtVrfObject::myCreateLocalObject
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

bool DtVrfObject::myIsVrfSimulatedObject
protected

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
bool DtVrfObject::myProjection
protected
bool DtVrfObject::myClosedFigure
protected
DtAppearance DtVrfObject::myAppearance
protected
DtVrfObjectSubComponentTypes* DtVrfObject::mySubComponentTypes
protected

Used in create().

DtSimManager* DtVrfObject::mySimManager
protected
DtSimTaskManager* DtVrfObject::myTaskManager
protected
DtScriptInterfaceHandler* DtVrfObject::myScriptInterfaceHandler
protected
DtSimRadio* DtVrfObject::myRadio
protected
DtSimComponentManager* DtVrfObject::myComponentManager
protected
DtVrfObjectPlanManager* DtVrfObject::myVrfObjectPlanManager
protected
DtLocalVertexList DtVrfObject::myOvlVertices
protected

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

They are just used in reading old ovl files.

DtRwVector DtVrfObject::myOvlTargetLocation
protected
DtRwVector DtVrfObject::myOvlStartPoint
protected
DtRwVector DtVrfObject::myOvlEndPoint
protected
DtObstacleAreaCompatilibility DtVrfObject::myOvlObstacleArea
protected
DtRwBoolean DtVrfObject::myOvlObstacleIsBreached
protected
DtList DtVrfObject::myPredicateCallbackList
protected

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.

DtVrfObjectCallbackList DtVrfObject::myVerticesChangedCallbackList
protected

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

DtVrfObjectCallbackList DtVrfObject::myNavigationInterfaceChangedCallbackList
protected

List of functions to call when the navigation interface has changed.

DtList DtVrfObject::myRelativeVerticesChangedCallbackList
protected

List of functions to call when some object data has changed.

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

std::map<DtObjectDataChangedCallbackFunction, std::set<void*> > DtVrfObject::myObjectDataChangedCallbackList
protected

List of callback functions to call when object data has changed.

DtVrfObjectCallbackList DtVrfObject::myAboutToBeRemovedCallbackList
protected
DtVrfObjectCallbackList DtVrfObject::mySetLocationCompleteCallbackList
protected
DtVrfObjectCallbackList DtVrfObject::myNewSensorContactCallbackList
protected
DtVrfObjectCallbackList DtVrfObject::myObjectModifiedViaMessage
protected
DtVrfUnderwaterAcoustics* DtVrfObject::myVrfUnderwaterAcoustics
protected
bool DtVrfObject::myAboutToBeRemoved
protected

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

Referenced by aboutToBeRemoved(), and setAboutToBeRemoved().

DtObjectConsole* DtVrfObject::myObjectConsole
protected
DtSetDataManager* DtVrfObject::mySetDataManager
protected
DtVrfObjectCommunicationInterface* DtVrfObject::myCommunicationInterface
protected
DtNavInterfaceManager* DtVrfObject::myNavInterfaceManager
protected
DtU8 DtVrfObject::myNextEmitterSystemId
protected
DtVrfObjectTerrainPreloadManager* DtVrfObject::myTerrainPreloadManager
protected
ScriptInterfaceExtensions DtVrfObject::myScriptInterfaceExtensions
protected
DtRangeRingsParametersPublisher* DtVrfObject::myRangeRingsParametersPublisher
protected

This object will manage range rings from state and parameter data.

DtVrfObjectParameters* DtVrfObject::myParameterEntry
protected
DtMovingObjectParameters* DtVrfObject::myMovingObject
protected
int DtVrfObject::theDefaultNotifyLevel
staticprotected
int DtVrfObject::myPotentialLuaScripts
protected
double DtVrfObject::myIlluminationValue
mutableprotected
double DtVrfObject::myLastTimeIlluminationCalculated
protected
double DtVrfObject::myLastTimeWeatherAreaCalculated
protected
DtGeodeticCoord DtVrfObject::myLastIlluminationPosition
protected
bool DtVrfObject::myMutableIlluminationCalculatedThisTick
mutableprotected

Tracks whether illumination has been calculated this tick or not. Only calculate it once for performance.

tbb::spin_rw_mutex DtVrfObject::myIlluminationMutex
mutableprotected
DtVrfObject* DtVrfObject::myWeatherObject
mutableprotected

The weather object retrieved the last time illumination was calculated.

bool DtVrfObject::myWeatherIsGlobal
mutableprotected
bool DtVrfObject::myMutableWeatherObjectUpdatedThisTick
mutableprotected
tbb::spin_rw_mutex DtVrfObject::myWeatherMutex
mutableprotected
DtVrfObjectDeletionHandle DtVrfObject::myObjectDeletionHandle
protected
bool DtVrfObject::myUseDayNightIlluminationModel
protected
DtVrfObjectUUID DtVrfObject::myUUID
protected
std::set<DtString> DtVrfObject::myNameAliasList
protected
DtSharedVrfObjectReference DtVrfObject::mySharedReference
mutableprotected
bool DtVrfObject::myWarnedObjectName
mutableprotected
bool DtVrfObject::mySimulationCapable
protected
const bool DtVrfObject::myConnectToRadioNetwork
protected
DtAttachedTerrain DtVrfObject::myObjectGeometryModel
protected

The object geometry that this object can use to see if it intersects with a higher level fidelity model.

DtTerrainGeometryHandle* DtVrfObject::myTerrainEmbeddedGeometry
protected

If the geometry for this object is embedded in the terrain this handle allows control.

DtTime DtVrfObject::myLastTerrainEmbeddedGeometryUpdateTime
protected
double DtVrfObject::myLastWeatherHeading
protected
bool DtVrfObject::myDuplicatedSubComponents
protected

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

Document ID: Generated on Wed Jul 25 16:57:45 EDT 2018 from SVN revision 190790
Copyright © 2005-2018 VT MÄK. All Rights Reserved (www.mak.com)