![]() |
VR-Forces 5.0.2 Developer's Guide
|
A DtCigiCharacterEntity is a CIGI base entity that loads a character (Di Guy) model.

Classes | |
| struct | gestureData |
Public Member Functions | |
| DtCigiCharacterEntity (DtCigiConnection &connection, DtAgentManagerInterface &sceneInterface, int entityId, int entityType) | |
| virtual | ~DtCigiCharacterEntity () |
| virtual void | init () |
| virtual void | uninit () |
| virtual void | restart () |
| virtual void | setPosition (const DtGeodeticCoord &pos, bool force=false) |
| virtual void | setOrientation (const DtTaitBryan &orientation, bool force=false) |
| virtual void | setCharacterPaused (bool paused) |
| virtual void | setCharacterActionSpeed (float speed) |
| virtual void | unforceAction () |
| virtual void | setCharacterAction (const std::string &action) |
| virtual void | setCharacterAction (const std::string &action, bool paused, double speed, bool usePositioning, const DtVector &offset) |
| virtual void | setCharacterPosture (DtCharacterModel::Posture posture) |
| virtual void | setWeaponState (EntityStateListener::WeaponState state) |
| virtual EntityStateListener::WeaponState | weaponState () const |
| virtual void | setAlive (bool alive) |
| virtual bool | alive () const |
| virtual void | executeGesture (const std::string &gestureName, int reps, float duration, float channelAWeight) |
| virtual void | endGesture (const std::string &gestureName, float rampDown) |
| virtual void | setItemAppearance (const std::string &itemAppearance) |
| virtual const std::string & | itemAppearance () const |
| virtual void | setHeadAppearance (const std::string &headAppearance) |
| virtual const std::string & | headAppearance () const |
| virtual void | setCharacterScale (const DtVector &scale) |
| virtual const DtVector & | characterScale () const |
| virtual void | setCharacterWeight (float characterWeight) |
| virtual float | characterWeight () const |
| virtual void | setWaterlineOriginOffset (float offset) |
| virtual void | startEmbarked () |
| virtual void | endEmbarked () |
| 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 | setIsAmphibious (bool isAmphibious) |
| virtual bool | isAmphibious () const |
| virtual bool | gestureInitialRepetitions (const std::string &gestureName, int &reps) const |
| virtual bool | gestureInitialDuration (const std::string &gestureName, float &duration) const |
| virtual bool | gestureChannelAWeight (const std::string &gestureName, float &weight) const |
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 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 const DtGeodeticCoord & | position () const |
| virtual const DtGeodeticCoord & | previousPosition () const |
| virtual const DtVector & | localPosition () const |
| 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 struct makVrv::DtCigiCharacterEntity::gestureData | GestureData |
| typedef boost::unordered_map < std::string, GestureData > | GestureDataMap |
Protected Member Functions | |
| virtual void | startDeadReckoning () |
| virtual void | endDeadReckoning () |
| virtual void | startGroundClamping () |
| virtual void | endGroundClamping () |
Protected Member Functions inherited from makVrv::DtCigiBaseEntity | |
| virtual void | buildGroundClampingUpdater () |
| virtual bool | isGroundClamping () const |
| virtual void | getExtrapolatedValuesAndRestart () |
| 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 |
| makVrv::DtCigiCharacterEntity::DtCigiCharacterEntity | ( | DtCigiConnection & | connection, |
| DtAgentManagerInterface & | sceneInterface, | ||
| int | entityId, | ||
| int | entityType | ||
| ) |
Constructor.
|
virtual |
Destructor.
|
virtual |
Calls down to DtCigiBaseEntity::init(), creates an character model, provides a model definition to it, and adds it to the scene object created in DtCigiBaseEntity::init(). It also provides default values to the character model's character action, paused state, action speed, posture, and weapon deployment. It also creates a surface and water clamping updater, as character models are amphibious (will float in water as well as walk on land).
Reimplemented from makVrv::DtCigiBaseEntity.
|
virtual |
Calls down to DtCigiBaseEntity::uninit(), and then deletes the character model created in init(). It also deletes the surface and water clamping updaters.
Reimplemented from makVrv::DtCigiBaseEntity.
|
virtual |
Calls down to DtCigiBaseEntity::restart(), then reinintializes art parts and alive state.
Reimplemented from makVrv::DtCigiBaseEntity.
|
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 from makVrv::DtCigiBaseEntity.
|
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 from makVrv::DtCigiBaseEntity.
|
virtual |
Set paused state without specifying an action.
|
virtual |
Change action speed of an existing action.
|
virtual |
If a character action has been given earlier, it overrides any posture / weapon state settings. This needs to be called to go back to using posture/weapon state instead of explicit animation.
|
virtual |
Set a character action. Will used saved previous paused, speed, and offset.
|
virtual |
Fully set a character action. Sets the action to perform, the speed, whether the action is paused or not, and how much offset to apply over the course of the action.
|
virtual |
Set a character's posture.
|
virtual |
Set whether the character's weapon is deployed. Note that not all postures or animations will support a deployed weapon.
|
virtual |
Get whether the character's weapon is deployed.
|
virtual |
Set whether the character is alive. The transition from alive to not alive will result in an animation; and from not alive to alive the entity will be restored to its last state.
|
virtual |
Get whether the character is alive.
|
virtual |
Execute the specified gesture reps - how many times the gesture should be repeated; default is 1 if no duration is specified, or best fit if there is a duration specified duration - how long the gesture should be executed; default is such that no time scaling occurs channelAWeight - the weight given to channel A of the gesture; ignored if the gesture does not have multiple channels Note that if a gesture with the same name is already executing, this is ignored.
|
virtual |
Stop the named gesture from executing. Rampdown - the max amount of time spent trying to smooth over any motion seams; set to 0.5 for a smooth transition, set to 0 for an immediate abort.
|
virtual |
Set the appearance of the entity's currently held item.
|
virtual |
Get the appearance of the entity's currently held item, if set.
|
virtual |
Set the appearance of the entity's current head.
|
virtual |
Get the appearance of the entity's current head.
|
virtual |
Set the character scale.
|
virtual |
|
virtual |
Set the character weight.
|
virtual |
Get the character weight.
|
virtual |
Set the amount that a bouyant entity's origin is offset from the waterline.
|
virtual |
Override to prevent amphibious behavior when embarked.
Reimplemented from makVrv::DtCigiBaseEntity.
|
virtual |
Override to restore amphibious behavior when disembarked.
Reimplemented from makVrv::DtCigiBaseEntity.
|
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 |
This is used by the buoyancy model to indicate if checks need to be made for being over water. When false (default) use assumes responsibility for keeping entity over land (note that the test for land is expensive, so keep this false unless you need it for an amphibious entity)
|
virtual |
This is used by the buoyancy model to indicate if checks need to be made for being over water. When false (default) use assumes responsibility for keeping entity over land (note that the test for land is expensive, so keep this false unless you need it for an amphibious entity)
|
virtual |
The repetition count this gesture was started with (< 0. means use gesture default) returns false if the gesture isn't found.
|
virtual |
The duration (in seconds) the gesture was started with (< 0. means use gesture default) returns false if the gesture isn't found.
|
virtual |
The weight assigned to the 'A' channel (for a multi-channel gesture) returns false if the gesture isn't found.
|
protectedvirtual |
Override to specify the correct motion model.
Reimplemented from makVrv::DtCigiBaseEntity.
|
protectedvirtual |
Remove the Dead Reckoning updater.
Reimplemented from makVrv::DtCigiBaseEntity.
|
protectedvirtual |
Override to work with surface clamping updater, because character's are amphibious.
Reimplemented from makVrv::DtCigiBaseEntity.
|
protectedvirtual |
Remove the ground clamping updater.
Reimplemented from makVrv::DtCigiBaseEntity.
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |