VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
vrfDiGuy Library API Changes

Table of Contents

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:

Changes 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.

Breaking Changes

DtDiGuyCharacterDataManager no longer loads an animations configuration file

The manager previously accepted an external character animations file that supplemented the data queried from DI-Guy. Both entry points were removed:

// 5.2 -- removed in 5.3
virtual void setAnimationsConfigurationFilename( const DtFilename& config );
virtual bool loadCharacterAnimationsFile( const DtFilename& mtlName );

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:

// 5.2 -- removed in 5.3
DtFilename myAnimationsConfigurationFilename;

myAnimationsConfigurationFile (the DtDiGuyCharacterAnimationsTable*) is retained and unchanged.

DtDiGuyCharacterData::readInAnimationDataFromTable was removed

// 5.2 -- removed in 5.3
bool readInAnimationDataFromTable( DtDiGuyAnimationSharedPtr animation );

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().

DtDiGuyCharacterData::lookupIntrinsicAnimationByName changed signature and moved

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:

// 5.2
virtual const DtDiGuyAnimation* lookupIntrinsicAnimationByName( const DtString& name ) const;
// 5.3
virtual const DtDiGuyAnimation* lookupIntrinsicAnimationByName( const DtString& name,
bool checkCompatible = false ) const;

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.

DtDiGuyIntrinsicAnimationMap::lookupAnimationByName changed signature

Both overloads gained the same defaulted parameter:

// 5.2
virtual const DtDiGuyAnimation* lookupAnimationByName( const DtString& name ) const;
virtual const DtDiGuyAnimation* lookupAnimationByName( AnimationListSharedPtr list,
const DtString& name ) const;
// 5.3
virtual const DtDiGuyAnimation* lookupAnimationByName( const DtString& name,
bool checkCompatible = false ) const;
virtual const DtDiGuyAnimation* lookupAnimationByName( AnimationListSharedPtr list,
const DtString& name,
bool checkCompatible = false ) const;

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.

DtDiGuyCharacterData::myCharacterGesturesMap changed type

Gestures are now stored as objects rather than name-to-name string pairs. The protected member changed type accordingly:

// 5.2
std::map<DtString, DtString> myCharacterGesturesMap;
// 5.3
GestureMap myCharacterGesturesMap; // std::map<DtString, DtDiGuyGestureSharedPtr>

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.

Additions

DtDiGuyGesture and vrfDiGuy/diGuyGesture.h

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:

{
public:
DtDiGuyGesture( const DtString& name, double duration = 2.0 );
DtDiGuyGesture& operator = ( const DtDiGuyGesture& orig );
virtual void setGestureName( const DtString& name );
virtual const DtString& gestureName() const;
virtual void setDuration( double duration );
virtual double duration() const;
};
typedef std::shared_ptr<DtDiGuyGesture> DtDiGuyGestureSharedPtr;

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.

DtDiGuyCharacterData gesture typedefs

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

DtDiGuyCharacterData::addGesture overload taking a gesture object

virtual void addGesture( DtDiGuyGestureSharedPtr gesture );

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.

DtDiGuyCharacterData::gestureDurations

virtual GestureDurationMap gestureDurations() const;

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.

DtDiGuyCharacterData::lookupTaskAnimationByName compatibility checking

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.

Summary of Header Changes

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]


Document ID: Generated on Thu Oct 15 21:27:02 EDT 2026 from SVN revision 296421
Copyright © 2005-2026 MAK Technologies. All Rights Reserved (www.mak.com)