![]() |
VR-Forces 4.5 Class Documentation
|
Stores data representing all the possible appearances, animations, hand items, heads, etc. More...

Public Types | |
| typedef std::map< DtString, DtDiGuyAnimationSharedPtr > | TaskAnimationMap |
| typedef TaskAnimationMap::iterator | TaskAnimationMapIterator |
| typedef TaskAnimationMap::const_iterator | const_TaskAnimationMapIterator |
| typedef std::list < DtDiGuyAnimationSharedPtr > | UnprocessedAnimationList |
| typedef UnprocessedAnimationList::iterator | UnprocessedAnimationListIterator |
| typedef UnprocessedAnimationList::const_iterator | const_UnprocessedAnimationListIterator |
Public Member Functions | |
| DtDiGuyCharacterData () | |
| DtDiGuyCharacterData (const DtString &name) | |
| DtDiGuyCharacterData (const DtDiGuyCharacterData &orig) | |
| virtual | ~DtDiGuyCharacterData () |
| DtDiGuyCharacterData & | operator= (const DtDiGuyCharacterData &orig) |
| virtual void | init () |
| virtual void | setDeadAnimation (DtDiGuyAnimationSharedPtr deadAnimation) |
| virtual DtDiGuyAnimation * | deadAnimation () |
| virtual DtDiGuyAnimation * | lookupTaskAnimationByName (const DtString &name) |
| Look up a particular animation. | |
| virtual std::vector< DtString > | appearances () const |
| The list of possible appearances for this character. | |
| virtual void | addAppearance (const DtString &app) |
| Add a new possible appearance for the character. | |
| virtual bool | containsAppearance (const DtString &app) |
| virtual std::vector< DtString > | handItems () const |
| The list of possible hand items for this character. | |
| virtual void | addHandItem (const DtString &app) |
| Add a new possible hand item for the character. | |
| virtual std::vector< DtString > | heads (const DtString &bodyAppearance) const |
| The list of possible heads for this character and body appearance. | |
| virtual void | addHead (const DtString &bodyAppearance, const DtString &headAppearance) |
| Add a new possible head for the character. | |
| virtual void | addTypeMapField (const DtString &appearanceName, const DtString &fieldValue) |
| Adds the value to the next type map field that hasn't yet been set. | |
| virtual const DtString & | getTypeMapFieldName (int index) |
| Gets the name of a type map field (i.e. name of category) | |
| virtual int | getTypeMapFieldIndex (const DtString &name) |
| Get the index of a type map field name. | |
| virtual AlternateNamesList * | animationNames () |
| Returns string list of all the animations and their user friendly display name. | |
| void | addAnimation (DtDiGuyAnimationSharedPtr animation) |
| readInAnimationDataFromDiGuyScenario() will later classify all added animations into taskable or instrinsic. | |
| virtual DtDiGuyAnimation * | lookupIntrinsicAnimationByName (const DtString &name) |
| virtual DtDiGuyCharacterData * | clone () const |
| Returns a newly created clone of this class. | |
| void | setAnimationTable (DtDiGuyCharacterAnimationsTable *table) |
| void | readInAnimationDataFromTable (const char *actionName, bool isFirstAction) |
| Reads in animations from DtDiGuyCharacterAnimationsTable, which was created by reading in character_animations_table.mtl. | |
| void | setPrintInfo (bool set_print) |
| If set_print is true, calls to debugPrint() will print info to stdout. | |
| void | debugPrint (const char *fmt,...) |
| virtual void | setCharacterTypeName (const DtString &name) |
| The name of the character type. | |
| virtual const DtString & | characterTypeName () const |
| virtual TaskAnimationMap * | taskableAnimations () |
| The taskable animations. | |
| virtual AlternateNamesList | taskableAnimationNames () |
| Returns string list of all the taskable animations and their user friendly display name. | |
| virtual void | addTaskAnimation (const DtString &name, DtDiGuyAnimationSharedPtr animation) |
| virtual DtDiGuyIntrinsicAnimationMap * | intrinsicAnimations () |
| The intrinsic animations. | |
| virtual void | addIntrinsicAnimation (const DtString &name, DtDiGuyAnimationSharedPtr animation) |
Static Public Member Functions | |
| static void | setCreatorFcn (const DtDiGuyIntrinsicAnimationMapCreatorFcn &fcn) |
| By default, this class creates a DtDiGuyIntrinsicAnimationMap data member, used in determining the appropriate animation for a given posture, speed, and demeanor. | |
Protected Member Functions | |
| virtual void | readInAnimationDataFromDiGuyScenario () |
| This is rather slow, because it causes creation of many things inside DI-Guy, so calls should be deferred until it's time to actually display an animation. | |
| void | setUpTypeFieldToIntMap () |
Protected Attributes | |
| DtString | myCharacterTypeName |
| std::vector< DtString > | myCharacterAppearances |
| std::map< DtString, DtString > | myCharacterAppearancesMap |
| std::vector< DtString > | myCharacterHandItems |
| HeadAppearanceMap | myCharacterHeads |
| AppearanceToTypeFieldsMap | myTypeMaps |
| UnprocessedAnimationList | myUnprocessedAnimations |
| Will hold animation references until they can be classified as taskable or intrinsic. | |
| TaskAnimationMap | myTaskAnimationsMap |
| Holds refs to taskable animations. | |
| DtDiGuyIntrinsicAnimationMap * | myIntrinsicAnimationsMap |
| Holds refs to intrinsic animations. | |
| DtFilename | myIntrinsicAnimationsFilename |
| AlternateNamesList | myAnimationNames |
| List of names of all animations available. | |
| DtDiGuyAnimationSharedPtr | myDeadAnimation |
| Keep death animation separate 1) don't need to loop thru the lists to match– dead is dead 2) prevents matching death as closest animation to people in prone posture even though they are alive. | |
| DtDiGuyCharacterAnimationsTable * | myAnimationTable |
| This will be generated from the data in character_animations_table.mtl Its main importance is holding user-readable names and info about whether an animation is taskable or instrinsic. | |
| bool | myDataReadFromDiGuyScenario |
| flag to indicate that animation data has been gathered from DIGuy | |
| bool | myPrintInfo |
Static Protected Attributes | |
| static std::map< DtString, int > | myTypeFieldNameToIntMap |
| static std::vector< DtString > | myTypeFieldNameVect |
| static DtDiGuyIntrinsicAnimationMapCreatorFcn | theDiGuyIntrinsicAnimationMapCreatorFcn |
Stores data representing all the possible appearances, animations, hand items, heads, etc.
that are available to a particular character type. It is used by the sim engine at runtime. Populated from both DI-Guy instance and character_animations_table.mtl file.
| typedef std::map<DtString, DtDiGuyAnimationSharedPtr> DtDiGuyCharacterData::TaskAnimationMap |
| typedef TaskAnimationMap::iterator DtDiGuyCharacterData::TaskAnimationMapIterator |
| typedef TaskAnimationMap::const_iterator DtDiGuyCharacterData::const_TaskAnimationMapIterator |
| typedef std::list<DtDiGuyAnimationSharedPtr> DtDiGuyCharacterData::UnprocessedAnimationList |
| typedef UnprocessedAnimationList::iterator DtDiGuyCharacterData::UnprocessedAnimationListIterator |
| typedef UnprocessedAnimationList::const_iterator DtDiGuyCharacterData::const_UnprocessedAnimationListIterator |
| DtDiGuyCharacterData::DtDiGuyCharacterData | ( | ) |
| DtDiGuyCharacterData::DtDiGuyCharacterData | ( | const DtString & | name | ) |
| DtDiGuyCharacterData::DtDiGuyCharacterData | ( | const DtDiGuyCharacterData & | orig | ) |
|
virtual |
| DtDiGuyCharacterData& DtDiGuyCharacterData::operator= | ( | const DtDiGuyCharacterData & | orig | ) |
|
virtual |
|
virtual |
The name of the character type.
|
virtual |
|
virtual |
|
virtual |
|
virtual |
Look up a particular animation.
|
virtual |
The list of possible appearances for this character.
|
virtual |
Add a new possible appearance for the character.
|
virtual |
The list of possible hand items for this character.
|
virtual |
Add a new possible hand item for the character.
|
virtual |
The list of possible heads for this character and body appearance.
|
virtual |
Add a new possible head for the character.
|
virtual |
Adds the value to the next type map field that hasn't yet been set.
Gets the name of a type map field (i.e. name of category)
Get the index of a type map field name.
|
virtual |
Returns string list of all the animations and their user friendly display name.
| void DtDiGuyCharacterData::addAnimation | ( | DtDiGuyAnimationSharedPtr | animation | ) |
readInAnimationDataFromDiGuyScenario() will later classify all added animations into taskable or instrinsic.
|
virtual |
The taskable animations.
Returns the map of all taskable animations
|
virtual |
Returns string list of all the taskable animations and their user friendly display name.
|
virtual |
|
virtual |
The intrinsic animations.
|
virtual |
|
virtual |
|
virtual |
Returns a newly created clone of this class.
Reimplemented in DtVrvDiGuyCharacterData.
| void DtDiGuyCharacterData::setAnimationTable | ( | DtDiGuyCharacterAnimationsTable * | table | ) |
| void DtDiGuyCharacterData::readInAnimationDataFromTable | ( | const char * | actionName, |
| bool | isFirstAction | ||
| ) |
Reads in animations from DtDiGuyCharacterAnimationsTable, which was created by reading in character_animations_table.mtl.
Some animation info is also queried from diguyScenario instance. This object's data isn't complete until readInAnimationDataFromDiGuyScenario() is called, however.
| void DtDiGuyCharacterData::setPrintInfo | ( | bool | set_print | ) |
If set_print is true, calls to debugPrint() will print info to stdout.
| void DtDiGuyCharacterData::debugPrint | ( | const char * | fmt, |
| ... | |||
| ) |
|
static |
By default, this class creates a DtDiGuyIntrinsicAnimationMap data member, used in determining the appropriate animation for a given posture, speed, and demeanor.
To override and replace this with your own derived DtDiGuyIntrinsicAnimationMap class, create a function that returns a new instance of your derived class, and then pass it in to this function before calling init().
|
protectedvirtual |
This is rather slow, because it causes creation of many things inside DI-Guy, so calls should be deferred until it's time to actually display an animation.
Reimplemented in DtVrvDiGuyCharacterData.
|
protected |
|
staticprotected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
Will hold animation references until they can be classified as taskable or intrinsic.
|
protected |
Holds refs to taskable animations.
|
protected |
Holds refs to intrinsic animations.
|
protected |
|
protected |
List of names of all animations available.
|
protected |
Keep death animation separate 1) don't need to loop thru the lists to match– dead is dead 2) prevents matching death as closest animation to people in prone posture even though they are alive.
|
protected |
This will be generated from the data in character_animations_table.mtl Its main importance is holding user-readable names and info about whether an animation is taskable or instrinsic.
|
protected |
flag to indicate that animation data has been gathered from DIGuy
|
protected |
|
staticprotected |