Commit 01c43247 authored by hybrid's avatar hybrid

Added a new constructor for SAnimatedMesh and some cleanup.

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@835 dfc29bdd-3216-0410-991c-e03cc46cb475
parent 11b249ea
......@@ -71,7 +71,7 @@ namespace scene
public:
//! destructor
virtual ~IAnimatedMesh() {};
virtual ~IAnimatedMesh() { }
//! Gets the frame count of the animated mesh.
/** \return Returns the amount of frames. If the amount is 1, it is a
......
......@@ -23,7 +23,7 @@ namespace scene
public:
//! destructor
virtual ~IMesh(){};
virtual ~IMesh() { }
//! Returns the amount of mesh buffers.
/** \return Returns the amount of mesh buffers (IMeshBuffer) in this mesh. */
......@@ -40,7 +40,7 @@ namespace scene
/** \param material: material to search for
\return Returns the pointer to the mesh buffer or
NULL if there is no such mesh buffer. */
virtual IMeshBuffer* getMeshBuffer( const video::SMaterial &material) const { return 0; }
virtual IMeshBuffer* getMeshBuffer( const video::SMaterial &material) const = 0;
//! Returns an axis aligned bounding box of the mesh.
/** \return A bounding box of this mesh is returned. */
......
......@@ -57,7 +57,7 @@ enum E_PRIMITIVE_TYPE
public:
//! destructor
virtual ~IMeshBuffer() {};
virtual ~IMeshBuffer() { }
//! returns the material of this meshbuffer
virtual video::SMaterial& getMaterial() = 0;
......
......@@ -19,18 +19,27 @@ namespace scene
struct SAnimatedMesh : public IAnimatedMesh
{
//! constructor
SAnimatedMesh()
SAnimatedMesh() : IAnimatedMesh(), Type(EAMT_UNKNOWN)
{
#ifdef _DEBUG
setDebugName("SAnimatedMesh");
#endif
}
Type = EAMT_UNKNOWN;
//! constructor
SAnimatedMesh(scene::IMesh* mesh, scene::E_ANIMATED_MESH_TYPE type) : IAnimatedMesh(), Type(type)
{
#ifdef _DEBUG
setDebugName("SAnimatedMesh");
#endif
addMesh(mesh);
recalculateBoundingBox();
}
//! destructor
~SAnimatedMesh()
virtual ~SAnimatedMesh()
{
// drop meshes
for (u32 i=0; i<Meshes.size(); ++i)
......
......@@ -103,16 +103,6 @@ inline void makePlanarMappingT(VERTEXTYPE *v,
}
}
//! Constructor
CMeshManipulator::CMeshManipulator()
{
}
//! destructor
CMeshManipulator::~CMeshManipulator()
{
}
//! Flips the direction of surfaces. Changes backfacing triangles to frontfacing
//! triangles and vice versa.
......@@ -874,17 +864,9 @@ s32 CMeshManipulator::getPolyCount(scene::IAnimatedMesh* mesh) const
}
//! create a new AnimatedMesh and adds the mesh to it
IAnimatedMesh * CMeshManipulator::createAnimatedMesh(scene::IMesh* mesh,scene::E_ANIMATED_MESH_TYPE type) const
IAnimatedMesh * CMeshManipulator::createAnimatedMesh(scene::IMesh* mesh, scene::E_ANIMATED_MESH_TYPE type) const
{
SAnimatedMesh* animatedMesh = new SAnimatedMesh();
animatedMesh->Type = type;
animatedMesh->addMesh(mesh);
animatedMesh->recalculateBoundingBox();
//mesh->drop ();
return animatedMesh;
return new SAnimatedMesh(mesh, type);
}
......
......@@ -21,11 +21,8 @@ class CMeshManipulator : public IMeshManipulator
{
public:
//! Constructor
CMeshManipulator();
//! destructor
virtual ~CMeshManipulator();
virtual ~CMeshManipulator() {}
//! Flips the direction of surfaces. Changes backfacing triangles to frontfacing
//! triangles and vice versa.
......
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