![]() |
VR-Forces 4.8 Class Documentation
|
Owns a DiGuy scenario for the application. More...

Public Types | |
| typedef std::list< DtString > | StringList |
| typedef std::vector< StringList > | StringListVec |
Public Member Functions | |
| void | initializeVisualComponent () |
| virtual | ~DtDiGuyScenario () |
| DTOR. More... | |
| diguyScenario & | scenario () |
| Get the scenario.: More... | |
| virtual void | clearScene () |
| virtual osg::Node * | characterRoot () |
| Get the OSG root node for the DI-Guy character geometry. More... | |
| virtual int | useGuides () |
| should diguy guides be used to smooth character movement More... | |
| virtual float | guideSyncGain () |
| how aggressive the guides should be to get from diguy motion data to dead reckoned data More... | |
| virtual int | useInstancing () |
| should instancing be used More... | |
| virtual bool | useMultithreadedCull () |
| should cull run in parallel More... | |
| virtual bool | useOctree () |
| should we use an octtree for culling More... | |
| std::string | findCharacterName (DtElementID parentSceneObjectID) |
| Finds the character name, given the parent scene object ID. More... | |
| int | getSupportsWeightVariations (DtElementID parentSceneObjectID) |
| Returns if character supports weight variations (skinny to fat) More... | |
| bool | evalScript (const std::string &script) |
| Evaluates a script using the diguyScenario's interpreter. More... | |
| int | getNumCharacterTypes () |
Info about particular character types or appearances. More... | |
| const char * | getCharacterTypeAtIndex (int index) |
| Get name of a DI-Guy character type. More... | |
| int | getCharacterTypeNumAppearances (const char *typeName) |
| Get number of appearances associated with a particular character type. More... | |
| const char * | getCharacterTypeAppearanceAtIndex (const char *typeName, int index) |
| Get name of appearance. More... | |
| int | getCharacterTypeNumGestures (const char *typeName) |
| Get number of gestures associated with a particular character type. More... | |
| const char * | getCharacterTypeGestureAtIndex (const char *typeName, int index) |
| Get name of gesture. More... | |
| const char * | getHandItemClass (const char *typeName) |
| Get the name of the hand item class available to a particular character type (e.g. More... | |
| int | getNumHandItemsInClass (const char *className) |
| const char * | getHandItemFromClass (const char *className, int index) |
| Gets the name of a hand item (e.g. "m16") More... | |
| int | getCharacterTypeNumHeads (const char *typeName, const char *appearanceName) |
| Get number of heads available for a particular character type/appearance combo. More... | |
| const char * | getCharacterTypeHeadAtIndex (const char *typeName, const char *appearanceName, int index) |
| Get name of a head appearance. More... | |
| int | getCharacterTypeNumActions (const char *typeName) |
| Get number of actions (i.e. animations) available to a particular character type. More... | |
| const char * | getCharacterTypeActionAtIndex (const char *typeName, int index) |
| Get name of an action. More... | |
| float | getCharacterTypeActionDuration (const char *typeName, const char *actionName) |
| How long an action (animation) is expected to take, in seconds. More... | |
| float | getCharacterTypeActionSpeed (const char *typeName, const char *actionName) |
| The default speed (m/s) at which a character will move while carrying out the animation. More... | |
| const char * | getCharacterTypeActionPosture (const char *typeName, const char *actionName) |
| Get name of posture associated with a particular character type and action ("upright", "crouching", "prone", "sitting", "kneeling", "any") More... | |
| const char * | getCharacterTypeActionDirection (const char *typeName, const char *actionName) |
| Get name of direction associated with a particular character type and action ("none", "forward", "backward", "left", "right", "locomotion", "up", "down", "turn_left", "turn_right", "nonlinear", "linear_offaxis", "inherit", "unknown") More... | |
| const char * | getCharacterTypeActionPrimaryVariant (const char *typeName, const char *actionName) |
| Get name of variant associated with a particular character type and action ("normal", "aim", "dead", "angry", "ambient", "assault", "curious", "exercise", "funky", "injured", "ready", "sick", "socialize", "other", "misc0", "misc1", "misc2", "misc3", "misc4", "misc5", "misc6", "misc7", "misc8", "misc9", "unknown", "any", "count") More... | |
| int | getCharacterTypeTransitionInfo (const char *typeName, const char *actionFrom, const char *actionTo, DtDiguyTransitionInfo &info) |
| Data about the transition returns -1 if there is no valid transition. More... | |
| int | getNumTypeMapEntries () |
Type Map Functions More... | |
| const char * | getTypeMapCharacterType (int index) |
| Get name of character type associated with a type map entry. More... | |
| const char * | getTypeMapCharacterAppearance (int index) |
| Get name of character appearance associated with a type map entry. More... | |
| const char * | getTypeMapFieldValue (int index, const char *fieldName) |
| Get actual type map field value. More... | |
| const char * | getTypeMapFieldValue (int index, int fieldIndex) |
| int | getNumTypeMapCharacterClasses () |
| const char * | getTypeMapCharacterClassAtIndex (int index) |
| int | getNumTypeMapCategories (const char *character_class) |
| const char * | getTypeMapCategoryAtIndex (const char *character_class, int index) |
| int | getNumTypeMapSubcategories (const char *character_class, const char *category) |
| const char * | getTypeMapSubcategoryAtIndex (const char *character_class, const char *category, int index) |
| virtual void | getAppearancesMatchingDiGuyTypeMap (const DtString &characterType, std::vector< DtString > &fields, std::vector< DtString > &retAppearances) |
| Given a DI-Guy character type and a complete set of type map field values, any of which can be a wildcard ("*"), return all matching character appearances. More... | |
| virtual void | getAppearancesMatchingPartialDiGuyTypeMap (const DtString &characterType, std::vector< DtString > &partialFields, std::vector< int > &fieldIndices, std::vector< DtString > &retAppearances) |
| Similar to above, but only some fields are specified. More... | |
| virtual void | getTypeMapFieldOptions (const DtString &characterType, std::vector< DtString > &fields, StringListVec &retValues) |
| Given a DI-Guy character type and a complete set of type map field values, any of which can be a wildcard ("*"), return the possible choices for each type map field. More... | |
| virtual void | getTypeMapPartialFieldOptions (const DtString &characterType, std::vector< DtString > &partialFields, std::vector< int > &fieldIndices, StringListVec &retValues) |
| Uses the same idea as getAppearancesMatchingPartialDiGuyTypeMap(). retValues only contains a set of lists for the fields passed in. More... | |
| virtual void | initTypeMapNodes () |
| virtual bool | isGeocentric () |
| cached value so that every character doesn't need to ask More... | |
| virtual DtDe & | getDe () |
| returns de More... | |
| virtual void | cullAndUpdate (const Frustum_64 &frustum, const DtDiGuyCullData &cullData) |
| virtual DtDiGuyInstanceDrawable * | instancedDrawable () |
| returns instance drawable singleton More... | |
| virtual void | updateStats (int mask, double duration) |
| only called by octree cull code More... | |
| virtual void | createOctreeNode (DtDiGuyOsgRootNode *pChar) |
| octree functions for faster cull traversals More... | |
| virtual void | destroyOctreeNode (DtDiGuyOsgRootNode *pChar) |
| remove associated octree node More... | |
| virtual void | characterOctreeNodeUpdated (DtDiGuyOsgRootNode *pChar) |
| updates the octree with this character root node More... | |
| virtual Octree_64 * | octree () |
| returns octree More... | |
Public Member Functions inherited from makVrv::DtVirtualBaseClass | |
| DtVirtualBaseClass () | |
| Do nothing constructor. More... | |
| virtual | ~DtVirtualBaseClass () |
| Virtual do nothing destructor. More... | |
Static Public Member Functions | |
| static DtDiGuyScenario & | instance (DtDe &de, bool initVisualComponent=true) |
| static DtDiGuyScenario * | lightweight_instance (const std::string &dataPath) |
| static osg::Group * | getDiGuyAttachGroup () |
| accessor method for getting to the diguy attach group without needing to include/link diguy libraries More... | |
| static osg::Group * | getDiGuyInstancingAttachGroup () |
| accessor method for getting to the diguy instancing attach group without needing to include/link diguy libraries More... | |
Static Public Attributes | |
| static int | theStatNumCharDrawn |
| static tbb::atomic< int > | theStatNumCharInstanced |
Protected Member Functions | |
| virtual void | slot_terrainLoaded (const DtUnicode &terrain, bool reload) |
| Called when the window manager destroys a window. More... | |
| virtual void | slot_windowDestroyed (DtWindow *window) |
| Called when the window manager destroys a window. More... | |
| virtual void | slot_windowCreated (DtWindow *window) |
| Called when the window manager creates a window. More... | |
| virtual void | slot_ProfilingChanged (bool active) |
| Called when f3 stats change. More... | |
| virtual void | slot_reloadShader () |
| Called when someone presses the reload shader button. More... | |
| virtual void | slot_preDraw () |
| Called before rendering the scene. More... | |
| virtual void | slot_postDraw () |
| Called after rendering the scene. More... | |
| virtual void | slot_postUpdate () |
| Called after updating the scene. More... | |
| virtual void | syncToSharedDiGuySettings () |
| pass settings from vrv shared diguy settings down to diguy scenario More... | |
| virtual void | slot_diGuyInstancingEnabledChanged (bool enabled) |
| Receives notification that the user changed the instancing enabled checkbox. More... | |
| virtual void | slot_diGuyInstancedLodChanged (int lod) |
| Receives notification that the user changed the instancing lod value (1-7). More... | |
| virtual void | slot_diGuyVisualizeInstancingChanged (bool enabled) |
| Receives notification that the user changed the visualize instancing checkbox. More... | |
| virtual void | slot_diGuyMaxDrawDistanceChanged (float distance) |
| Receives notification that the user changed the max draw distance. More... | |
| virtual void | slot_diGuyMaxMotionUpdateDistanceChanged (float distance) |
| Receives notification that the user changed the max draw distance. More... | |
| virtual void | slot_diGuyMultiThreadUpdateChanged (bool enabled) |
| Receives notification that the user changed the multi threaded update checkbox. More... | |
| diguyCharacter * | getCharacter (DtElementID parentSceneObjectID) |
| void | updateScenario (double simTime) |
| void | updateScenario () |
| void | setComponentVisualizationMode (int mode) |
| DtDiGuyScenario (DtDe &de) | |
| DtDiGuyScenario (const std::string &dataPth) | |
| void | createDiGuyScenario () |
| void | reloadConfigInfo () |
Static Protected Member Functions | |
| static DtDiGuyScenario * | createInstance (DtDe &de, bool initVisualComponent=true) |
| static DtDiGuyScenario * | createNonVisualInstance (const std::string &dataPath) |
| static void | slot_displayToBeDestroyed (const std::string &displayName, DtDe *de) |
Protected Attributes | |
| DtDe & | myDe |
| bool | myDeIsValid |
| diguyScenario * | myScenario |
| osg::ref_ptr< osg::Group > | myDiguyRoot |
| osg::ref_ptr< osg::Group > | myCharacterRoot |
| osg::ref_ptr < osg::MatrixTransform > | myInstancingRoot |
| osg::ref_ptr < DtDiGuyInstanceDrawable > | myInstancedDrawable |
| bool | myIsGeocentric |
| double | myFirstUpdateT |
| double | myPreviousUpdateTime |
| int | myUseInstancing |
| int | myUseGuides |
| bool | myUseOctree |
| bool | myUseMultithreadedCull |
| float | myMaxMotionUpdateDistance |
| float | myGuideSyncGain |
| bool | myVisualComponentInitialized |
| bool | myLightweightInstance |
| DtDiGuyTypeMapFieldNode | myTypeMapFieldsRootNode |
| bool | myHaveSetupTypeMapFieldsNodes |
| std::string | myAlternateDataPath |
| DtSignalConnectionManager | myConnections |
| tbb::mutex | myOctreeMutex |
| Octree_64 * | myOctree |
| Octree_64::NodeVector | myVisibleOctreeNodes |
| tbb::concurrent_vector < DtDiGuyOsgRootNode * > | myNoninstancedNodeArray |
| int | myStatOctreeUpdate |
| float | myStatOctreeUpdateTime |
| float | myStatPreviousOctreeUpdateTime |
| float | myStatCulltime |
Owns a DiGuy scenario for the application.
| typedef std::list<DtString> makVrv::DtDiGuyScenario::StringList |
| typedef std::vector<StringList> makVrv::DtDiGuyScenario::StringListVec |
|
virtual |
DTOR.
|
protected |
|
protected |
|
static |
| void makVrv::DtDiGuyScenario::initializeVisualComponent | ( | ) |
|
static |
| diguyScenario& makVrv::DtDiGuyScenario::scenario | ( | ) |
Get the scenario.:
|
virtual |
|
virtual |
Get the OSG root node for the DI-Guy character geometry.
|
virtual |
should diguy guides be used to smooth character movement
|
virtual |
how aggressive the guides should be to get from diguy motion data to dead reckoned data
|
virtual |
should instancing be used
|
virtual |
should cull run in parallel
|
virtual |
should we use an octtree for culling
| std::string makVrv::DtDiGuyScenario::findCharacterName | ( | DtElementID | parentSceneObjectID | ) |
Finds the character name, given the parent scene object ID.
| int makVrv::DtDiGuyScenario::getSupportsWeightVariations | ( | DtElementID | parentSceneObjectID | ) |
Returns if character supports weight variations (skinny to fat)
| bool makVrv::DtDiGuyScenario::evalScript | ( | const std::string & | script | ) |
Evaluates a script using the diguyScenario's interpreter.
| int makVrv::DtDiGuyScenario::getNumCharacterTypes | ( | ) |
Info about particular character types or appearances.
These are categories in DI-Guy, sets of settings
Get number of total available DI-Guy character types
Get name of a DI-Guy character type.
Get number of appearances associated with a particular character type.
| const char* makVrv::DtDiGuyScenario::getCharacterTypeAppearanceAtIndex | ( | const char * | typeName, |
| int | index | ||
| ) |
Get name of appearance.
Get number of gestures associated with a particular character type.
| const char* makVrv::DtDiGuyScenario::getCharacterTypeGestureAtIndex | ( | const char * | typeName, |
| int | index | ||
| ) |
Get name of gesture.
Get the name of the hand item class available to a particular character type (e.g.
"street_implements", "weapons")
Gets the name of a hand item (e.g. "m16")
| int makVrv::DtDiGuyScenario::getCharacterTypeNumHeads | ( | const char * | typeName, |
| const char * | appearanceName | ||
| ) |
Get number of heads available for a particular character type/appearance combo.
| const char* makVrv::DtDiGuyScenario::getCharacterTypeHeadAtIndex | ( | const char * | typeName, |
| const char * | appearanceName, | ||
| int | index | ||
| ) |
Get name of a head appearance.
Get number of actions (i.e. animations) available to a particular character type.
| const char* makVrv::DtDiGuyScenario::getCharacterTypeActionAtIndex | ( | const char * | typeName, |
| int | index | ||
| ) |
Get name of an action.
| float makVrv::DtDiGuyScenario::getCharacterTypeActionDuration | ( | const char * | typeName, |
| const char * | actionName | ||
| ) |
How long an action (animation) is expected to take, in seconds.
| float makVrv::DtDiGuyScenario::getCharacterTypeActionSpeed | ( | const char * | typeName, |
| const char * | actionName | ||
| ) |
The default speed (m/s) at which a character will move while carrying out the animation.
| const char* makVrv::DtDiGuyScenario::getCharacterTypeActionPosture | ( | const char * | typeName, |
| const char * | actionName | ||
| ) |
Get name of posture associated with a particular character type and action ("upright", "crouching", "prone", "sitting", "kneeling", "any")
| const char* makVrv::DtDiGuyScenario::getCharacterTypeActionDirection | ( | const char * | typeName, |
| const char * | actionName | ||
| ) |
Get name of direction associated with a particular character type and action ("none", "forward", "backward", "left", "right", "locomotion", "up", "down", "turn_left", "turn_right", "nonlinear", "linear_offaxis", "inherit", "unknown")
| const char* makVrv::DtDiGuyScenario::getCharacterTypeActionPrimaryVariant | ( | const char * | typeName, |
| const char * | actionName | ||
| ) |
Get name of variant associated with a particular character type and action ("normal", "aim", "dead", "angry", "ambient", "assault", "curious", "exercise", "funky", "injured", "ready", "sick", "socialize", "other", "misc0", "misc1", "misc2", "misc3", "misc4", "misc5", "misc6", "misc7", "misc8", "misc9", "unknown", "any", "count")
| int makVrv::DtDiGuyScenario::getCharacterTypeTransitionInfo | ( | const char * | typeName, |
| const char * | actionFrom, | ||
| const char * | actionTo, | ||
| DtDiguyTransitionInfo & | info | ||
| ) |
Data about the transition returns -1 if there is no valid transition.
| int makVrv::DtDiGuyScenario::getNumTypeMapEntries | ( | ) |
Type Map Functions
A type map contains several extra fields that can be used to classify a character These fields are: "character_class", "category", "subcategory", "sex", "age", "race", "country", "military_branch", and "carried_object"
Samples set of values: "human/military/soldier/male/adult/black/usa/army/m16" "vehicle/civilian/automobile/-/-/-/-/-/-"
Gets total number of type map entries in the system. Besides the map described above, there's also a character type string and an appearance string.
Get name of character type associated with a type map entry.
Get name of character appearance associated with a type map entry.
Get actual type map field value.
| int makVrv::DtDiGuyScenario::getNumTypeMapCharacterClasses | ( | ) |
| const char* makVrv::DtDiGuyScenario::getTypeMapCategoryAtIndex | ( | const char * | character_class, |
| int | index | ||
| ) |
| int makVrv::DtDiGuyScenario::getNumTypeMapSubcategories | ( | const char * | character_class, |
| const char * | category | ||
| ) |
| const char* makVrv::DtDiGuyScenario::getTypeMapSubcategoryAtIndex | ( | const char * | character_class, |
| const char * | category, | ||
| int | index | ||
| ) |
|
virtual |
Given a DI-Guy character type and a complete set of type map field values, any of which can be a wildcard ("*"), return all matching character appearances.
|
virtual |
Similar to above, but only some fields are specified.
The entries in fieldIndices correspond to the entries in partialFields, and each is the index of a type map field. partialFields contains the values of those particular fields; all others are assumed to be wildcards.
|
virtual |
Given a DI-Guy character type and a complete set of type map field values, any of which can be a wildcard ("*"), return the possible choices for each type map field.
The idea is that choices made in a more significant field narrow down the available choices in less significant fields. Each vector entry in retValues contains a list of choices corresponding to that type map field index.
|
virtual |
Uses the same idea as getAppearancesMatchingPartialDiGuyTypeMap(). retValues only contains a set of lists for the fields passed in.
|
virtual |
|
static |
accessor method for getting to the diguy attach group without needing to include/link diguy libraries
|
static |
accessor method for getting to the diguy instancing attach group without needing to include/link diguy libraries
|
virtual |
cached value so that every character doesn't need to ask
|
virtual |
octree functions for faster cull traversals
|
virtual |
remove associated octree node
|
virtual |
updates the octree with this character root node
|
inlinevirtual |
returns octree
|
inlinevirtual |
returns de
|
virtual |
|
inlinevirtual |
returns instance drawable singleton
only called by octree cull code
|
protectedvirtual |
Called when the window manager destroys a window.
|
protectedvirtual |
Called when the window manager destroys a window.
|
protectedvirtual |
Called when the window manager creates a window.
|
protectedvirtual |
Called when f3 stats change.
|
protectedvirtual |
Called when someone presses the reload shader button.
|
protectedvirtual |
Called before rendering the scene.
|
protectedvirtual |
Called after rendering the scene.
|
protectedvirtual |
Called after updating the scene.
|
protectedvirtual |
pass settings from vrv shared diguy settings down to diguy scenario
|
protectedvirtual |
Receives notification that the user changed the instancing enabled checkbox.
|
protectedvirtual |
Receives notification that the user changed the instancing lod value (1-7).
|
protectedvirtual |
Receives notification that the user changed the visualize instancing checkbox.
|
protectedvirtual |
Receives notification that the user changed the max draw distance.
|
protectedvirtual |
Receives notification that the user changed the max draw distance.
|
protectedvirtual |
Receives notification that the user changed the multi threaded update checkbox.
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
staticprotected |
|
staticprotected |
|
staticprotected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
static |
|
static |