![]() |
VR-Forces Developer's Guide
|
This document describes the public API changes in the vrfDiGuy library between VR-Forces 5.2 and VR-Forces 5.3.
It covers the following public headers:
vrfDiGuy/diGuyCharacterData.hvrfDiGuy/diGuyCharacterDataManager.hvrfDiGuy/diGuyGesture.hvrfDiGuy/diGuyIntrinsicAnimationMap.hChanges that are internal to an implementation or limited to comments are not listed. In particular, vrfDiGuy/diGuyAnimation.h, vrfDiGuy/diGuyCharacterAnimationsTable.h, and vrfDiGuy/vrvDiGuyCharacterData.h changed only in documentation and contain no API changes.
The theme of this release is that DI-Guy character data is now populated entirely from the DI-Guy instance. The external character_animations_table.mtl ingestion path was removed, and gestures became first-class objects that carry a duration rather than bare name strings.
The manager previously accepted an external character animations file that supplemented the data queried from DI-Guy. Both entry points were removed:
There is no replacement. Character data is built solely by loadDataFromDIGuy(), which queries the DI-Guy instance for character types, appearances, actions, and gestures. Code that called either method during initialization should simply drop the call; code that relied on the file to override the taskable versus intrinsic classification of an action must now supply that classification through the DtDiGuyCharacterAnimationsTable held by the manager.
The corresponding protected member was removed as well, which affects derived manager classes:
myAnimationsConfigurationFile (the DtDiGuyCharacterAnimationsTable*) is retained and unchanged.
This method applied override entries read from the character animations table to a single animation. Because the file-based table is no longer loaded, the method has no supported replacement. Classification of an animation as taskable or intrinsic happens during readInAnimationDataFromDiGuyScenario(), using the table object assigned through setAnimationTable().
The method gained the checkCompatible parameter already present on lookupTaskAnimationByName, and it moved from the bottom of the class to the animation lookup group near the top:
Existing call sites continue to compile because the new parameter is defaulted, and the default preserves the 5.2 behavior. Classes that override this virtual function must be updated to match the new signature, or the override will no longer bind to the base declaration.
Both overloads gained the same defaulted parameter:
When checkCompatible is true, the lookup rejects an animation that is not compatible with the character's current configuration. As above, callers are unaffected, but derived classes that override either overload must adopt the new signature.
Gestures are now stored as objects rather than name-to-name string pairs. The protected member changed type accordingly:
Derived classes that read or write this member directly must be updated to work with DtDiGuyGestureSharedPtr values. Use gestureDurations() or gestures() from outside the class hierarchy instead of touching the map. The parallel myCharacterGestures vector of gesture names is unchanged.
The new header vrfDiGuy/diGuyGesture.h defines DtDiGuyGesture, which pairs a gesture name with the time the gesture takes to play. It is a small value type with a copy constructor and assignment operator:
A gesture constructed without an explicit duration uses a two-second default. vrfDiGuy/diGuyCharacterData.h includes this header, so code that already includes diGuyCharacterData.h gets the declaration without further action.
Four nested typedefs were added:
| Typedef | Definition |
|---|---|
GestureMap | std::map<DtString, DtDiGuyGestureSharedPtr> |
GestureDurationMap | std::map<DtString, double> |
GestureMapIterator | GestureMap::iterator |
const_GestureMapIterator | GestureMap::const_iterator |
The 5.2 form, addGesture( const DtString& ), is retained as a convenience overload for callers that only have a gesture name; it registers the gesture with the default duration. Existing calls continue to compile and behave as before.
Returns a map from gesture name to duration in seconds for every gesture available to the character type. Use this when scheduling or timing out a gesture task. gestures() still returns the plain list of gesture names and is unchanged.
lookupTaskAnimationByName already accepted checkCompatible in 5.2. In 5.3 the same option is available on lookupIntrinsicAnimationByName and on both DtDiGuyIntrinsicAnimationMap::lookupAnimationByName overloads, so compatibility filtering can be applied uniformly across animation lookups. See the corresponding entries under Breaking Changes for the signature details.
| Header | Breaking | Additions |
|---|---|---|
diGuyAnimation.h | None | None |
diGuyCharacterAnimationsTable.h | None | None |
diGuyCharacterData.h | readInAnimationDataFromTable removed; lookupIntrinsicAnimationByName signature change; myCharacterGesturesMap type change | DtDiGuyGesture include; gesture typedefs; addGesture overload; gestureDurations |
diGuyCharacterDataManager.h | setAnimationsConfigurationFilename and loadCharacterAnimationsFile removed; myAnimationsConfigurationFilename removed | None |
diGuyGesture.h | None | New header defining DtDiGuyGesture and DtDiGuyGestureSharedPtr |
diGuyIntrinsicAnimationMap.h | Both lookupAnimationByName overloads gained checkCompatible | None |
vrvDiGuyCharacterData.h | None | None |
Return to VR-Forces 5.3 API Migration Guide.
[Home]