Commit e3d76c04 authored by hybrid's avatar hybrid

Minor cleanup and type usage clarifications.

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@906 dfc29bdd-3216-0410-991c-e03cc46cb475
parent bad0b246
...@@ -30,8 +30,8 @@ CAnimatedMeshSceneNode::CAnimatedMeshSceneNode(IAnimatedMesh* mesh, ISceneNode* ...@@ -30,8 +30,8 @@ CAnimatedMeshSceneNode::CAnimatedMeshSceneNode(IAnimatedMesh* mesh, ISceneNode*
const core::vector3df& position, const core::vector3df& rotation, const core::vector3df& scale) const core::vector3df& position, const core::vector3df& rotation, const core::vector3df& scale)
: IAnimatedMeshSceneNode(parent, mgr, id, position, rotation, scale), Mesh(0), : IAnimatedMeshSceneNode(parent, mgr, id, position, rotation, scale), Mesh(0),
BeginFrameTime(0), StartFrame(0), EndFrame(0), FramesPerSecond(25.f / 1000.f ), BeginFrameTime(0), StartFrame(0), EndFrame(0), FramesPerSecond(25.f / 1000.f ),
CurrentFrameNr(0.f), JointMode(0), JointsUsed(0), CurrentFrameNr(0.f), JointMode(0), JointsUsed(false),
TransitionTime(0), Transiting(0), TransitingBlend(0), TransitionTime(0), Transiting(0.f), TransitingBlend(0.f),
Looping(true), ReadOnlyMaterials(false), Looping(true), ReadOnlyMaterials(false),
LoopCallBack(0), PassCount(0), Shadow(0) LoopCallBack(0), PassCount(0), Shadow(0)
{ {
...@@ -45,7 +45,6 @@ CAnimatedMeshSceneNode::CAnimatedMeshSceneNode(IAnimatedMesh* mesh, ISceneNode* ...@@ -45,7 +45,6 @@ CAnimatedMeshSceneNode::CAnimatedMeshSceneNode(IAnimatedMesh* mesh, ISceneNode*
} }
//! destructor //! destructor
CAnimatedMeshSceneNode::~CAnimatedMeshSceneNode() CAnimatedMeshSceneNode::~CAnimatedMeshSceneNode()
{ {
...@@ -64,15 +63,6 @@ CAnimatedMeshSceneNode::~CAnimatedMeshSceneNode() ...@@ -64,15 +63,6 @@ CAnimatedMeshSceneNode::~CAnimatedMeshSceneNode()
} }
//! Sets the current frame. From now on the animation is played from this frame. //! Sets the current frame. From now on the animation is played from this frame.
void CAnimatedMeshSceneNode::setCurrentFrame(f32 frame) void CAnimatedMeshSceneNode::setCurrentFrame(f32 frame)
{ {
...@@ -81,8 +71,7 @@ void CAnimatedMeshSceneNode::setCurrentFrame(f32 frame) ...@@ -81,8 +71,7 @@ void CAnimatedMeshSceneNode::setCurrentFrame(f32 frame)
BeginFrameTime = os::Timer::getTime() - (s32)((CurrentFrameNr - StartFrame) / FramesPerSecond); BeginFrameTime = os::Timer::getTime() - (s32)((CurrentFrameNr - StartFrame) / FramesPerSecond);
beginTransition(); //transite to this frame if enabled beginTransition(); //transit to this frame if enabled
} }
...@@ -95,28 +84,26 @@ f32 CAnimatedMeshSceneNode::getFrameNr() const ...@@ -95,28 +84,26 @@ f32 CAnimatedMeshSceneNode::getFrameNr() const
f32 CAnimatedMeshSceneNode::buildFrameNr(u32 timeMs) f32 CAnimatedMeshSceneNode::buildFrameNr(u32 timeMs)
{ {
if (Transiting!=0.f)
if (Transiting!=0)
{ {
TransitingBlend=f32(timeMs-BeginFrameTime) * Transiting; TransitingBlend = (f32)(timeMs-BeginFrameTime) * Transiting;
if (TransitingBlend>1) if (TransitingBlend > 1.f)
{ {
Transiting=0; Transiting=0.f;
TransitingBlend=0; TransitingBlend=0.f;
} }
} }
if (StartFrame==EndFrame) if (StartFrame==EndFrame)
return (f32)StartFrame; //Support for non animated meshes return (f32)StartFrame; //Support for non animated meshes
if (FramesPerSecond==0) if (FramesPerSecond==0.f)
return (f32)StartFrame; return (f32)StartFrame;
if (Looping) if (Looping)
{ {
// play animation looped // play animation looped
if (FramesPerSecond>0) //forwards... if (FramesPerSecond > 0.f) //forwards...
{ {
const s32 lenInTime = s32( f32(EndFrame - StartFrame) / FramesPerSecond); const s32 lenInTime = s32( f32(EndFrame - StartFrame) / FramesPerSecond);
return StartFrame + ( (timeMs - BeginFrameTime) % lenInTime) *FramesPerSecond; return StartFrame + ( (timeMs - BeginFrameTime) % lenInTime) *FramesPerSecond;
...@@ -133,7 +120,7 @@ f32 CAnimatedMeshSceneNode::buildFrameNr(u32 timeMs) ...@@ -133,7 +120,7 @@ f32 CAnimatedMeshSceneNode::buildFrameNr(u32 timeMs)
f32 frame; f32 frame;
if (FramesPerSecond>0) //forwards... if (FramesPerSecond > 0.f) //forwards...
{ {
const f32 deltaFrame = floorf( f32 ( timeMs - BeginFrameTime ) * FramesPerSecond ); const f32 deltaFrame = floorf( f32 ( timeMs - BeginFrameTime ) * FramesPerSecond );
...@@ -874,9 +861,7 @@ void CAnimatedMeshSceneNode::updateAbsolutePosition() ...@@ -874,9 +861,7 @@ void CAnimatedMeshSceneNode::updateAbsolutePosition()
MD3Special.AbsoluteTagList[i].position = parent.position + (*taglist)[i].position + relative.position; MD3Special.AbsoluteTagList[i].position = parent.position + (*taglist)[i].position + relative.position;
MD3Special.AbsoluteTagList[i].rotation = parent.rotation * (*taglist)[i].rotation * relative.rotation; MD3Special.AbsoluteTagList[i].rotation = parent.rotation * (*taglist)[i].rotation * relative.rotation;
} }
} }
} }
//! Set the joint update mode (0-unused, 1-get joints only, 2-set joints only, 3-move and set) //! Set the joint update mode (0-unused, 1-get joints only, 2-set joints only, 3-move and set)
...@@ -893,11 +878,13 @@ void CAnimatedMeshSceneNode::setJointMode(s32 mode) ...@@ -893,11 +878,13 @@ void CAnimatedMeshSceneNode::setJointMode(s32 mode)
//! Sets the transition time in seconds (note: This needs to enable joints, and setJointmode maybe set to 2) //! Sets the transition time in seconds (note: This needs to enable joints, and setJointmode maybe set to 2)
//! you must call animateJoints(), or the mesh will not animate //! you must call animateJoints(), or the mesh will not animate
void CAnimatedMeshSceneNode::setTransitionTime(f32 Time) void CAnimatedMeshSceneNode::setTransitionTime(f32 time)
{ {
if (Time!=0) checkJoints(); if (time != 0.f)
if (!(JointMode &2)) setJointMode(2); checkJoints();
TransitionTime=u32(Time*1000.0f); if (!(JointMode & 0x2))
setJointMode(2);
TransitionTime = (u32)core::floor32(time*1000.0f);
} }
//! updates the joint positions of this mesh //! updates the joint positions of this mesh
...@@ -925,63 +912,54 @@ void CAnimatedMeshSceneNode::animateJoints() ...@@ -925,63 +912,54 @@ void CAnimatedMeshSceneNode::animateJoints()
} }
//----------------------------------------- //-----------------------------------------
// Transition // Transition
//----------------------------------------- //-----------------------------------------
if (Transiting!=0) if (Transiting != 0.f)
{ {
u32 n;
//Check the array is big enough (not really needed) //Check the array is big enough (not really needed)
if (PretransitingSave.size()<JointChildSceneNodes.size()) if (PretransitingSave.size()<JointChildSceneNodes.size())
{ {
for(n=PretransitingSave.size();n<JointChildSceneNodes.size();++n) for(u32 n=PretransitingSave.size(); n<JointChildSceneNodes.size(); ++n)
PretransitingSave.push_back(core::matrix4()); PretransitingSave.push_back(core::matrix4());
} }
f32 InvTransitingBlend=1-TransitingBlend; for (u32 n=0; n<JointChildSceneNodes.size(); ++n)
for (n=0;n<JointChildSceneNodes.size();++n)
{ {
//------Position------ //------Position------
JointChildSceneNodes[n]->setPosition(PretransitingSave[n].getTranslation()*InvTransitingBlend+ JointChildSceneNodes[n]->setPosition(
JointChildSceneNodes[n]->getPosition()*TransitingBlend); core::lerp(
PretransitingSave[n].getTranslation(),
JointChildSceneNodes[n]->getPosition(),
TransitingBlend));
//------Rotation------ //------Rotation------
//Code is slow, needs to be fixed up //Code is slow, needs to be fixed up
core::quaternion RotationStart, RotationEnd; const core::quaternion RotationStart(PretransitingSave[n].getRotationDegrees()*core::DEGTORAD);
core::quaternion QRotation; const core::quaternion RotationEnd(JointChildSceneNodes[n]->getRotation()*core::DEGTORAD);
core::vector3df tmpVector;
tmpVector=PretransitingSave[n].getRotationDegrees();
RotationStart.set(tmpVector.X*core::DEGTORAD ,tmpVector.Y*core::DEGTORAD,tmpVector.Z*core::DEGTORAD);
tmpVector=JointChildSceneNodes[n]->getRotation();
RotationEnd.set(tmpVector.X*core::DEGTORAD ,tmpVector.Y*core::DEGTORAD,tmpVector.Z*core::DEGTORAD);
core::quaternion QRotation;
QRotation.slerp(RotationStart, RotationEnd, TransitingBlend); QRotation.slerp(RotationStart, RotationEnd, TransitingBlend);
QRotation.toEuler (tmpVector); core::vector3df tmpVector;
tmpVector.X*=core::RADTODEG; tmpVector.Y*=core::RADTODEG; tmpVector.Z*=core::RADTODEG; //convert from radians back to degrees QRotation.toEuler(tmpVector);
tmpVector*=core::RADTODEG; //convert from radians back to degrees
JointChildSceneNodes[n]->setRotation( tmpVector ); JointChildSceneNodes[n]->setRotation( tmpVector );
//------Scale------ //------Scale------
//JointChildSceneNodes[n]->setScale(PretransitingSave[n].getScale()*InvTransitingBlend+ //JointChildSceneNodes[n]->setScale(
// JointChildSceneNodes[n]->getScale()*TransitingBlend); // core::lerp(
// PretransitingSave[n].getScale(),
// JointChildSceneNodes[n]->getScale(),
// TransitingBlend));
} }
} }
} }
} }
} }
...@@ -994,52 +972,40 @@ void CAnimatedMeshSceneNode::checkJoints() ...@@ -994,52 +972,40 @@ void CAnimatedMeshSceneNode::checkJoints()
if (!JointsUsed) if (!JointsUsed)
{ {
//Create joints for SkinnedMesh //Create joints for SkinnedMesh
((ISkinnedMesh*)Mesh)->createJoints( JointChildSceneNodes,this,SceneManager); ((ISkinnedMesh*)Mesh)->createJoints(JointChildSceneNodes, this, SceneManager);
((ISkinnedMesh*)Mesh)->recoverJointsFromMesh( JointChildSceneNodes); ((ISkinnedMesh*)Mesh)->recoverJointsFromMesh(JointChildSceneNodes);
JointsUsed=true; JointsUsed=true;
JointMode=1; JointMode=1;
} }
} }
void CAnimatedMeshSceneNode::beginTransition() void CAnimatedMeshSceneNode::beginTransition()
{ {
if (!JointsUsed) return; if (!JointsUsed)
return;
u32 n;
if (TransitionTime!=0) if (TransitionTime != 0)
{ {
//Check the array is big enough //Check the array is big enough
if (PretransitingSave.size()<JointChildSceneNodes.size()) if (PretransitingSave.size()<JointChildSceneNodes.size())
{ {
for(n=PretransitingSave.size();n<JointChildSceneNodes.size();++n) for(u32 n=PretransitingSave.size(); n<JointChildSceneNodes.size(); ++n)
PretransitingSave.push_back(core::matrix4()); PretransitingSave.push_back(core::matrix4());
} }
//Copy the position of joints //Copy the position of joints
for (n=0;n<JointChildSceneNodes.size();++n) for (u32 n=0;n<JointChildSceneNodes.size();++n)
PretransitingSave[n]=JointChildSceneNodes[n]->getRelativeTransformation(); PretransitingSave[n]=JointChildSceneNodes[n]->getRelativeTransformation();
Transiting=1.0f/f32(TransitionTime); Transiting = core::reciprocal((f32)TransitionTime);
} }
} }
} // end namespace scene } // end namespace scene
} // end namespace irr } // end namespace irr
...@@ -150,9 +150,7 @@ namespace scene ...@@ -150,9 +150,7 @@ namespace scene
private: private:
f32 buildFrameNr( u32 timeMs); f32 buildFrameNr( u32 timeMs);
void checkJoints(); void checkJoints();
void beginTransition(); void beginTransition();
core::array<video::SMaterial> Materials; core::array<video::SMaterial> Materials;
...@@ -163,7 +161,6 @@ namespace scene ...@@ -163,7 +161,6 @@ namespace scene
s32 StartFrame; s32 StartFrame;
s32 EndFrame; s32 EndFrame;
f32 FramesPerSecond; f32 FramesPerSecond;
f32 CurrentFrameNr; f32 CurrentFrameNr;
s32 JointMode; //0-unused, 1-get joints only, 2-set joints only, 3-move and set s32 JointMode; //0-unused, 1-get joints only, 2-set joints only, 3-move and set
......
...@@ -34,26 +34,22 @@ CSkinnedMesh::CSkinnedMesh() ...@@ -34,26 +34,22 @@ CSkinnedMesh::CSkinnedMesh()
//! destructor //! destructor
CSkinnedMesh::~CSkinnedMesh() CSkinnedMesh::~CSkinnedMesh()
{ {
u32 n; for (u32 i=0; i<AllJoints.size(); ++i)
delete AllJoints[i];
for (n=0;n<AllJoints.size();++n)
{
if (AllJoints[n])
delete AllJoints[n];
}
for (n=0;n<LocalBuffers.size();++n) for (u32 j=0; j<LocalBuffers.size(); ++j)
{ {
if (LocalBuffers[n]) if (LocalBuffers[j])
LocalBuffers[n]->drop(); LocalBuffers[j]->drop();
} }
} }
//! returns the amount of frames in milliseconds. If the amount is 1, it is a static (=non animated) mesh. //! returns the amount of frames in milliseconds.
//! If the amount is 1, it is a static (=non animated) mesh.
s32 CSkinnedMesh::getFrameCount() s32 CSkinnedMesh::getFrameCount()
{ {
return (s32)AnimationFrames; return core::floor32(AnimationFrames);
} }
...@@ -72,7 +68,6 @@ IMesh* CSkinnedMesh::getMesh(s32 frame, s32 detailLevel, s32 startFrameLoop, s32 ...@@ -72,7 +68,6 @@ IMesh* CSkinnedMesh::getMesh(s32 frame, s32 detailLevel, s32 startFrameLoop, s32
} }
//-------------------------------------------------------------------------- //--------------------------------------------------------------------------
// Keyframe Animation // Keyframe Animation
//-------------------------------------------------------------------------- //--------------------------------------------------------------------------
...@@ -87,22 +82,22 @@ void CSkinnedMesh::animateMesh(f32 frame, f32 blend) ...@@ -87,22 +82,22 @@ void CSkinnedMesh::animateMesh(f32 frame, f32 blend)
lastAnimatedFrame=frame; lastAnimatedFrame=frame;
if (blend<=0) if (blend<=0.f)
return; //No need to animate return; //No need to animate
for (u32 i=0; i<AllJoints.size(); ++i) for (u32 i=0; i<AllJoints.size(); ++i)
{ {
//To Bitplane: The joints can be animated here with no input from there parents, but for setAnimationMode extra check are needed to their parents //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]; SJoint *Joint = AllJoints[i];
core::vector3df oldPosition = Joint->Animatedposition; const core::vector3df oldPosition = Joint->Animatedposition;
core::vector3df oldScale = Joint->Animatedscale; const core::vector3df oldScale = Joint->Animatedscale;
core::quaternion oldRotation = Joint->Animatedrotation; const core::quaternion oldRotation = Joint->Animatedrotation;
core::vector3df position =oldPosition; core::vector3df position = oldPosition;
core::vector3df scale =oldScale; core::vector3df scale = oldScale;
core::quaternion rotation =oldRotation; core::quaternion rotation = oldRotation;
if (!BoneControlUsed) if (!BoneControlUsed)
{ {
...@@ -112,31 +107,27 @@ void CSkinnedMesh::animateMesh(f32 frame, f32 blend) ...@@ -112,31 +107,27 @@ void CSkinnedMesh::animateMesh(f32 frame, f32 blend)
} }
getFrameData(frame, Joint, getFrameData(frame, Joint,
position, Joint->positionHint, position, Joint->positionHint,
scale, Joint->scaleHint, scale, Joint->scaleHint,
rotation, Joint->rotationHint); rotation, Joint->rotationHint);
if (blend==1.0f) if (blend==1.0f)
{ {
//No blending need: //No blending needed
Joint->Animatedposition = position; Joint->Animatedposition = position;
Joint->Animatedscale = scale; Joint->Animatedscale = scale;
Joint->Animatedrotation = rotation; Joint->Animatedrotation = rotation;
} }
else else
{ {
//Blend animation: //Blend animation
Joint->Animatedposition = core::lerp(oldPosition, position, blend);
f32 invBlend=1-blend; Joint->Animatedscale = core::lerp(oldScale, scale, blend);
Joint->Animatedposition = (position * blend) + (oldPosition* invBlend );
Joint->Animatedscale = (scale * blend) + (oldScale* invBlend );
Joint->Animatedrotation.slerp(oldRotation, rotation, blend); Joint->Animatedrotation.slerp(oldRotation, rotation, blend);
} }
//Node: //Note:
//_LocalAnimatedMatrix needs to be built at some point, but this function maybe called lots of times for //_LocalAnimatedMatrix needs to be built at some point, but this function may be called lots of times for
//one render (to play two animations at the same time) _LocalAnimatedMatrix only needs to be built once. //one render (to play two animations at the same time) _LocalAnimatedMatrix only needs to be built once.
//a call to buildAllLocalAnimatedMatrices is needed before skinning the mesh, and before the user gets the joints to move //a call to buildAllLocalAnimatedMatrices is needed before skinning the mesh, and before the user gets the joints to move
...@@ -144,7 +135,6 @@ void CSkinnedMesh::animateMesh(f32 frame, f32 blend) ...@@ -144,7 +135,6 @@ void CSkinnedMesh::animateMesh(f32 frame, f32 blend)
// Temp! // Temp!
buildAll_LocalAnimatedMatrices(); buildAll_LocalAnimatedMatrices();
//----------------- //-----------------
} }
BoneControlUsed=false; BoneControlUsed=false;
...@@ -179,13 +169,12 @@ void CSkinnedMesh::buildAll_LocalAnimatedMatrices() ...@@ -179,13 +169,12 @@ void CSkinnedMesh::buildAll_LocalAnimatedMatrices()
{ {
Joint->LocalAnimatedMatrix=Joint->LocalMatrix; Joint->LocalAnimatedMatrix=Joint->LocalMatrix;
} }
} }
} }
void CSkinnedMesh::buildAll_GlobalAnimatedMatrices(SJoint *Joint, SJoint *ParentJoint) void CSkinnedMesh::buildAll_GlobalAnimatedMatrices(SJoint *Joint, SJoint *ParentJoint)
{ {
if (!Joint) if (!Joint)
{ {
for (u32 i=0; i<RootJoints.size(); ++i) for (u32 i=0; i<RootJoints.size(); ++i)
...@@ -869,66 +858,77 @@ void CSkinnedMesh::finalize() ...@@ -869,66 +858,77 @@ void CSkinnedMesh::finalize()
core::array<SScaleKey> &ScaleKeys = AllJoints[i]->ScaleKeys; core::array<SScaleKey> &ScaleKeys = AllJoints[i]->ScaleKeys;
core::array<SRotationKey> &RotationKeys = AllJoints[i]->RotationKeys; core::array<SRotationKey> &RotationKeys = AllJoints[i]->RotationKeys;
if (PositionKeys.size()>2) if (PositionKeys.size()>2)
{
for(j=0;j<PositionKeys.size()-2;++j) for(j=0;j<PositionKeys.size()-2;++j)
{ {
if (PositionKeys[j].position == PositionKeys[j+1].position && PositionKeys[j+1].position == PositionKeys[j+2].position) if (PositionKeys[j].position == PositionKeys[j+1].position && PositionKeys[j+1].position == PositionKeys[j+2].position)
{ {
PositionKeys.erase(j+1); //the middle key is unneeded PositionKeys.erase(j+1); //the middle key is unneeded
j--; --j;
} }
} }
}
if (PositionKeys.size()>1) if (PositionKeys.size()>1)
{
for(j=0;j<PositionKeys.size()-1;++j) for(j=0;j<PositionKeys.size()-1;++j)
{ {
if (PositionKeys[j].frame >= PositionKeys[j+1].frame) //bad frame, unneed and may cause problems if (PositionKeys[j].frame >= PositionKeys[j+1].frame) //bad frame, unneed and may cause problems
{ {
PositionKeys.erase(j+1); PositionKeys.erase(j+1);
j--; --j;
} }
} }
}
if (ScaleKeys.size()>2) if (ScaleKeys.size()>2)
{
for(j=0;j<ScaleKeys.size()-2;++j) for(j=0;j<ScaleKeys.size()-2;++j)
{ {
if (ScaleKeys[j].scale == ScaleKeys[j+1].scale && ScaleKeys[j+1].scale == ScaleKeys[j+2].scale) if (ScaleKeys[j].scale == ScaleKeys[j+1].scale && ScaleKeys[j+1].scale == ScaleKeys[j+2].scale)
{ {
ScaleKeys.erase(j+1); //the middle key is unneeded ScaleKeys.erase(j+1); //the middle key is unneeded
j--; --j;
} }
} }
}
if (ScaleKeys.size()>1) if (ScaleKeys.size()>1)
for(j=0;j<ScaleKeys.size()-1;++j) {
for(j=0;j<ScaleKeys.size()-1;++j)
{
if (ScaleKeys[j].frame >= ScaleKeys[j+1].frame) //bad frame, unneed and may cause problems
{ {
if (ScaleKeys[j].frame >= ScaleKeys[j+1].frame) //bad frame, unneed and may cause problems ScaleKeys.erase(j+1);
{ --j;
ScaleKeys.erase(j+1);
j--;
}
} }
}
}
if (RotationKeys.size()>2) if (RotationKeys.size()>2)
{
for(j=0;j<RotationKeys.size()-2;++j) for(j=0;j<RotationKeys.size()-2;++j)
{ {
if (RotationKeys[j].rotation == RotationKeys[j+1].rotation && RotationKeys[j+1].rotation == RotationKeys[j+2].rotation) if (RotationKeys[j].rotation == RotationKeys[j+1].rotation && RotationKeys[j+1].rotation == RotationKeys[j+2].rotation)
{ {
RotationKeys.erase(j+1); //the middle key is unneeded RotationKeys.erase(j+1); //the middle key is unneeded
j--; --j;
} }
} }
}
if (RotationKeys.size()>1) if (RotationKeys.size()>1)
{
for(j=0;j<RotationKeys.size()-1;++j) for(j=0;j<RotationKeys.size()-1;++j)
{ {
if (RotationKeys[j].frame >= RotationKeys[j+1].frame) //bad frame, unneed and may cause problems if (RotationKeys[j].frame >= RotationKeys[j+1].frame) //bad frame, unneed and may cause problems
{ {
RotationKeys.erase(j+1); RotationKeys.erase(j+1);
j--; --j;
} }
} }
}
//Fill empty keyframe areas //Fill empty keyframe areas
...@@ -1088,7 +1088,7 @@ CSkinnedMesh::SWeight *CSkinnedMesh::createWeight(SJoint *joint) ...@@ -1088,7 +1088,7 @@ CSkinnedMesh::SWeight *CSkinnedMesh::createWeight(SJoint *joint)
void CSkinnedMesh::normalizeWeights() void CSkinnedMesh::normalizeWeights()
{ {
// node: unsure if weights ids are going to be used. // note: unsure if weights ids are going to be used.
// Normalise the weights on bones.... // Normalise the weights on bones....
...@@ -1179,6 +1179,7 @@ void CSkinnedMesh::tranferJointsToMesh(core::array<IBoneSceneNode*> &JointChildS ...@@ -1179,6 +1179,7 @@ void CSkinnedMesh::tranferJointsToMesh(core::array<IBoneSceneNode*> &JointChildS
BoneControlUsed=true; BoneControlUsed=true;
} }
void CSkinnedMesh::createJoints(core::array<IBoneSceneNode*> &JointChildSceneNodes, void CSkinnedMesh::createJoints(core::array<IBoneSceneNode*> &JointChildSceneNodes,
IAnimatedMeshSceneNode* AnimatedMeshSceneNode, ISceneManager* SceneManager) IAnimatedMeshSceneNode* AnimatedMeshSceneNode, ISceneManager* SceneManager)
{ {
......
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