Commit a8f35e0d authored by cutealien's avatar cutealien

Make sure we can link again without _IRR_COMPILE_WITH_SKINNED_MESH_SUPPORT_ (reported by Yoran)

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@3537 dfc29bdd-3216-0410-991c-e03cc46cb475
parent fdcdf60e
...@@ -194,6 +194,10 @@ IMesh * CAnimatedMeshSceneNode::getMeshForCurrentFrame() ...@@ -194,6 +194,10 @@ IMesh * CAnimatedMeshSceneNode::getMeshForCurrentFrame()
} }
else else
{ {
#ifndef _IRR_COMPILE_WITH_SKINNED_MESH_SUPPORT_
return 0;
#endif
// As multiple scene nodes may be sharing the same skinned mesh, we have to // As multiple scene nodes may be sharing the same skinned mesh, we have to
// re-animate it every frame to ensure that this node gets the mesh that it needs. // re-animate it every frame to ensure that this node gets the mesh that it needs.
...@@ -568,11 +572,15 @@ IShadowVolumeSceneNode* CAnimatedMeshSceneNode::addShadowVolumeSceneNode( ...@@ -568,11 +572,15 @@ IShadowVolumeSceneNode* CAnimatedMeshSceneNode::addShadowVolumeSceneNode(
return Shadow; return Shadow;
} }
//! Returns a pointer to a child node, which has the same transformation as //! Returns a pointer to a child node, which has the same transformation as
//! the corresponding joint, if the mesh in this scene node is a skinned mesh. //! the corresponding joint, if the mesh in this scene node is a skinned mesh.
IBoneSceneNode* CAnimatedMeshSceneNode::getJointNode(const c8* jointName) IBoneSceneNode* CAnimatedMeshSceneNode::getJointNode(const c8* jointName)
{ {
#ifndef _IRR_COMPILE_WITH_SKINNED_MESH_SUPPORT_
os::Printer::log("Compiled without _IRR_COMPILE_WITH_SKINNED_MESH_SUPPORT_", ELL_WARNING);
return 0;
#endif
if (!Mesh || Mesh->getMeshType() != EAMT_SKINNED) if (!Mesh || Mesh->getMeshType() != EAMT_SKINNED)
{ {
os::Printer::log("No mesh, or mesh not of skinned mesh type", ELL_WARNING); os::Printer::log("No mesh, or mesh not of skinned mesh type", ELL_WARNING);
...@@ -601,10 +609,16 @@ IBoneSceneNode* CAnimatedMeshSceneNode::getJointNode(const c8* jointName) ...@@ -601,10 +609,16 @@ IBoneSceneNode* CAnimatedMeshSceneNode::getJointNode(const c8* jointName)
} }
//! Returns a pointer to a child node, which has the same transformation as //! Returns a pointer to a child node, which has the same transformation as
//! the corresponding joint, if the mesh in this scene node is a skinned mesh. //! the corresponding joint, if the mesh in this scene node is a skinned mesh.
IBoneSceneNode* CAnimatedMeshSceneNode::getJointNode(u32 jointID) IBoneSceneNode* CAnimatedMeshSceneNode::getJointNode(u32 jointID)
{ {
#ifndef _IRR_COMPILE_WITH_SKINNED_MESH_SUPPORT_
os::Printer::log("Compiled without _IRR_COMPILE_WITH_SKINNED_MESH_SUPPORT_", ELL_WARNING);
return 0;
#endif
if (!Mesh || Mesh->getMeshType() != EAMT_SKINNED) if (!Mesh || Mesh->getMeshType() != EAMT_SKINNED)
{ {
os::Printer::log("No mesh, or mesh not of skinned mesh type", ELL_WARNING); os::Printer::log("No mesh, or mesh not of skinned mesh type", ELL_WARNING);
...@@ -625,6 +639,10 @@ IBoneSceneNode* CAnimatedMeshSceneNode::getJointNode(u32 jointID) ...@@ -625,6 +639,10 @@ IBoneSceneNode* CAnimatedMeshSceneNode::getJointNode(u32 jointID)
//! Gets joint count. //! Gets joint count.
u32 CAnimatedMeshSceneNode::getJointCount() const u32 CAnimatedMeshSceneNode::getJointCount() const
{ {
#ifndef _IRR_COMPILE_WITH_SKINNED_MESH_SUPPORT_
return 0;
#endif
if (!Mesh || Mesh->getMeshType() != EAMT_SKINNED) if (!Mesh || Mesh->getMeshType() != EAMT_SKINNED)
return 0; return 0;
...@@ -649,7 +667,6 @@ ISceneNode* CAnimatedMeshSceneNode::getXJointNode(const c8* jointName) ...@@ -649,7 +667,6 @@ ISceneNode* CAnimatedMeshSceneNode::getXJointNode(const c8* jointName)
return getJointNode(jointName); return getJointNode(jointName);
} }
//! Removes a child from this scene node. //! Removes a child from this scene node.
//! Implemented here, to be able to remove the shadow properly, if there is one, //! Implemented here, to be able to remove the shadow properly, if there is one,
//! or to remove attached childs. //! or to remove attached childs.
...@@ -890,7 +907,6 @@ void CAnimatedMeshSceneNode::updateAbsolutePosition() ...@@ -890,7 +907,6 @@ void CAnimatedMeshSceneNode::updateAbsolutePosition()
} }
} }
//! 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)
void CAnimatedMeshSceneNode::setJointMode(E_JOINT_UPDATE_ON_RENDER mode) void CAnimatedMeshSceneNode::setJointMode(E_JOINT_UPDATE_ON_RENDER mode)
{ {
...@@ -898,7 +914,6 @@ void CAnimatedMeshSceneNode::setJointMode(E_JOINT_UPDATE_ON_RENDER mode) ...@@ -898,7 +914,6 @@ void CAnimatedMeshSceneNode::setJointMode(E_JOINT_UPDATE_ON_RENDER mode)
JointMode=mode; JointMode=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)
...@@ -924,6 +939,9 @@ void CAnimatedMeshSceneNode::setRenderFromIdentity(bool enable) ...@@ -924,6 +939,9 @@ void CAnimatedMeshSceneNode::setRenderFromIdentity(bool enable)
//! updates the joint positions of this mesh //! updates the joint positions of this mesh
void CAnimatedMeshSceneNode::animateJoints(bool CalculateAbsolutePositions) void CAnimatedMeshSceneNode::animateJoints(bool CalculateAbsolutePositions)
{ {
#ifndef _IRR_COMPILE_WITH_SKINNED_MESH_SUPPORT_
return;
#endif
if (Mesh && Mesh->getMeshType() == EAMT_SKINNED ) if (Mesh && Mesh->getMeshType() == EAMT_SKINNED )
{ {
checkJoints(); checkJoints();
...@@ -997,11 +1015,14 @@ void CAnimatedMeshSceneNode::animateJoints(bool CalculateAbsolutePositions) ...@@ -997,11 +1015,14 @@ void CAnimatedMeshSceneNode::animateJoints(bool CalculateAbsolutePositions)
} }
} }
/*! /*!
*/ */
void CAnimatedMeshSceneNode::checkJoints() void CAnimatedMeshSceneNode::checkJoints()
{ {
#ifndef _IRR_COMPILE_WITH_SKINNED_MESH_SUPPORT_
return;
#endif
if (!Mesh || Mesh->getMeshType() != EAMT_SKINNED) if (!Mesh || Mesh->getMeshType() != EAMT_SKINNED)
return; return;
...@@ -1020,7 +1041,6 @@ void CAnimatedMeshSceneNode::checkJoints() ...@@ -1020,7 +1041,6 @@ void CAnimatedMeshSceneNode::checkJoints()
} }
} }
/*! /*!
*/ */
void CAnimatedMeshSceneNode::beginTransition() void CAnimatedMeshSceneNode::beginTransition()
......
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