![]() |
VR-Forces 5.0.2 Developer's Guide
|
A special human character model.

Public Types | |
| enum | Posture { Upright, Crouched, Prone, Sitting, Kneeling, Swimming, Parachuting, Jumping, Squatting, Wading } |
Public Member Functions | |
| DtCharacterModel (DtDe &de, DtUniqueID id) | |
| virtual | ~DtCharacterModel () |
| virtual void | setFlamesPresent (bool val)=0 |
| virtual void | setEnginePlume (bool val)=0 |
| virtual void | setEngineSmoke (bool val)=0 |
| virtual void | setTrailState (bool val)=0 |
| virtual void | setLightState (unsigned int light, unsigned int lightState)=0 |
| virtual void | beginAppearanceEffect (const std::string &effect, const std::string &overrideLink, float overrideScale, const DtVector &overrideOffset, float overrideDuration)=0 |
| virtual void | endAppearanceEffect (int instantly, const std::string &effect, const std::string &overrideLink)=0 |
| virtual void | executeGesture (const std::string &gestureName, int reps, float overallDuration, float channelAWeight)=0 |
| virtual void | endGesture (const std::string &gestureName, float rampDown)=0 |
| virtual void | setEnableAnimationSmoothing (bool)=0 |
| virtual void | setDesiredAction (const std::string &action, float speed)=0 |
| virtual void | fireWeapon ()=0 |
| virtual void | forceAction (const std::string &action, float speed, bool usePositioning, const DtVector &offset, int autoChooseTransitionBehavior, float transitionSpeed)=0 |
| virtual void | forceTemporaryAction (const std::string &action, double duration)=0 |
| virtual void | unforceAction ()=0 |
| virtual void | setSpeed (float speed)=0 |
| virtual void | setPosture (int posture)=0 |
| virtual bool | weaponDeployed () const =0 |
| virtual EntityStateListener::WeaponState | weaponState () const =0 |
| virtual void | setWeaponState (EntityStateListener::WeaponState deployed)=0 |
| virtual void | die (const std::string &deathAction)=0 |
| virtual void | revive (const std::string &aliveAction)=0 |
| virtual void | setPaused (bool paused)=0 |
| virtual const std::string & | className () const |
| virtual void | setModelScalingEnabled (bool b)=0 |
| virtual void | setEmbarked (bool b)=0 |
| virtual void | setStationName (int name)=0 |
| virtual void | setStationNumber (DtU16 number)=0 |
| virtual void | setScale (const DtVector &scale)=0 |
| virtual void | setWeight (float weightScale)=0 |
| virtual void | setPartOrientation (int partNumber, const DtTaitBryan &orientation, const DtVector &rotationalVelocity)=0 |
| virtual void | setPartTranslation (int partNumber, const DtVector &translation, const DtVector &velocity)=0 |
| virtual void | setPartVisibility (int partNumber, bool visible)=0 |
| virtual void | setSelected (bool value)=0 |
| virtual void | setTextureVariations (std::vector< DtCharacterTextureVariationInfo > &varationInfoArray, int force)=0 |
| virtual void | setDynamicSensorRegion (const std::string ®ion, bool state)=0 |
| virtual void | setMotionModelByName (const std::string &modelName)=0 |
| virtual void | setUseTransitions (bool use)=0 |
| virtual void | setIsOccupant (bool occupant)=0 |
| virtual void | setEnabled (bool enabled)=0 |
Distributed functions. | |
| virtual void | setCharacterModel (const std::string &characterType)=0 |
DI-Guy Appearance Setters | |
| virtual void | setDefaultAppearance (const std::string &appearanceName)=0 |
| virtual void | setAppearance (const std::string &appearanceName)=0 |
| virtual void | setHeadAppearance (const std::string &appearanceName)=0 |
| virtual void | setItemAppearance (const std::string &appearanceName)=0 |
| virtual void | setCharacterEquipment (const std::string &appearanceName)=0 |
| virtual void | setUnit (unsigned short country, unsigned char service, unsigned short patch, bool setPersonal)=0 |
| virtual void | setPersonalUnit (unsigned short country, unsigned char service, unsigned short patch)=0 |
| virtual void | setRank (unsigned short country, unsigned char service, unsigned short patch)=0 |
| virtual void | setCharacterName (const std::string &name)=0 |
Public Member Functions inherited from makVrv::DtModel | |
| DtModel (DtDe &de, DtUniqueID id) | |
| virtual | ~DtModel () |
| DtModelInstance * | createModelInstance (const std::string &modelDefName, bool realize=true) |
| virtual void | setModelDefinition (const std::string &str) |
| virtual const std::string & | modelDefinitionName () |
| virtual void | saveModelToFile (const std::string &filename) |
| unsigned int | transformSize () const |
| virtual void | setPosition (int vtx, const DtVector &position) |
| virtual const DtVector & | position (int vtx=0) const |
| virtual void | removePosition (int vtx) |
| virtual void | setPositionOffset (const DtVector &positionOffset) |
| virtual const DtVector & | positionOffset () const |
| virtual void | setOrientation (int vtx, const DtTaitBryan &orientation) |
| virtual void | setPositionAndOrientation (int vtx, const DtVector &positionOffset, const DtTaitBryan &orientation) |
| virtual const DtTaitBryan & | orientation (int vtx=0) const |
| virtual void | setOrientationOffset (const DtTaitBryan &orientationOffset) |
| virtual const DtTaitBryan & | orientationOffset () const |
| virtual void | enableColorBlending (bool b) |
| virtual void | setBlendColor (float r, float g, float b, float a) |
| virtual void | getBlendColor (float &r, float &g, float &b, float &a) |
| virtual bool | colorBlendingEnabled () const |
| virtual void | setColor (float r, float g, float b, float a) |
| virtual void | enableLighting (bool l) |
| virtual int | modelSet () const |
| const DtVector & | boundingBoxExtents () const |
| void | getBoundingBoxExtents (double &x, double &y, double &z) const |
| const DtVector & | boundingBoxCenter () const |
| virtual void | getBoundingBoxCenter (double &x, double &y, double &z) const |
| virtual void | getBoundingBoxComponents (DtVector &minimum, DtVector &maximum) |
| void | setContributesToBound (bool trueOrFalse) |
| bool | contributesToBound () const |
| DtDe & | de () |
| virtual void | setModelInstance (DtModelInstance *modelInstance) |
| virtual void | promoteBackgroundModelInstance (DtModelDefinition &defintion) |
| virtual void | setVisible (bool isVisible) |
| virtual bool | visible () const |
| DtUniqueID | parentSceneObjectID () const |
| virtual void | addedToSceneObjectAsProp (const DtUniqueID &sceneObj) |
| virtual void | addedToSceneObject (const DtUniqueID &sceneObj, int modelSet, int visualizerType) |
| virtual void | setElementId (DtUniqueID id) |
| virtual void | removedFromSceneObject () |
| virtual void | setIsSupportModel (bool isSupport)=0 |
| virtual void | setSolid (bool isSolid) |
| virtual bool | isProp () |
| virtual void | updateMinLastFrameDistance (float distance) |
| virtual void | resetLastFrameDistance () |
| virtual float | minLastFrameDistance () const |
| virtual DtModelInstance * | modelInstance () |
| virtual const DtModelInstance * | modelInstance () const |
| int | visualizerType () const |
| virtual bool | supportsMultithreadedLoad () |
| virtual void | backgroundLoad () |
| virtual void | foregroundLoad () |
| virtual bool | isActivelyBackgroundLoading () |
| virtual DtLoaderHandle * | getLoadQueueHandle () |
Private Member Functions | |
| DtCharacterModel (const DtCharacterModel &)=delete | |
| DtCharacterModel & | operator= (const DtCharacterModel &)=delete |
Enumerated postures that can be used in the setPosture method. In the DtDiguyCharacterModel class, the values passed in to setPosture are cast directly to diguyMotionPosture, so it's important that any changes made to this enumeration still line up with the enumeration values in diguy.
| Enumerator | |
|---|---|
| Upright | |
| Crouched | |
| Prone | |
| Sitting | |
| Kneeling | |
| Swimming | |
| Parachuting | |
| Jumping | |
| Squatting | |
| Wading | |
| makVrv::DtCharacterModel::DtCharacterModel | ( | DtDe & | de, |
| DtUniqueID | id | ||
| ) |
CTOR.
|
virtual |
DTOR.
|
privatedelete |
Copy CTOR (Not implemented - non-copyable).
|
privatedelete |
Assignment operator (Not implemented - non-copyable).
|
pure virtual |
Override the character model in the model definition. This is necessary when explicitly setting the character via custom network messages.
Implemented in makVrv::DtDiGuyCharacterModel, and makVrv::DtDummyCharacterModel.
|
pure virtual |
set the base body appearance
Implemented in makVrv::DtDiGuyCharacterModel, and makVrv::DtDummyCharacterModel.
|
pure virtual |
set the base body appearance
Implemented in makVrv::DtDiGuyCharacterModel, and makVrv::DtDummyCharacterModel.
|
pure virtual |
sets the current character head
Implemented in makVrv::DtDiGuyCharacterModel, and makVrv::DtDummyCharacterModel.
|
pure virtual |
sets the character current hand item
Implemented in makVrv::DtDiGuyCharacterModel, and makVrv::DtDummyCharacterModel.
|
pure virtual |
sets additional equipment the character has | separated list, empty string to reset
Implemented in makVrv::DtDiGuyCharacterModel, and makVrv::DtDummyCharacterModel.
|
pure virtual |
Sets the character's primary unit patch.
Implemented in makVrv::DtDiGuyCharacterModel, and makVrv::DtDummyCharacterModel.
|
pure virtual |
Sets the character's personal unit patch.
Implemented in makVrv::DtDiGuyCharacterModel, and makVrv::DtDummyCharacterModel.
|
pure virtual |
Sets the character's rank patch.
Implemented in makVrv::DtDiGuyCharacterModel, and makVrv::DtDummyCharacterModel.
|
pure virtual |
Sets the text on the character's uniform.
Implemented in makVrv::DtDiGuyCharacterModel, and makVrv::DtDummyCharacterModel.
|
pure virtual |
turn on/off flames
Implemented in makVrv::DtDiGuyCharacterModel, and makVrv::DtDummyCharacterModel.
|
pure virtual |
turn on/off engine smoke plume
Implemented in makVrv::DtDiGuyCharacterModel, and makVrv::DtDummyCharacterModel.
|
pure virtual |
turn on/off engine smoke
Implemented in makVrv::DtDiGuyCharacterModel, and makVrv::DtDummyCharacterModel.
|
pure virtual |
turn on/off missle trail
Implemented in makVrv::DtDiGuyCharacterModel, and makVrv::DtDummyCharacterModel.
|
pure virtual |
turn on/off various lights
Implemented in makVrv::DtDiGuyCharacterModel, and makVrv::DtDummyCharacterModel.
|
pure virtual |
starts a diguy particles effect
Implemented in makVrv::DtDiGuyCharacterModel, and makVrv::DtDummyCharacterModel.
|
pure virtual |
ends a diguy particle effect
Implemented in makVrv::DtDiGuyCharacterModel, and makVrv::DtDummyCharacterModel.
|
pure virtual |
starts a diguy gesture, a animation that plays a limited amount
Implemented in makVrv::DtDiGuyCharacterModel, and makVrv::DtDummyCharacterModel.
|
pure virtual |
interrups the gesture incase it's still playing
Implemented in makVrv::DtDiGuyCharacterModel, and makVrv::DtDummyCharacterModel.
|
pure virtual |
Sets whether or not to use DI-Guy use_guides for positioning and orientation. Note this will only have an effect if use_guides is set to 1. The default, if use_guides is 1, to use position smoothing.
Implemented in makVrv::DtDiGuyCharacterModel, and makVrv::DtDummyCharacterModel.
|
pure virtual |
Set the action to attempt.
Implemented in makVrv::DtDiGuyCharacterModel, and makVrv::DtDummyCharacterModel.
|
pure virtual |
play fire weapon gesture and trigger effects.
Implemented in makVrv::DtDiGuyCharacterModel, and makVrv::DtDummyCharacterModel.
|
pure virtual |
Force an action. Use the given speed, and apply the offset over the course of the action.
Implemented in makVrv::DtDiGuyCharacterModel, and makVrv::DtDummyCharacterModel.
|
pure virtual |
Force an action for a specific amount of time.
Implemented in makVrv::DtDiGuyCharacterModel, and makVrv::DtDummyCharacterModel.
|
pure virtual |
Restore the ability to use posture/weapon state, which is disabled when an explicit action is set.
Implemented in makVrv::DtDiGuyCharacterModel, and makVrv::DtDummyCharacterModel.
|
pure virtual |
Set the speed of the character.
Implemented in makVrv::DtDiGuyCharacterModel, and makVrv::DtDummyCharacterModel.
|
pure virtual |
Set the posture of the model.
Implemented in makVrv::DtDiGuyCharacterModel, and makVrv::DtDummyCharacterModel.
|
pure virtual |
Get whether the weapon is deployed.
Implemented in makVrv::DtDiGuyCharacterModel, and makVrv::DtDummyCharacterModel.
|
pure virtual |
Get the current state of the weapon.
Implemented in makVrv::DtDiGuyCharacterModel, and makVrv::DtDummyCharacterModel.
|
pure virtual |
Set the current state of the weapon.
Implemented in makVrv::DtDiGuyCharacterModel, and makVrv::DtDummyCharacterModel.
|
pure virtual |
Tell the character to 'die. Dead characters perform their death action then disable most dynamic behavior (saving CPU cycles).
Implemented in makVrv::DtDiGuyCharacterModel, and makVrv::DtDummyCharacterModel.
|
pure virtual |
Revive a previously dead character.
Implemented in makVrv::DtDiGuyCharacterModel, and makVrv::DtDummyCharacterModel.
|
pure virtual |
Set that the character is paused.
Implemented in makVrv::DtDiGuyCharacterModel, and makVrv::DtDummyCharacterModel.
|
virtual |
Get the class name of the model instance owner. This is used to control how model instances are created.
Reimplemented from makVrv::DtModel.
Reimplemented in makVrv::DtDiGuyCharacterModel, and makVrv::DtDummyCharacterModel.
|
pure virtual |
Indicate whether or not this model may be model-scaled Default is false.
Implemented in makVrv::DtDiGuyCharacterModel, and makVrv::DtDummyCharacterModel.
|
pure virtual |
Set/Get embarked state.
Implemented in makVrv::DtDiGuyCharacterModel, and makVrv::DtDummyCharacterModel.
|
pure virtual |
Set embarked state station name.
Implemented in makVrv::DtDiGuyCharacterModel, and makVrv::DtDummyCharacterModel.
|
pure virtual |
Set embarked state station number (diguy use this for bone index)
Implemented in makVrv::DtDiGuyCharacterModel, and makVrv::DtDummyCharacterModel.
|
pure virtual |
Implemented in makVrv::DtDiGuyCharacterModel, and makVrv::DtDummyCharacterModel.
|
pure virtual |
Implemented in makVrv::DtDiGuyCharacterModel, and makVrv::DtDummyCharacterModel.
|
pure virtual |
Rotate the part.
Implemented in makVrv::DtDiGuyCharacterModel, and makVrv::DtDummyCharacterModel.
|
pure virtual |
translate the part.
Implemented in makVrv::DtDiGuyCharacterModel, and makVrv::DtDummyCharacterModel.
|
pure virtual |
control part visibility, not connected yet.
Implemented in makVrv::DtDiGuyCharacterModel, and makVrv::DtDummyCharacterModel.
|
pure virtual |
Implemented in makVrv::DtDiGuyCharacterModel, and makVrv::DtDummyCharacterModel.
|
pure virtual |
Implemented in makVrv::DtDiGuyCharacterModel, and makVrv::DtDummyCharacterModel.
|
pure virtual |
Set the state of a dynamic sensor region.
Implemented in makVrv::DtDiGuyCharacterModel, and makVrv::DtDummyCharacterModel.
|
pure virtual |
Set the motion model of the character This is currently used only for occupants.
Implemented in makVrv::DtDiGuyCharacterModel, and makVrv::DtDummyCharacterModel.
|
pure virtual |
Set whether animations use transitions and ramp downs.
Implemented in makVrv::DtDiGuyCharacterModel, and makVrv::DtDummyCharacterModel.
|
pure virtual |
Set whether this DI-Guy is used as a pilot/driver/occupant for a vehicle.
Implemented in makVrv::DtDiGuyCharacterModel, and makVrv::DtDummyCharacterModel.
|
pure virtual |
Set whether the character is enabled (processing updates, etc.)
Implemented in makVrv::DtDiGuyCharacterModel, and makVrv::DtDummyCharacterModel.