mirror of
https://github.com/AxioDL/PrimeWorldEditor.git
synced 2025-08-22 19:52:17 +00:00
38 lines
863 B
C++
38 lines
863 B
C++
#ifndef CANIMATION_H
|
|
#define CANIMATION_H
|
|
|
|
#include "CResource.h"
|
|
#include <Math/CQuaternion.h>
|
|
#include <Math/CVector3f.h>
|
|
#include <vector>
|
|
|
|
class CAnimation : public CResource
|
|
{
|
|
DECLARE_RESOURCE_TYPE(eAnimation)
|
|
friend class CAnimationLoader;
|
|
|
|
typedef std::vector<CQuaternion> TRotationChannel;
|
|
typedef std::vector<CVector3f> TTranslationChannel;
|
|
|
|
float mDuration;
|
|
float mTickInterval;
|
|
u32 mNumKeys;
|
|
|
|
std::vector<TRotationChannel> mRotationChannels;
|
|
std::vector<TTranslationChannel> mTranslationChannels;
|
|
|
|
struct SBoneChannelInfo
|
|
{
|
|
u8 RotationChannelIdx;
|
|
u8 TranslationChannelIdx;
|
|
};
|
|
SBoneChannelInfo mBoneInfo[100];
|
|
|
|
public:
|
|
CAnimation();
|
|
void EvaluateTransform(float Time, u32 BoneID, CTransform4f& rOut) const;
|
|
bool HasTranslation(u32 BoneID) const;
|
|
};
|
|
|
|
#endif // CANIMATION_H
|