28 lines
772 B
C++
28 lines
772 B
C++
#pragma once
|
|
|
|
#include "ITransformationAnimation.h"
|
|
#include "IEngine.h"
|
|
|
|
|
|
class TransformationAnimation
|
|
: public ITransformationAnimation
|
|
{
|
|
public:
|
|
TransformationAnimation(IEngine& argEngine);
|
|
virtual ~TransformationAnimation();
|
|
|
|
virtual std::wstring get_Name() const;
|
|
virtual void AddKeyFrame(const KeyFrame& argKeyFrame);
|
|
virtual float get_Duration() const;
|
|
virtual D3DXMATRIX GetTransformationAtTime(float argTime);
|
|
|
|
protected:
|
|
std::map<float, KeyFrame>::const_iterator FindLowerBoundKey(float argTime, KeyFrameTarget::Enumeration argTarget) const;
|
|
std::map<float, KeyFrame>::const_iterator FindUpperBoundKey(float argTime, KeyFrameTarget::Enumeration argTarget) const;
|
|
|
|
private:
|
|
IEngine& m_Engine;
|
|
string16 m_Name;
|
|
|
|
std::map<float, KeyFrame> m_Keys[3];
|
|
}; |