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