Skip to main content
gamedev.net
🔒 Locked

ID3DXAnimationCallbackHandler : base class undefined

Started by farhanx 4 replies 1.1k views
Original Post
farhanx
farhanx
hi all, i am trying to use this interface of dx but it always gives me an error 'ID3DXAnimationCallbackHandler' : base class undefined. I have VC6 with directX SDK 9.0c. please guide me what to do thanks
Things has been changed but the just the way it is....
ToohrVyk
ToohrVyk
Part of me says, you might have forgotten to include D3dx9anim.h. Part of me believes, since I don't know a damn thing about how COM works, that you might need to do more than just inherit from this class to implement the interface.
xissburg
xissburg
ID3DXAnimationCallbackHandler its a kind of abstract class, its methods dont have 'bodies'. You must create a class which is derived from this and then implement the method inside of ID3DXAnimationCallbackHandler(its just one: ID3DXAnimationCallbackHandler::HandleCallback()) inside this class.
.
farhanx
farhanx
D3dx9anim.h is included inside the program and the class has body like this

class AnimatedObject : public SceneObject, public ID3DXAnimationCallbackHandler
{
public:
AnimatedObject( char *meshName, char *meshPath = "./", unsigned long type = TYPE_ANIMATED_OBJECT );
virtual ~AnimatedObject();

virtual void Update( float elapsed, bool addVelocity = true );

void PlayAnimation( unsigned int animation, float transitionTime, bool loop = true );
ID3DXAnimationController *GetAnimationController();

private:
virtual HRESULT CALLBACK HandleCallback( THIS_ UINT Track, LPVOID pCallbackData );

private:
ID3DXAnimationController *m_animationController; // Controller for managing mesh animation playback.
unsigned int m_currentTrack; // The track of the currently playing animation.
float m_currentTime; // Timer used for animation.
};
Things has been changed but the just the way it is....
ankhd
ankhd
Hi there had the same prob, try this link out it helped me a lot
http://www.toymaker.info/Games/html/load_x_hierarchy.html#HierarchyConcept

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.