# Added support for COLLADA skeletal animations.

Moved COLLADA-loading code into separate class, since it now handles
both PMD and PSA.
Desingletonised CSkeletonAnimManager, moved into CGameView.
Made Atlas load its icons with buffered IO, for possible efficiency.

This was SVN commit r4934.
This commit is contained in:
Ykkrosh
2007-03-01 18:52:53 +00:00
parent ea29a1caeb
commit fa45d214b3
21 changed files with 424 additions and 284 deletions
+5 -4
View File
@@ -26,10 +26,11 @@
/////////////////////////////////////////////////////////////////////////////////////////////////////////////
// Constructor
CModel::CModel()
CModel::CModel(CSkeletonAnimManager& skeletonAnimManager)
: m_Parent(NULL), m_Flags(0), m_Anim(NULL), m_AnimTime(0),
m_BoneMatrices(NULL), m_InverseBindBoneMatrices(NULL),
m_PositionValid(false), m_ShadingColor(1,1,1,1)
m_PositionValid(false), m_ShadingColor(1,1,1,1),
m_SkeletonAnimManager(skeletonAnimManager)
{
}
@@ -201,7 +202,7 @@ void CModel::CalcAnimatedObjectBound(CSkeletonAnimDef* anim,CBound& result)
// animation specific to this model
CSkeletonAnim* CModel::BuildAnimation(const char* filename, const char* name, float speed, double actionpos, double actionpos2)
{
CSkeletonAnimDef* def=g_SkelAnimMan.GetAnimation(filename);
CSkeletonAnimDef* def = m_SkeletonAnimManager.GetAnimation(filename);
if (!def) return NULL;
@@ -463,7 +464,7 @@ void CModel::RemoveProp(SPropPoint* point)
// Clone: return a clone of this model
CModel* CModel::Clone() const
{
CModel* clone = new CModel;
CModel* clone = new CModel(m_SkeletonAnimManager);
clone->m_ObjectBounds = m_ObjectBounds;
clone->InitModel(m_pModelDef);
clone->SetTexture(m_Texture);