Commit ca91742a authored by hybrid's avatar hybrid

Fixed a possible transformation problem in debug render.

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@1289 dfc29bdd-3216-0410-991c-e03cc46cb475
parent eefa8390
...@@ -404,6 +404,7 @@ void CAnimatedMeshSceneNode::render() ...@@ -404,6 +404,7 @@ void CAnimatedMeshSceneNode::render()
driver->setTransform(video::ETS_WORLD, AbsoluteTransformation); driver->setTransform(video::ETS_WORLD, AbsoluteTransformation);
} }
driver->setTransform(video::ETS_WORLD, AbsoluteTransformation);
if ( DebugDataVisible & scene::EDS_BBOX ) if ( DebugDataVisible & scene::EDS_BBOX )
driver->draw3DBox(Box, video::SColor(0,255,255,255)); driver->draw3DBox(Box, video::SColor(0,255,255,255));
...@@ -586,10 +587,9 @@ IBoneSceneNode* CAnimatedMeshSceneNode::getJointNode(const c8* jointName) ...@@ -586,10 +587,9 @@ IBoneSceneNode* CAnimatedMeshSceneNode::getJointNode(const c8* jointName)
checkJoints(); checkJoints();
ISkinnedMesh *skinnedMesh=(ISkinnedMesh*)Mesh; ISkinnedMesh *skinnedMesh=(ISkinnedMesh*)Mesh;
s32 number = skinnedMesh->getJointNumber(jointName); const s32 number = skinnedMesh->getJointNumber(jointName);
if (number == -1) if (number == -1)
{ {
...@@ -825,6 +825,7 @@ void CAnimatedMeshSceneNode::setMesh(IAnimatedMesh* mesh) ...@@ -825,6 +825,7 @@ void CAnimatedMeshSceneNode::setMesh(IAnimatedMesh* mesh)
Mesh->grab(); Mesh->grab();
} }
// returns the absolute transformation for a special MD3 Tag if the mesh is a md3 mesh, // returns the absolute transformation for a special MD3 Tag if the mesh is a md3 mesh,
// or the absolutetransformation if it's a normal scenenode // or the absolutetransformation if it's a normal scenenode
const SMD3QuaterionTag& CAnimatedMeshSceneNode::getMD3TagTransformation( const core::stringc & tagname) const SMD3QuaterionTag& CAnimatedMeshSceneNode::getMD3TagTransformation( const core::stringc & tagname)
...@@ -973,26 +974,18 @@ void CAnimatedMeshSceneNode::animateJoints(bool CalculateAbsolutePositions) ...@@ -973,26 +974,18 @@ void CAnimatedMeshSceneNode::animateJoints(bool CalculateAbsolutePositions)
{ {
//---slow--- //---slow---
for (u32 n=0;n<JointChildSceneNodes.size();++n) for (u32 n=0;n<JointChildSceneNodes.size();++n)
{
if (JointChildSceneNodes[n]->getParent()==this) if (JointChildSceneNodes[n]->getParent()==this)
{ {
JointChildSceneNodes[n]->updateAbsolutePositionOfAllChildren(); //temp, should be an option JointChildSceneNodes[n]->updateAbsolutePositionOfAllChildren(); //temp, should be an option
} }
} }
} }
} }
}
} }
void CAnimatedMeshSceneNode::checkJoints() void CAnimatedMeshSceneNode::checkJoints()
{ {
if (!Mesh || Mesh->getMeshType() != EAMT_SKINNED) if (!Mesh || Mesh->getMeshType() != EAMT_SKINNED)
...@@ -1010,6 +1003,7 @@ void CAnimatedMeshSceneNode::checkJoints() ...@@ -1010,6 +1003,7 @@ void CAnimatedMeshSceneNode::checkJoints()
} }
} }
void CAnimatedMeshSceneNode::beginTransition() void CAnimatedMeshSceneNode::beginTransition()
{ {
if (!JointsUsed) if (!JointsUsed)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment