Let md2 animate even with hw buffers.

git-svn-id: http://svn.code.sf.net/p/irrlicht/code/trunk@1098 dfc29bdd-3216-0410-991c-e03cc46cb475
This commit is contained in:
hybrid 2007-12-05 21:10:36 +00:00
parent a08dc1d84e
commit 75208f2f20
2 changed files with 2 additions and 22 deletions

View File

@ -417,6 +417,7 @@ void CAnimatedMeshMD2::updateInterpolationBuffer(s32 frame, s32 startFrameLoop,
//update bounding box
InterpolationBuffer.setBoundingBox(BoxList[secondFrame].getInterpolated(BoxList[firstFrame], div));
InterpolationBuffer.setDirty();
}

View File

@ -79,7 +79,6 @@ IMesh* CSkinnedMesh::getMesh(s32 frame, s32 detailLevel, s32 startFrameLoop, s32
//! blend: {0-old position, 1-New position}
void CSkinnedMesh::animateMesh(f32 frame, f32 blend)
{
if ( !HasAnimation || lastAnimatedFrame==frame)
return;
@ -91,7 +90,6 @@ void CSkinnedMesh::animateMesh(f32 frame, f32 blend)
for (u32 i=0; i<AllJoints.size(); ++i)
{
//To Bitplane: The joints can be animated here with no input from their parents, but for setAnimationMode extra checks are needed to their parents
SJoint *Joint = AllJoints[i];
const core::vector3df oldPosition = Joint->Animatedposition;
@ -132,7 +130,6 @@ void CSkinnedMesh::animateMesh(f32 frame, f32 blend)
buildAll_LocalAnimatedMatrices();
//-----------------
}
}
@ -431,17 +428,14 @@ void CSkinnedMesh::getFrameData(f32 frame, SJoint *Joint,
//! Preforms a software skin on this mesh based of joint positions
void CSkinnedMesh::skinMesh()
{
if ( !HasAnimation)
return;
//----------------
// Temp!
buildAll_GlobalAnimatedMatrices();
//-----------------
if (!HardwareSkinning)
{
//Software skin....
@ -466,10 +460,9 @@ void CSkinnedMesh::skinMesh()
for (i=0; i<RootJoints.size(); ++i)
SkinJoint(RootJoints[i], 0);
}
}
void CSkinnedMesh::SkinJoint(SJoint *Joint, SJoint *ParentJoint)
{
if (Joint->Weights.size())
@ -522,16 +515,6 @@ void CSkinnedMesh::SkinJoint(SJoint *Joint, SJoint *ParentJoint)
}
E_ANIMATED_MESH_TYPE CSkinnedMesh::getMeshType() const
{
return EAMT_SKINNED;
@ -940,7 +923,6 @@ void CSkinnedMesh::finalize()
if (HasAnimation)
{
//--- optimize and check keyframes ---
for(i=0;i<AllJoints.size();++i)
{
@ -1103,9 +1085,6 @@ void CSkinnedMesh::finalize()
Buffer->Transformation=AllJoints[i]->GlobalAnimatedMatrix;
}
}
}