![]() |
VR-Forces 5.0.1 Developer's Guide
|
A DtCigiEntity is a base CIGI entity that loads an articulated model.

Classes | |
| struct | AnimationRange |
Public Member Functions | |
| DtCigiEntity (DtCigiConnection &connection, DtAgentManagerInterface &mySceneInterface, int entityId, int entityType) | |
| virtual | ~DtCigiEntity () |
| virtual void | init () |
| virtual void | uninit () |
| virtual void | restartRequest () |
| virtual void | restart () |
| virtual void | setState (int stateId, int stateValue) |
| virtual void | setArtPartTranslation (int partId, float xOffset, float yOffset, float zOffset, bool xEnable, bool yEnable, bool zEnable) |
| virtual void | setArtPartOrientation (int partId, float yaw, float pitch, float roll, bool yawEnable, bool pitchEnable, bool rollEnable) |
| virtual void | setArtPartLinearRate (int partId, float xRate, float yRate, float zRate) |
| virtual void | setArtPartAngularRate (int partId, float yawRate, float pitchRate, float rollRate) |
| virtual void | setArtPartEnable (int partId, bool trueFalse) |
| virtual void | setAnimationSpeed (const std::string &animationName, double speed) |
| virtual void | setAnimationFrame (const std::string &animationName, int frame) |
| virtual void | setActiveRegionState (const std::string ®ionName, bool state) |
| virtual void | setAnimationRange (const std::string &animationName, int firstFrameIndex, int lastFrameIndex) |
| virtual void | setAnimationState (const std::string &animationName, int stateEnum) |
| virtual int | animationState (const std::string &animationName) |
| virtual bool | hasAnimations () const |
| virtual DtOsgArticulatedModel * | findArticulatedModelInRenderThread (DtUniqueID modelId) const |
| virtual const DtArticulatedModelAgent & | articulatedModelAgent () const |
| virtual DtArticulatedModelAgent & | articulatedModelAgent () |
Public Member Functions inherited from makVrv::DtCigiBaseEntity | |
| DtCigiBaseEntity (DtCigiConnection &connection, DtAgentManagerInterface &sceneInterface, int entityId, int entityType) | |
| virtual | ~DtCigiBaseEntity () |
| virtual DtUniqueID | uniqueId () const |
| virtual DtUniqueID | elementId () const |
| virtual int | cigiId () const |
| virtual int | entityType () const |
| virtual bool | extendedEntityTypeOn () const |
| virtual void | setExtendedEntityTypeOn (bool onOff) |
| virtual void | setExtendedEntityType (DtEntityType &entityType) |
| virtual void | setVisible (bool yesNo) |
| virtual bool | isVisible () const |
| virtual void | setDeadReckoningOn (bool onOff) |
| virtual bool | isDeadReckoning () const |
| virtual void | setPosition (const DtGeodeticCoord &pos, bool force=false) |
| virtual const DtGeodeticCoord & | position () const |
| virtual const DtGeodeticCoord & | previousPosition () const |
| virtual const DtVector & | localPosition () const |
| virtual void | setOrientation (const DtTaitBryan &orientation, bool force=false) |
| virtual const DtTaitBryan & | orientation () const |
| virtual const DtTaitBryan & | localOrientation () const |
| virtual const DtTaitBryan & | geocentricOrientation () const |
| virtual void | setLinearRate (const DtVector &rate, bool useWorldCoordinates, bool force=false) |
| virtual const DtVector & | linearRate () const |
| virtual void | setAngularRate (const DtVector &rate, bool useWorldCoordinates, bool force=false) |
| virtual const DtVector & | angularRate () const |
| virtual void | slot_deadReckoningAllowed (bool allowed) |
| virtual void | setAlpha (int alpha) |
| virtual int | alpha () const |
| virtual void | setInheritAlpha (bool inherit) |
| virtual bool | isInheritingAlpha () const |
| virtual void | slot_alphaChanged (int alpha, DtUniqueID id) |
| virtual void | slot_entityToBeDeleted (int cigiEntityId) |
| virtual void | setGroundClampingOn (DtGroundClampingUpdater::GroundClampingMode clampType) |
| virtual DtGroundClampingUpdater::GroundClampingMode | groundClampingType () const |
| virtual bool | getArtPartTranslation (int partId, DtVector &translation) |
| virtual bool | getArtPartOrientation (int partId, DtTaitBryan &orientation) |
| virtual bool | getArtPartLinearRate (int partId, DtVector &rate) |
| virtual bool | getArtPartTranslationAndRate (int partId, DtVector &translation, DtVector &rate) |
| virtual bool | getArtPartAngularRate (int partId, DtVector &rate) |
| virtual bool | getArtPartOrientationAndRate (int partId, DtTaitBryan &orientation, DtVector &rate) |
| virtual DtSceneObjectAgent * | findSceneObjectAgent () |
| virtual void | setRelativeTo (DtCigiBaseEntity *parent) |
| virtual void | setRelativePosition (const DtVector &pos) |
| virtual void | setRelativeOrientation (const DtTaitBryan &orient) |
| virtual bool | isEmbarked () const |
| virtual int | embarkedParentId () const |
| virtual const DtVector & | relativePosition () const |
| virtual const DtTaitBryan & | relativeOrientation () const |
| virtual void | addCollisionSegmentID (unsigned int segmentId) |
| virtual void | removeCollisionSegmentID (unsigned int segmentId) |
| virtual void | delayedStartEmbarked () |
Protected Types | |
| typedef boost::unordered_map < int, int > | StateMap |
| typedef boost::unordered_map < std::string, int > | AnimationFrameMap |
| typedef boost::unordered_map < std::string, double > | AnimationSpeedMap |
| typedef boost::unordered_map < std::string, AnimationRange > | AnimationRangeMap |
| typedef boost::unordered_map < std::string, DtCigiBaseEntity::AnimationStateGroup > | AnimationStateMap |
| typedef boost::unordered_map < std::string, bool > | DynamicRegionMap |
Protected Member Functions | |
| virtual void | getExtrapolatedValuesAndRestart () |
| virtual void | queryCurrentAnimationFrame (DtUniqueID modelId, std::string animationName) |
| virtual void | returnCurrentAnimationFrame (const std::string &animationName, int frameNum) |
| virtual void | queryExtrapolatedArtPartTranslation (DtUniqueID modelId, int cigiPartId, int disRprPartId) |
| virtual void | returnExtrapolatedArtPartTranslation (int cigiPartId, int disRprPartId, const DtVector &translation) |
| virtual void | queryExtrapolatedArtPartOrientation (DtUniqueID modelId, int cigiPartId, int disRprPartId) |
| virtual void | returnExtrapolatedArtPartOrientation (int cigiPartId, int disRprPartId, const DtTaitBryan &translation) |
| virtual void | queryCurrentAnimationState (DtUniqueID modelId, std::string animationName) |
| virtual void | returnCurrentAnimationState (const std::string &animationName, int stateEnum) |
Protected Member Functions inherited from makVrv::DtCigiBaseEntity | |
| virtual void | startDeadReckoning () |
| virtual void | endDeadReckoning () |
| virtual void | startEmbarked () |
| virtual void | endEmbarked () |
| virtual void | startGroundClamping () |
| virtual void | buildGroundClampingUpdater () |
| virtual void | endGroundClamping () |
| virtual bool | isGroundClamping () const |
| virtual void | queryExtrapolatedPositionAndOrientation (DtUniqueID drAgentId, bool relative) |
| virtual void | returnExtrapolatedPositionAndOrientation (const DtVector &resultPos, const DtTaitBryan &resultOri, bool relative, bool invokeRestart) |
| virtual DtDeadReckonUpdater * | findDRUpdaterInRenderThread (DtUniqueID drAgentId) const |
Additional Inherited Members | |
Public Types inherited from makVrv::DtCigiBaseEntity | |
| enum | AnimationStateGroup { Stop = 0, Pause = 1, Play = 2, Continue = 3 } |
Public Attributes inherited from makVrv::DtCigiBaseEntity | |
| boost::signalslib::signal < void(int, DtUniqueID)> | signal_alphaChanged |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
| makVrv::DtCigiEntity::DtCigiEntity | ( | DtCigiConnection & | connection, |
| DtAgentManagerInterface & | mySceneInterface, | ||
| int | entityId, | ||
| int | entityType | ||
| ) |
Constructor.
|
virtual |
Destructor.
|
virtual |
Calls down to DtCigiBaseEntity::init(), creates an articulated model, provides a model definition to it, and adds it to the scene object created in DtCigiBaseEntity::init().
Reimplemented from makVrv::DtCigiBaseEntity.
Reimplemented in makVrv::DtCigiWatercraftEntity.
|
virtual |
Calls down to DtCigiBaseEntity::uninit(), and then deletes the articulated model created in init().
Reimplemented from makVrv::DtCigiBaseEntity.
Reimplemented in makVrv::DtCigiWatercraftEntity.
|
virtual |
Overrides the base DtCigiBaseEntity::rtestart(), the only difference between them is that this will request extrapolated values not only if the entity is dead reckoned but also if hasAnimations() returns true.
Reimplemented from makVrv::DtCigiBaseEntity.
|
virtual |
Calls down to DtCigiBaseEntity::restart(), then reinintializes art parts, animation states, switch states, and active sensor regions.
Reimplemented from makVrv::DtCigiBaseEntity.
Reimplemented in makVrv::DtCigiWatercraftEntity.
Set the state of a model to a value.
|
virtual |
Set the relative position of an articulated part.
Reimplemented from makVrv::DtCigiBaseEntity.
|
virtual |
Set the orientation of an articulated part.
Reimplemented from makVrv::DtCigiBaseEntity.
|
virtual |
Set the linear rate of an articulated part.
Reimplemented from makVrv::DtCigiBaseEntity.
|
virtual |
Set the angular rate of an articulated part.
Reimplemented from makVrv::DtCigiBaseEntity.
Enable/disable an articulated part.
Reimplemented from makVrv::DtCigiBaseEntity.
|
virtual |
Set the speed of an animation within the model.
|
virtual |
Set the frame of an animation within the model.
|
virtual |
Set the state of an active sensor region.
|
virtual |
Set the range of an animation within the model.
|
virtual |
Set the animation state Takes CIGI Enum mappings, will convert to OSG for art part model.
|
virtual |
Gets the animation state for particular animation Returns cigi enum mappings.
|
virtual |
This is not absolute, but IF any of the methods that change animation values have been called, then this will return true. It is used to determine if, on restart, an entity that is not dead reckoned will still delay the restart and query the render thread for animation state.
|
virtual |
Returns a reference to the Articulated Model for this Entity Needed as the model has a difference unique ID to the cigi entity.
|
virtual |
Returns a reference to the Articulated Model for this Entity Needed as the model has a difference unique ID to the cigi entity.
|
protectedvirtual |
Request position and orientation values from the render thread if this entity is dead reckoned.
Reimplemented from makVrv::DtCigiBaseEntity.
|
protectedvirtual |
This is the render thread-run method that collects the current animation frame for the specified animation on the indicated model. It is queued as a 'driver' function if the CIGI connection is running in its own thread.
|
protectedvirtual |
This method returns the current animation framefor the specified animation collected from the render thread in the connection thread. If the CIGI connection is running in its own thread, then queryCurrentAnimationFrame() will queue this as a 'connection' function.
|
protectedvirtual |
This is the render thread-run method that collects the current art part translation value for the specified part on the indicated model. It is queued as a 'driver' function if the CIGI connection is running in its own thread.
|
protectedvirtual |
This method returns the current art part translation values collected from the render thread in the connection thread. If the CIGI connection is running in its own thread, then queryExtrapolatedArtPartTranslation() will queue this as a 'connection' function.
|
protectedvirtual |
This is the render thread-run method that collects the current art part oriuentation value for thespecified part on the indicated model. It is queued as a 'driver' function if the CIGI connection is running in its own thread.
|
protectedvirtual |
This method returns the current art part orientation values collected from the render thread in the connection thread. If the CIGI connection is running in its own thread, then queryExtrapolatedArtPartOrientation() will queue this as a 'connection' function.
|
virtual |
Helper function called by queryExtrapolatedPositionAndOrientation to look up the the articulated model object given its agent id.
|
protectedvirtual |
This is the render thread-run method that collects the current animation state for the specified animation on the indicated model. It is queued as a 'driver' function if the CIGI connection is running in its own thread.
|
protectedvirtual |
This method returns the current animation state for the specified animation collected from the render thread in the connection thread. If the CIGI connection is running in its own thread, then queryCurrentAnimationState() will queue this as a 'connection' function. Takes osg state mappings.
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |