Original Post
🔒 Locked
ID3DXAnimationCallbackHandler : base class undefined
Advertisement
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.
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.
};
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.
};
Topic Locked
This topic has been locked by a moderator. New replies are not allowed.
Sign in to reply to this topic.
Advertisement