Sign in to follow this  
farhanx

ID3DXAnimationCallbackHandler : base class undefined

Recommended Posts

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

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
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.
};

Share this post


Link to post
Share on other sites
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.
};

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this