Commit 93bf9460 authored by hybrid's avatar hybrid

Some coding style changes, made one method const.

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@1242 dfc29bdd-3216-0410-991c-e03cc46cb475
parent daedda85
......@@ -54,7 +54,7 @@ namespace scene
public:
IBoneSceneNode(ISceneNode* parent, ISceneManager* mgr, s32 id=-1) :
ISceneNode(parent, mgr, id),positionHint(-1),scaleHint(-1),rotationHint(-1) { }
ISceneNode(parent, mgr, id),positionHint(-1),scaleHint(-1),rotationHint(-1) { }
//! Returns the name of the bone
virtual const c8* getBoneName() const = 0;
......@@ -83,13 +83,11 @@ namespace scene
virtual void setSkinningSpace( E_BONE_SKINNING_SPACE space ) =0;
//! How the relative transformation of the bone is used
virtual E_BONE_SKINNING_SPACE getSkinningSpace() =0;
virtual E_BONE_SKINNING_SPACE getSkinningSpace() const =0;
//! updates the absolute position based on the relative and the parents position
virtual void updateAbsolutePositionOfAllChildren()=0;
s32 positionHint;
s32 scaleHint;
s32 rotationHint;
......
#include "CBoneSceneNode.h"
namespace irr
{
namespace scene
......@@ -17,11 +14,6 @@ CBoneSceneNode::CBoneSceneNode(ISceneNode* parent, ISceneManager* mgr, s32 id,
}
//! destructor
CBoneSceneNode::~CBoneSceneNode()
{
}
//! Returns the name of the bone
const c8* CBoneSceneNode::getBoneName() const
......@@ -82,8 +74,6 @@ void CBoneSceneNode::OnAnimate(u32 timeMs)
}
void CBoneSceneNode::helper_updateAbsolutePositionOfAllChildren(ISceneNode *Node)
{
Node->updateAbsolutePosition();
......@@ -102,9 +92,6 @@ void CBoneSceneNode::updateAbsolutePositionOfAllChildren()
}
void CBoneSceneNode::serializeAttributes(io::IAttributes* out, io::SAttributeReadWriteOptions* options) const
{
out->addInt("BoneIndex", BoneIndex);
......@@ -112,13 +99,16 @@ void CBoneSceneNode::serializeAttributes(io::IAttributes* out, io::SAttributeRea
out->addEnum("AnimationMode", AnimationMode, BoneAnimationModeNames);
}
void CBoneSceneNode::deserializeAttributes(io::IAttributes* in, io::SAttributeReadWriteOptions* options)
{
BoneIndex = in->getAttributeAsInt("BoneIndex");
BoneName = in->getAttributeAsString("BoneName");
AnimationMode = (E_BONE_ANIMATION_MODE)in->getAttributeAsEnumeration("AnimationMode", BoneAnimationModeNames);
// todo: add/replace bone in parent with bone from mesh
// TODO: add/replace bone in parent with bone from mesh
}
} // namespace scene
} // namespace irr
......@@ -20,9 +20,6 @@ namespace scene
CBoneSceneNode(ISceneNode* parent, ISceneManager* mgr,
s32 id=-1, u32 boneIndex=0, const c8* boneName=0);
//! destructor
~CBoneSceneNode();
//! Returns the name of the bone
virtual const c8* getBoneName() const;
......@@ -38,14 +35,13 @@ namespace scene
//! returns the axis aligned bounding box of this node
virtual const core::aabbox3d<f32>& getBoundingBox() const;
/*
//! Returns the relative transformation of the scene node.
//virtual core::matrix4 getRelativeTransformation() const;
*/
virtual void OnAnimate(u32 timeMs);
void helper_updateAbsolutePositionOfAllChildren(ISceneNode *Node);
virtual void updateAbsolutePositionOfAllChildren();
//! Writes attributes of the scene node.
......@@ -60,22 +56,20 @@ namespace scene
SkinningSpace=space;
}
virtual E_BONE_SKINNING_SPACE getSkinningSpace()
virtual E_BONE_SKINNING_SPACE getSkinningSpace() const
{
return SkinningSpace;
}
private:
void helper_updateAbsolutePositionOfAllChildren(ISceneNode *Node);
E_BONE_ANIMATION_MODE AnimationMode;
E_BONE_SKINNING_SPACE SkinningSpace;
u32 BoneIndex;
core::stringc BoneName;
core::aabbox3d<f32> Box;
};
......
......@@ -1500,13 +1500,14 @@ E_DRIVER_TYPE CNullDriver::getDriverType() const
void CNullDriver::deleteMaterialRenders()
{
// delete material renderers
for (int i=0; i<(int)MaterialRenderers.size(); ++i)
for (u32 i=0; i<MaterialRenderers.size(); ++i)
if (MaterialRenderers[i].Renderer)
MaterialRenderers[i].Renderer->drop();
MaterialRenderers.clear();
}
//! Returns pointer to material renderer or null
IMaterialRenderer* CNullDriver::getMaterialRenderer(u32 idx)
{
......@@ -1517,7 +1518,6 @@ IMaterialRenderer* CNullDriver::getMaterialRenderer(u32 idx)
}
//! Returns amount of currently available material renderers.
u32 CNullDriver::getMaterialRendererCount() const
{
......
This diff is collapsed.
......@@ -112,9 +112,6 @@ namespace scene
//! (This feature is not implementated in irrlicht yet)
virtual bool setHardwareSkinning(bool on);
//Interface for the mesh loaders (finalize should lock these functions, and they should have some prefix like loader_
//these functions will use the needed arrays, set vaules, etc to help the loaders
......@@ -131,21 +128,16 @@ namespace scene
//! loaders should call this after populating the mesh
virtual void finalize();
virtual SSkinMeshBuffer *createBuffer();
virtual SJoint *createJoint(SJoint *parent=0);
virtual SPositionKey *createPositionKey(SJoint *joint);
virtual SScaleKey *createScaleKey(SJoint *joint);
virtual SRotationKey *createRotationKey(SJoint *joint);
virtual SScaleKey *createScaleKey(SJoint *joint);
virtual SWeight *createWeight(SJoint *joint);
private:
void checkForAnimation();
......@@ -158,7 +150,7 @@ private:
void getFrameData(f32 frame,SJoint *Node,core::vector3df &position, s32 &positionHint, core::vector3df &scale, s32 &scaleHint, core::quaternion &rotation, s32 &rotationHint);
void CalculateGlobalMatrixes(SJoint *Joint,SJoint *ParentJoint);
void CalculateGlobalMatrices(SJoint *Joint,SJoint *ParentJoint);
void SkinJoint(SJoint *Joint, SJoint *ParentJoint);
......@@ -183,8 +175,8 @@ private:
f32 AnimationFrames;
f32 lastAnimatedFrame;
f32 lastSkinnedFrame;
f32 LastAnimatedFrame;
f32 LastSkinnedFrame;
bool BoneControlUsed;
bool AnimateNormals;
......
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