CAnimation: Make use of in-class initializers where applicable
Simplifies member initialization
This commit is contained in:
parent
0096b28294
commit
d4d7cf66cd
|
@ -6,16 +6,7 @@
|
||||||
|
|
||||||
CAnimation::CAnimation(CResourceEntry *pEntry /*= 0*/)
|
CAnimation::CAnimation(CResourceEntry *pEntry /*= 0*/)
|
||||||
: CResource(pEntry)
|
: CResource(pEntry)
|
||||||
, mDuration(0.f)
|
|
||||||
, mTickInterval(0.0333333f)
|
|
||||||
, mNumKeys(0)
|
|
||||||
{
|
{
|
||||||
for (uint32 iBone = 0; iBone < 100; iBone++)
|
|
||||||
{
|
|
||||||
mBoneInfo[iBone].TranslationChannelIdx = 0xFF;
|
|
||||||
mBoneInfo[iBone].RotationChannelIdx = 0xFF;
|
|
||||||
mBoneInfo[iBone].ScaleChannelIdx = 0xFF;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
CDependencyTree* CAnimation::BuildDependencyTree() const
|
CDependencyTree* CAnimation::BuildDependencyTree() const
|
||||||
|
|
|
@ -17,9 +17,9 @@ class CAnimation : public CResource
|
||||||
typedef std::vector<CQuaternion> TRotationChannel;
|
typedef std::vector<CQuaternion> TRotationChannel;
|
||||||
typedef std::vector<CVector3f> TTranslationChannel;
|
typedef std::vector<CVector3f> TTranslationChannel;
|
||||||
|
|
||||||
float mDuration;
|
float mDuration = 0.0f;
|
||||||
float mTickInterval;
|
float mTickInterval = 0.0333333f;
|
||||||
uint32 mNumKeys;
|
uint32 mNumKeys = 0;
|
||||||
|
|
||||||
std::vector<TScaleChannel> mScaleChannels;
|
std::vector<TScaleChannel> mScaleChannels;
|
||||||
std::vector<TRotationChannel> mRotationChannels;
|
std::vector<TRotationChannel> mRotationChannels;
|
||||||
|
@ -27,9 +27,9 @@ class CAnimation : public CResource
|
||||||
|
|
||||||
struct SBoneChannelInfo
|
struct SBoneChannelInfo
|
||||||
{
|
{
|
||||||
uint8 ScaleChannelIdx;
|
uint8 ScaleChannelIdx = 0xFF;
|
||||||
uint8 RotationChannelIdx;
|
uint8 RotationChannelIdx = 0xFF;
|
||||||
uint8 TranslationChannelIdx;
|
uint8 TranslationChannelIdx = 0xFF;
|
||||||
};
|
};
|
||||||
SBoneChannelInfo mBoneInfo[100];
|
SBoneChannelInfo mBoneInfo[100];
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue