![]() |
VR-Forces Developer's Guide
|
This class provides an abstract base class for CIGI entities. These are created by the DtCigiEntityVisualizer and updated as CIGI messages that pertain to entities are processed.

Public Types | |
| enum | AnimationStateGroup { Stop = 0, Pause = 1, Play = 2, Continue = 3 } |
Public Member Functions | |
| DtCigiBaseEntity (DtCigiConnection &connection, DtAgentManagerInterface &sceneInterface, int entityId, int entityType) | |
| virtual | ~DtCigiBaseEntity () |
| virtual DtUniqueID | uniqueId () const |
| virtual DtUniqueID | elementId () const |
| virtual int | cigiId () const |
| virtual void | init () |
| virtual void | uninit () |
| virtual void | restart () |
| virtual void | restartRequest () |
| 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 | slot_smoothingChanged (bool enabled) |
| virtual void | slot_smoothingPeriodChanged (float period) |
| 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 void | setArtPartTranslation (int partId, float xOffset, float yOffset, float zOffset, bool xEnable, bool yEnable, bool zEnable) |
| virtual bool | getArtPartTranslation (int partId, DtVector &translation) |
| virtual void | setArtPartOrientation (int partId, float yaw, float pitch, float roll, bool yawEnable, bool pitchEnable, bool rollEnable) |
| virtual bool | getArtPartOrientation (int partId, DtTaitBryan &orientation) |
| virtual void | setArtPartLinearRate (int partId, float xRate, float yRate, float zRate) |
| virtual bool | getArtPartLinearRate (int partId, DtVector &rate) |
| virtual bool | getArtPartTranslationAndRate (int partId, DtVector &translation, DtVector &rate) |
| virtual void | setArtPartAngularRate (int partId, float yawRate, float pitchRate, float rollRate) |
| virtual bool | getArtPartAngularRate (int partId, DtVector &rate) |
| virtual bool | getArtPartOrientationAndRate (int partId, DtTaitBryan &orientation, DtVector &rate) |
| virtual void | setArtPartEnable (int partId, bool trueFalse) |
| 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 |
| makVrv::DtCigiBaseEntity::DtCigiBaseEntity | ( | DtCigiConnection & | connection, |
| DtAgentManagerInterface & | sceneInterface, | ||
| int | entityId, | ||
| int | entityType | ||
| ) |
Constructor takes a DtCigiConnection, scene interface, and the CIGI entity ID/type.
|
virtual |
Destructor.
|
virtual |
Returns the element ID of the entity's scene object. Use of this method is deprecated; use elementId()
|
virtual |
Returns the element ID of the entity's scene object.
|
virtual |
Returns the CIGI Id of the CIGI entity.
|
virtual |
Create the scene object used by the entity and report the entity element and its parameters.
Reimplemented in makVrv::DtCigiRotorWashEntity, makVrv::DtCigiCharacterEntity, makVrv::DtCigiWatercraftEntity, makVrv::DtCigiParticleCollisionObjectEntity, makVrv::DtCigiEntity, makVrv::DtCigiRibbonEntity, makVrv::DtCigiParticleSystemEntity, and makVrv::DtCigiAnimationEntity.
|
virtual |
Destroy the scene object created in init(), any updaters created along the way, and report the element destroyed.
Reimplemented in makVrv::DtCigiRotorWashEntity, makVrv::DtCigiCharacterEntity, makVrv::DtCigiWatercraftEntity, makVrv::DtCigiEntity, makVrv::DtCigiParticleCollisionObjectEntity, makVrv::DtCigiWakeEntity, makVrv::DtCigiRibbonEntity, makVrv::DtCigiParticleSystemEntity, and makVrv::DtCigiAnimationEntity.
|
virtual |
Calls uninit(), init(), and then restores dead reckoning, embarkation, etc. If the entity is embarked, it will schedule restoration of embark state for the beginning of the next tick to ensure that the parent entity restoration is complete.
Reimplemented in makVrv::DtCigiRotorWashEntity, makVrv::DtCigiCharacterEntity, makVrv::DtCigiEntity, makVrv::DtCigiWatercraftEntity, makVrv::DtCigiParticleSystemEntity, and makVrv::DtCigiAnimationEntity.
|
virtual |
This is called to request that the entity be restarted. If not dead reckoned, restart() will be called immediately. Otherwise, the current position and orientation are requested from the render thread (and restart() will be called when those values are available.
Reimplemented in makVrv::DtCigiEntity.
|
virtual |
Get the entity type the entity was created with.
|
virtual |
Get whether the entity has extended type on.
|
virtual |
Set whether this entity uses extended entity type.
|
virtual |
Set the extended type.
|
virtual |
Set whether the entity is visible.
Reimplemented in makVrv::DtCigiWakeEntity.
|
virtual |
Get the current visibility.
|
virtual |
Turns dead-reckoning on/off.
|
virtual |
Determine if the entity is ACTUALLY dead reckoning. This is the logical && of its myDeadReckoningOn flag (which means that CIGI has requested that THIS entity be dead reckoned) and DtVrlinkBaseConnection::extrapolationEnabled(), which CIGI uses to globally allow or disallow dead reckoning.
|
virtual |
Set the entity's geodetic position.
| [in] | pos | is the position set from the CIGI entity control message. |
| [in] | force | is a flag to force handling even if position has not changed. |
Reimplemented in makVrv::DtCigiCharacterEntity, makVrv::DtCigiWatercraftEntity, and makVrv::DtCigiWakeEntity.
|
virtual |
Returns the last position set by a CIGI entity control message.
|
virtual |
Returns the entity's position that was set previously. setPosition() sets the member myLastPosition. This returns that value so we can cache it and use it later when setting orientation to know if we our position has changed. This is necessary for geocentric coordinates, because the CIGI topo orientation needs to be re-converted to geocentric even if it hasn't changed if the entity's position has.
|
virtual |
Returns the last computed local position set.
|
virtual |
Set the entity's orientation.
| [in] | orientation | is the orientation set from the CIGI entity control message. |
| [in] | force | is a flag to force handling even if orientation has not changed. |
Reimplemented in makVrv::DtCigiCharacterEntity, makVrv::DtCigiWatercraftEntity, and makVrv::DtCigiWakeEntity.
|
virtual |
Returns the last orientation set by a CIGI entity control message.
|
virtual |
Returns the computed last local orientation.
|
virtual |
Get the last computed geocentric orientation.
|
virtual |
Sets the entity's linear rate. If useWorldCoordinates is set to true, sets the velocity according to the entity's rate with respect to the tangential reference plane of the entity. Otherwise, sets the velocity with respect to the entity's coordinate system.
Reimplemented in makVrv::DtCigiWakeEntity, and makVrv::DtCigiWatercraftEntity.
|
virtual |
Get the last set linear rate.
|
virtual |
Set's the entity's angular rate. If useWorldCoordinates is set to true, sets the angular velocity with respect to the tangential reference plane of the entity. Otherwise, sets the velocity with respect to the entity's coordinate system.
|
virtual |
Get the last set angular rate.
|
virtual |
|
virtual |
Sets the entity's relative position (if attached).
Reimplemented in makVrv::DtCigiWakeEntity.
|
virtual |
Sets the entity's relative orientation (relative to the parent's body coordinates) if attached.
Reimplemented in makVrv::DtCigiWakeEntity.
|
virtual |
Determine if the entity is attached to a parent entity.
|
virtual |
Get the CIGI ID of the entity to which we are attached.
|
virtual |
Returns the last relative offset position.
|
virtual |
Returns the last relative orientation.
|
virtual |
Called when IG-wide extrapolation is turned on or off. Stops the entity from dead reckoning if it currently is (but remembers if it was) and turns dead reckoning on if the entity has requested dead reckoning and it becomes allowed again.
|
virtual |
Called when the application-wide is smoothing enabled flag is changed.
|
virtual |
Called when the application-wide smoothing period is adjusted.
|
virtual |
Sets the entity's alpha value.
|
virtual |
Returns the entity's alpha value. This needs to be checked if the entity is inheriting its parent's alpha.
|
virtual |
Set whether the entity should inherit alpha from its parent.
|
virtual |
Determine if the entity is inheriting alpha.
|
virtual |
Slot so we can check if the parent's alpha has changed.
|
virtual |
Connected to the signal raised by the entity manager when an entity is removed, this is used to insure that signals connected to an embarkation parent are managed correctly if/when that parent is deleted.
|
virtual |
Turns ground clamping on/off.
|
virtual |
Get the current ground clamping type.
|
virtual |
Set the relative position of an articulated part.
Reimplemented in makVrv::DtCigiCharacterEntity, and makVrv::DtCigiEntity.
|
virtual |
Get the art part translation from a specified CIGI part id. Returns false if the part id is not found.
|
virtual |
Set the orientation of an articulated part.
Reimplemented in makVrv::DtCigiCharacterEntity, and makVrv::DtCigiEntity.
|
virtual |
Returns false if the part id is not found.
|
virtual |
Set the linear rate of an articulated part.
Reimplemented in makVrv::DtCigiCharacterEntity, and makVrv::DtCigiEntity.
Get the art part translation rate from a specified CIGI part id. Returns false if the part id is not found.
|
virtual |
Get the art part translation and rate from a specified CIGI part id. Returns false if the part id is not found.
|
virtual |
Set the angular rate of an articulated part.
Reimplemented in makVrv::DtCigiCharacterEntity, and makVrv::DtCigiEntity.
|
virtual |
Returns false if the part id is not found.
|
virtual |
Returns false if the part id is not found.
Enable/disable an articulated part.
Reimplemented in makVrv::DtCigiCharacterEntity, and makVrv::DtCigiEntity.
|
virtual |
Methods for adding a removing collision segment IDs that are associated with this entity. They modify values in myCollisionSegmentIdList.
List for Collision Detection Segment IDs from collision segment detection definition packets.
|
protectedvirtual |
Create and set up Dead Reckoning updater.
Reimplemented in makVrv::DtCigiCharacterEntity, and makVrv::DtCigiWatercraftEntity.
|
protectedvirtual |
Remove the Dead Reckoning updater.
Reimplemented in makVrv::DtCigiCharacterEntity, and makVrv::DtCigiWatercraftEntity.
|
protectedvirtual |
Create and set up Embarkation updater.
Reimplemented in makVrv::DtCigiCharacterEntity, makVrv::DtCigiRotorWashEntity, and makVrv::DtCigiWatercraftEntity.
|
protectedvirtual |
Remove the Embarkation updater.
Reimplemented in makVrv::DtCigiCharacterEntity, makVrv::DtCigiRotorWashEntity, and makVrv::DtCigiWatercraftEntity.
|
protectedvirtual |
Create and set up Ground Clamping updater; uses buildGroundClampingUpdater() to create the updater agents.
Reimplemented in makVrv::DtCigiCharacterEntity.
|
protectedvirtual |
Create and intialize the ground clamping updater agents.
|
protectedvirtual |
Remove the Ground Clamping updater.
Reimplemented in makVrv::DtCigiCharacterEntity.
|
protectedvirtual |
Returns false if ground clamping type is DtGroundClampingUpdater::ClampNone true otherwise.
|
protectedvirtual |
Request position and orientation values from the render thread if this entity is dead reckoned.
Reimplemented in makVrv::DtCigiEntity.
|
virtual |
When an embarked entity is restarted, it needs to be reattached to its parent at the start of the next frame (after all other entities have been restarted). This is the slot called when the attached-to boost signal preTick is raised. It detaches from the signal and then calls startEkbarked(). This method needs to be public for the DtCigiRotorWashEntity() restart method.
|
protectedvirtual |
This is the render thread-run method that collects dead reckoned position and orientation. It is queued as a 'driver' function if the CIGI connection is running in its own thread.
|
protectedvirtual |
This method returns the position and orientation collected from the render thread in the
connection thread. If the CIGI connection is running in its own thread, then queryExtrapolatedPositionAndOrientation() will queue this as a 'connection' function. If invokeRestart is true, then restart() will be called when before this function returns
|
protectedvirtual |
Helper function called by queryExtrapolatedPositionAndOrientation to look up the the dead reckon updater object given its agent id.
| vrvSignalsLib::signal<void (int, DtUniqueID)> makVrv::DtCigiBaseEntity::signal_alphaChanged |
Emitted when this entity's alpha has changed.
|
protected |
List for Collision Detection Segment IDs from collision segment detection definition packets.
|
protected |
List for Collision Detection Segment IDs from collision segment detection definition packets.
|
protected |
List for Collision Detection Segment IDs from collision segment detection definition packets.
|
protected |
List for Collision Detection Segment IDs from collision segment detection definition packets.
|
protected |
List for Collision Detection Segment IDs from collision segment detection definition packets.
|
protected |
List for Collision Detection Segment IDs from collision segment detection definition packets.
|
protected |
List for Collision Detection Segment IDs from collision segment detection definition packets.
|
protected |
List for Collision Detection Segment IDs from collision segment detection definition packets.
|
protected |
List for Collision Detection Segment IDs from collision segment detection definition packets.
|
protected |
List for Collision Detection Segment IDs from collision segment detection definition packets.
|
protected |
List for Collision Detection Segment IDs from collision segment detection definition packets.
|
protected |
List for Collision Detection Segment IDs from collision segment detection definition packets.
|
protected |
List for Collision Detection Segment IDs from collision segment detection definition packets.
|
protected |
List for Collision Detection Segment IDs from collision segment detection definition packets.
|
protected |
List for Collision Detection Segment IDs from collision segment detection definition packets.
|
protected |
List for Collision Detection Segment IDs from collision segment detection definition packets.
|
protected |
List for Collision Detection Segment IDs from collision segment detection definition packets.
|
protected |
List for Collision Detection Segment IDs from collision segment detection definition packets.
|
protected |
List for Collision Detection Segment IDs from collision segment detection definition packets.
|
protected |
List for Collision Detection Segment IDs from collision segment detection definition packets.
|
protected |
List for Collision Detection Segment IDs from collision segment detection definition packets.
|
protected |
List for Collision Detection Segment IDs from collision segment detection definition packets.
|
protected |
List for Collision Detection Segment IDs from collision segment detection definition packets.
|
protected |
List for Collision Detection Segment IDs from collision segment detection definition packets.
|
protected |
List for Collision Detection Segment IDs from collision segment detection definition packets.
|
protected |
List for Collision Detection Segment IDs from collision segment detection definition packets.
|
protected |
List for Collision Detection Segment IDs from collision segment detection definition packets.
|
protected |
List for Collision Detection Segment IDs from collision segment detection definition packets.
|
protected |
List for Collision Detection Segment IDs from collision segment detection definition packets.
|
protected |
List for Collision Detection Segment IDs from collision segment detection definition packets.
|
protected |
List for Collision Detection Segment IDs from collision segment detection definition packets.
|
protected |
List for Collision Detection Segment IDs from collision segment detection definition packets.
|
protected |
List for Collision Detection Segment IDs from collision segment detection definition packets.
|
protected |
List for Collision Detection Segment IDs from collision segment detection definition packets.
|
protected |
List for Collision Detection Segment IDs from collision segment detection definition packets.
|
protected |
List for Collision Detection Segment IDs from collision segment detection definition packets.
|
protected |
List for Collision Detection Segment IDs from collision segment detection definition packets.
List for Collision Detection Segment IDs from collision segment detection definition packets.
|
protected |
List for Collision Detection Segment IDs from collision segment detection definition packets.
|
protected |
List for Collision Detection Segment IDs from collision segment detection definition packets.
|
protected |
List for Collision Detection Segment IDs from collision segment detection definition packets.