does MeshMS3D&MeshX format support in irrlicht 1.4 remov
does MeshMS3D&MeshX format support in irrlicht 1.4 remov
i could't find IAnimatedMeshMS3D and IAnimatedMeshX in irrlicht 1.4.1 header,does it mean irrlicht don't support these format in this version?please help,thanks~
hi jp,i'm finding the details to fix the example irrlicht_phsyx for the new version both in irrlicht and phsyx,there is the code:
below "update all dummy transformation nodes" is the problem to fix for the new irrlicht version,i tried to convert the type IAnimatedMeshMS3D to ISkinnedMesh but it doesn't work,i also couldn't find "getMatrixOfJoint" method,thanks for your help.
my english is poor ,forgive me:P
Code: Select all
void CPhysXAnimatedMeshSceneNode::OnPostRender(u32 timeMs)
{
s32 frameNr = getFrameNr();
if (IsVisible)
{
// animate this node with all animators
core::list<ISceneNodeAnimator*>::Iterator ait = Animators.begin();
for (; ait != Animators.end(); ++ait)
(*ait)->animateNode(this, timeMs);
// update absolute position
updateAbsolutePosition();
// update all dummy transformation nodes
if (!JointChildSceneNodes.empty() && Mesh
&& (Mesh->getMeshType() == EAMT_MS3D || Mesh->getMeshType() == EAMT_X))
{
IAnimatedMeshMS3D* amm = (IAnimatedMeshMS3D*)Mesh;
core::matrix4* mat;
for (s32 i=0; i<(s32)JointChildSceneNodes.size(); ++i)
if (JointChildSceneNodes[i])
{
mat = amm->getMatrixOfJoint(i, frameNr);
if (mat)
JointChildSceneNodes[i]->getRelativeTransformationMatrix() = *mat;
}
}
core::list<ISceneNode*>::Iterator it = Children.begin();
for (; it != Children.end(); ++it)
(*it)->OnAnimate(timeMs);
}
}
my english is poor ,forgive me:P
How does it not work if you cast to ISkinnedMesh? Compile error? Crash?
getMatrixOfJoint may not exist anymore in any particular form but if you look in IAnimatedMeshSceneNode in the API/docs then you can grab the required IBoneSceneNode and then grab its absolute transformation matrix, which i guess is probably the same thing.
So in that case it seems like you don't need the mesh at all... because you're working with an implementation of IAnimatedMeshSceneNode you can just call getJointNode(i);
getMatrixOfJoint may not exist anymore in any particular form but if you look in IAnimatedMeshSceneNode in the API/docs then you can grab the required IBoneSceneNode and then grab its absolute transformation matrix, which i guess is probably the same thing.
So in that case it seems like you don't need the mesh at all... because you're working with an implementation of IAnimatedMeshSceneNode you can just call getJointNode(i);