Commit bcdb4977 authored by hybrid's avatar hybrid

Fixed whitespace and line endings.

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@1446 dfc29bdd-3216-0410-991c-e03cc46cb475
parent bea9e087
// Copyright (C) 2002-2008 Nikolaus Gebhardt // Copyright (C) 2008 Nikolaus Gebhardt
// This file is part of the "Irrlicht Engine". // This file is part of the "Irrlicht Engine".
// For conditions of distribution and use, see copyright notice in irrlicht.h // For conditions of distribution and use, see copyright notice in irrlicht.h
...@@ -15,35 +15,30 @@ namespace irr ...@@ -15,35 +15,30 @@ namespace irr
namespace scene namespace scene
{ {
class CDynamicMeshBuffer: public IDynamicMeshBuffer class CDynamicMeshBuffer: public IDynamicMeshBuffer
{ {
IVertexBuffer *VertexBuffer;
IIndexBuffer *IndexBuffer;
public: public:
//! constructor
CDynamicMeshBuffer(video::E_VERTEX_TYPE vertexType, video::E_INDEX_TYPE indexType) CDynamicMeshBuffer(video::E_VERTEX_TYPE vertexType, video::E_INDEX_TYPE indexType)
{ {
VertexBuffer=new CVertexBuffer(vertexType); VertexBuffer=new CVertexBuffer(vertexType);
IndexBuffer=new CIndexBuffer(indexType); IndexBuffer=new CIndexBuffer(indexType);
} }
//! destructor
~CDynamicMeshBuffer() ~CDynamicMeshBuffer()
{ {
if (VertexBuffer) VertexBuffer->drop(); if (VertexBuffer)
if (IndexBuffer) IndexBuffer->drop(); VertexBuffer->drop();
if (IndexBuffer)
IndexBuffer->drop();
} }
virtual IVertexBuffer &getVertexBuffer() const virtual IVertexBuffer &getVertexBuffer() const
{ {
return *VertexBuffer; return *VertexBuffer;
} }
virtual IIndexBuffer &getIndexBuffer() const virtual IIndexBuffer &getIndexBuffer() const
{ {
return *IndexBuffer; return *IndexBuffer;
...@@ -51,21 +46,24 @@ namespace scene ...@@ -51,21 +46,24 @@ namespace scene
virtual void setVertexBuffer(IVertexBuffer *newVertexBuffer) virtual void setVertexBuffer(IVertexBuffer *newVertexBuffer)
{ {
if (newVertexBuffer) newVertexBuffer->grab(); if (newVertexBuffer)
if (VertexBuffer) VertexBuffer->drop(); newVertexBuffer->grab();
if (VertexBuffer)
VertexBuffer->drop();
VertexBuffer=newVertexBuffer; VertexBuffer=newVertexBuffer;
} }
virtual void setIndexBuffer(IIndexBuffer *newIndexBuffer) virtual void setIndexBuffer(IIndexBuffer *newIndexBuffer)
{ {
if (newIndexBuffer) newIndexBuffer->grab(); if (newIndexBuffer)
if (IndexBuffer) IndexBuffer->drop(); newIndexBuffer->grab();
if (IndexBuffer)
IndexBuffer->drop();
IndexBuffer=newIndexBuffer; IndexBuffer=newIndexBuffer;
} }
//! Get Material of this buffer. //! Get Material of this buffer.
virtual const video::SMaterial& getMaterial() const virtual const video::SMaterial& getMaterial() const
{ {
...@@ -93,7 +91,6 @@ namespace scene ...@@ -93,7 +91,6 @@ namespace scene
//! Recalculate bounding box //! Recalculate bounding box
virtual void recalculateBoundingBox() virtual void recalculateBoundingBox()
{ {
if (!getVertexBuffer().size()) if (!getVertexBuffer().size())
BoundingBox.reset(0,0,0); BoundingBox.reset(0,0,0);
else else
...@@ -102,17 +99,16 @@ namespace scene ...@@ -102,17 +99,16 @@ namespace scene
for (u32 i=1; i<getVertexBuffer().size(); ++i) for (u32 i=1; i<getVertexBuffer().size(); ++i)
BoundingBox.addInternalPoint(getVertexBuffer()[i].Pos); BoundingBox.addInternalPoint(getVertexBuffer()[i].Pos);
} }
} }
video::SMaterial Material; video::SMaterial Material;
core::aabbox3d<f32> BoundingBox; core::aabbox3d<f32> BoundingBox;
private:
IVertexBuffer *VertexBuffer;
IIndexBuffer *IndexBuffer;
}; };
} // end namespace scene } // end namespace scene
} // end namespace irr } // end namespace irr
......
// Copyright (C) 2002-2008 Nikolaus Gebhardt // Copyright (C) 2008 Nikolaus Gebhardt
// This file is part of the "Irrlicht Engine". // This file is part of the "Irrlicht Engine".
// For conditions of distribution and use, see copyright notice in irrlicht.h // For conditions of distribution and use, see copyright notice in irrlicht.h
...@@ -7,15 +7,11 @@ ...@@ -7,15 +7,11 @@
#include "IIndexBuffer.h" #include "IIndexBuffer.h"
namespace irr namespace irr
{ {
namespace scene namespace scene
{ {
class CIndexBuffer : public IIndexBuffer class CIndexBuffer : public IIndexBuffer
{ {
...@@ -23,16 +19,16 @@ namespace scene ...@@ -23,16 +19,16 @@ namespace scene
{ {
public: public:
virtual u32 stride() const =0; virtual u32 stride() const =0;
virtual u32 size() const=0; virtual u32 size() const =0;
virtual void push_back (const u32 &element) =0; virtual void push_back(const u32 &element) =0;
virtual const u32 operator [](u32 index) const=0; virtual u32 operator [](u32 index) const =0;
virtual const u32 getLast() =0; virtual u32 getLast() =0;
virtual void setValue(u32 index, u32 value) =0; virtual void setValue(u32 index, u32 value) =0;
virtual void set_used(u32 usedNow) =0; virtual void set_used(u32 usedNow) =0;
virtual void reallocate(u32 new_size)=0; virtual void reallocate(u32 new_size) =0;
virtual u32 allocated_size() const=0; virtual u32 allocated_size() const =0;
virtual void* pointer() =0; virtual void* pointer() =0;
virtual video::E_INDEX_TYPE getType()=0; virtual video::E_INDEX_TYPE getType() =0;
}; };
template <class T> template <class T>
...@@ -43,29 +39,34 @@ namespace scene ...@@ -43,29 +39,34 @@ namespace scene
virtual u32 stride() const {return sizeof(T);} virtual u32 stride() const {return sizeof(T);}
virtual u32 size() const virtual u32 size() const {return Indices.size();}
{return Indices.size();}
virtual void push_back (const u32 &element) virtual void push_back(const u32 &element)
{Indices.push_back((T&)element);} {
Indices.push_back((T&)element);
}
virtual const u32 operator [](u32 index) const virtual u32 operator [](u32 index) const
{return (u32) (Indices[index]);} {
return (u32)(Indices[index]);
}
virtual const u32 getLast() virtual u32 getLast() {return (u32)Indices.getLast();}
{return (u32)Indices.getLast();}
virtual void setValue(u32 index, u32 value) virtual void setValue(u32 index, u32 value)
{ {
Indices[index]=(T)value; Indices[index]=(T)value;
} }
virtual void set_used(u32 usedNow) virtual void set_used(u32 usedNow)
{Indices.set_used(usedNow);} {
Indices.set_used(usedNow);
}
virtual void reallocate(u32 new_size) virtual void reallocate(u32 new_size)
{Indices.reallocate(new_size);} {
Indices.reallocate(new_size);
}
virtual u32 allocated_size() const virtual u32 allocated_size() const
{ {
...@@ -76,7 +77,8 @@ namespace scene ...@@ -76,7 +77,8 @@ namespace scene
virtual video::E_INDEX_TYPE getType() virtual video::E_INDEX_TYPE getType()
{ {
if (sizeof(T)==sizeof(u16)) return video::EIT_16BIT; if (sizeof(T)==sizeof(u16))
return video::EIT_16BIT;
return video::EIT_32BIT; return video::EIT_32BIT;
} }
}; };
...@@ -91,14 +93,12 @@ namespace scene ...@@ -91,14 +93,12 @@ namespace scene
~CIndexBuffer() ~CIndexBuffer()
{ {
if (Indices)
delete Indices; delete Indices;
} }
//virtual void setType(video::E_INDEX_TYPE IndexType); //virtual void setType(video::E_INDEX_TYPE IndexType);
virtual void setType(video::E_INDEX_TYPE IndexType) virtual void setType(video::E_INDEX_TYPE IndexType)
{ {
IIndexList *NewIndices=0; IIndexList *NewIndices=0;
switch (IndexType) switch (IndexType)
...@@ -128,9 +128,8 @@ namespace scene ...@@ -128,9 +128,8 @@ namespace scene
Indices=NewIndices; Indices=NewIndices;
} }
virtual void* getData() {return Indices->pointer();} virtual void* getData() {return Indices->pointer();}
virtual video::E_INDEX_TYPE getType(){return Indices->getType();} virtual video::E_INDEX_TYPE getType(){return Indices->getType();}
virtual u32 stride() const {return Indices->stride();} virtual u32 stride() const {return Indices->stride();}
...@@ -140,7 +139,7 @@ namespace scene ...@@ -140,7 +139,7 @@ namespace scene
return Indices->size(); return Indices->size();
} }
virtual void push_back (const u32 &element) virtual void push_back(const u32 &element)
{ {
Indices->push_back(element); Indices->push_back(element);
} }
...@@ -160,7 +159,6 @@ namespace scene ...@@ -160,7 +159,6 @@ namespace scene
Indices->setValue(index, value); Indices->setValue(index, value);
} }
virtual void set_used(u32 usedNow) virtual void set_used(u32 usedNow)
{ {
Indices->set_used(usedNow); Indices->set_used(usedNow);
...@@ -208,11 +206,6 @@ namespace scene ...@@ -208,11 +206,6 @@ namespace scene
}; };
} // end namespace scene } // end namespace scene
} // end namespace irr } // end namespace irr
......
// Copyright (C) 2002-2008 Nikolaus Gebhardt // Copyright (C) 2008 Nikolaus Gebhardt
// This file is part of the "Irrlicht Engine". // This file is part of the "Irrlicht Engine".
// For conditions of distribution and use, see copyright notice in irrlicht.h // For conditions of distribution and use, see copyright notice in irrlicht.h
...@@ -7,32 +7,29 @@ ...@@ -7,32 +7,29 @@
#include "IVertexBuffer.h" #include "IVertexBuffer.h"
namespace irr namespace irr
{ {
namespace scene namespace scene
{ {
class CVertexBuffer : public IVertexBuffer class CVertexBuffer : public IVertexBuffer
{ {
class IVertexList class IVertexList
{ {
public: public:
virtual u32 stride() const =0; virtual u32 stride() const =0;
virtual u32 size() const=0; virtual u32 size() const =0;
virtual void push_back (const video::S3DVertex &element) =0; virtual void push_back (const video::S3DVertex &element) =0;
virtual video::S3DVertex& operator [](const u32 index) const=0; virtual video::S3DVertex& operator [](const u32 index) const =0;
virtual video::S3DVertex& getLast() =0; virtual video::S3DVertex& getLast() =0;
virtual void set_used(u32 usedNow) =0; virtual void set_used(u32 usedNow) =0;
virtual void reallocate(u32 new_size)=0; virtual void reallocate(u32 new_size) =0;
virtual u32 allocated_size() const =0; virtual u32 allocated_size() const =0;
virtual video::S3DVertex* pointer() =0; virtual video::S3DVertex* pointer() =0;
virtual video::E_VERTEX_TYPE getType()=0; virtual video::E_VERTEX_TYPE getType() =0;
}; };
template <class T> template <class T>
...@@ -43,8 +40,7 @@ namespace scene ...@@ -43,8 +40,7 @@ namespace scene
virtual u32 stride() const {return sizeof(T);} virtual u32 stride() const {return sizeof(T);}
virtual u32 size() const virtual u32 size() const {return Vertices.size();}
{return Vertices.size();}
virtual void push_back (const video::S3DVertex &element) virtual void push_back (const video::S3DVertex &element)
{Vertices.push_back((T&)element);} {Vertices.push_back((T&)element);}
...@@ -81,16 +77,13 @@ namespace scene ...@@ -81,16 +77,13 @@ namespace scene
~CVertexBuffer() ~CVertexBuffer()
{ {
if (Vertices)
delete Vertices; delete Vertices;
} }
//virtual void setType(video::E_VERTEX_TYPE vertexType); //virtual void setType(video::E_VERTEX_TYPE vertexType);
virtual void setType(video::E_VERTEX_TYPE vertexType) virtual void setType(video::E_VERTEX_TYPE vertexType)
{ {
IVertexList *NewVertices=0; IVertexList *NewVertices=0;
switch (vertexType) switch (vertexType)
...@@ -122,12 +115,10 @@ namespace scene ...@@ -122,12 +115,10 @@ namespace scene
} }
Vertices=NewVertices; Vertices=NewVertices;
} }
virtual void* getData() {return Vertices->pointer();} virtual void* getData() {return Vertices->pointer();}
virtual video::E_VERTEX_TYPE getType(){return Vertices->getType();} virtual video::E_VERTEX_TYPE getType(){return Vertices->getType();}
virtual u32 stride() const {return Vertices->stride();} virtual u32 stride() const {return Vertices->stride();}
...@@ -196,11 +187,9 @@ namespace scene ...@@ -196,11 +187,9 @@ namespace scene
E_HARDWARE_MAPPING MappingHint; E_HARDWARE_MAPPING MappingHint;
u32 ChangedID; u32 ChangedID;
}; };
} // end namespace scene } // end namespace scene
} // end namespace irr } // end namespace irr
......
// Copyright (C) 2002-2008 Nikolaus Gebhardt // Copyright (C) 2008 Nikolaus Gebhardt
// This file is part of the "Irrlicht Engine". // This file is part of the "Irrlicht Engine".
// For conditions of distribution and use, see copyright notice in irrlicht.h // For conditions of distribution and use, see copyright notice in irrlicht.h
...@@ -6,8 +6,6 @@ ...@@ -6,8 +6,6 @@
#define __I_DYNAMIC_MESH_BUFFER_H_INCLUDED__ #define __I_DYNAMIC_MESH_BUFFER_H_INCLUDED__
#include "IMeshBuffer.h" #include "IMeshBuffer.h"
#include "IVertexBuffer.h" #include "IVertexBuffer.h"
#include "IIndexBuffer.h" #include "IIndexBuffer.h"
...@@ -20,37 +18,31 @@ namespace scene ...@@ -20,37 +18,31 @@ namespace scene
class IDynamicMeshBuffer : public IMeshBuffer class IDynamicMeshBuffer : public IMeshBuffer
{ {
public: public:
virtual IVertexBuffer &getVertexBuffer() const =0; virtual IVertexBuffer &getVertexBuffer() const =0;
virtual IIndexBuffer &getIndexBuffer() const =0; virtual IIndexBuffer &getIndexBuffer() const =0;
virtual void setVertexBuffer(IVertexBuffer *vertexBuffer) =0; virtual void setVertexBuffer(IVertexBuffer *vertexBuffer) =0;
virtual void setIndexBuffer(IIndexBuffer *indexBuffer) =0; virtual void setIndexBuffer(IIndexBuffer *indexBuffer) =0;
//! Get the material of this meshbuffer //! Get the material of this meshbuffer
/** \return Material of this buffer. */ /** \return Material of this buffer. */
virtual video::SMaterial& getMaterial() = 0; virtual video::SMaterial& getMaterial() =0;
//! Get the material of this meshbuffer //! Get the material of this meshbuffer
/** \return Material of this buffer. */ /** \return Material of this buffer. */
virtual const video::SMaterial& getMaterial() const = 0; virtual const video::SMaterial& getMaterial() const =0;
//! Get the axis aligned bounding box of this meshbuffer. //! Get the axis aligned bounding box of this meshbuffer.
/** \return Axis aligned bounding box of this buffer. */ /** \return Axis aligned bounding box of this buffer. */
virtual const core::aabbox3df& getBoundingBox() const = 0; virtual const core::aabbox3df& getBoundingBox() const =0;
//! Set axis aligned bounding box //! Set axis aligned bounding box
/** \param box User defined axis aligned bounding box to use /** \param box User defined axis aligned bounding box to use
for this buffer. */ for this buffer. */
virtual void setBoundingBox(const core::aabbox3df& box) = 0; virtual void setBoundingBox(const core::aabbox3df& box) =0;
//! Recalculates the bounding box. Should be called if the mesh changed. //! Recalculates the bounding box. Should be called if the mesh changed.
virtual void recalculateBoundingBox() = 0; virtual void recalculateBoundingBox() =0;
//! Append the vertices and indices to the current buffer //! Append the vertices and indices to the current buffer
/** Only works for compatible vertex types. /** Only works for compatible vertex types.
...@@ -71,10 +63,8 @@ namespace scene ...@@ -71,10 +63,8 @@ namespace scene
} }
// ------------------- To be removed? ------------------- // // ------------------- To be removed? ------------------- //
//! get the current hardware mapping hint //! get the current hardware mapping hint
virtual const E_HARDWARE_MAPPING getHardwareMappingHint_Vertex() const virtual const E_HARDWARE_MAPPING getHardwareMappingHint_Vertex() const
{ {
...@@ -115,8 +105,6 @@ namespace scene ...@@ -115,8 +105,6 @@ namespace scene
return getIndexBuffer().getChangedID(); return getIndexBuffer().getChangedID();
} }
// ------------------- Old interface ------------------- // // ------------------- Old interface ------------------- //
//! Get type of vertex data which is stored in this meshbuffer. //! Get type of vertex data which is stored in this meshbuffer.
...@@ -188,11 +176,13 @@ namespace scene ...@@ -188,11 +176,13 @@ namespace scene
{ {
return getVertexBuffer()[i].Pos; return getVertexBuffer()[i].Pos;
} }
//! returns normal of vertex i //! returns normal of vertex i
virtual const core::vector3df& getNormal(u32 i) const virtual const core::vector3df& getNormal(u32 i) const
{ {
return getVertexBuffer()[i].Normal; return getVertexBuffer()[i].Normal;
} }
//! returns normal of vertex i //! returns normal of vertex i
virtual core::vector3df& getNormal(u32 i) virtual core::vector3df& getNormal(u32 i)
{ {
...@@ -201,7 +191,6 @@ namespace scene ...@@ -201,7 +191,6 @@ namespace scene
}; };
} // end namespace scene } // end namespace scene
} // end namespace irr } // end namespace irr
......
// Copyright (C) 2002-2008 Nikolaus Gebhardt // Copyright (C) 2008 Nikolaus Gebhardt
// This file is part of the "Irrlicht Engine". // This file is part of the "Irrlicht Engine".
// For conditions of distribution and use, see copyright notice in irrlicht.h // For conditions of distribution and use, see copyright notice in irrlicht.h
...@@ -25,35 +25,29 @@ namespace scene ...@@ -25,35 +25,29 @@ namespace scene
{ {
public: public:
virtual void* getData()=0; virtual void* getData() =0;
virtual video::E_INDEX_TYPE getType() =0; virtual video::E_INDEX_TYPE getType() =0;
virtual void setType(video::E_INDEX_TYPE IndexType) =0; virtual void setType(video::E_INDEX_TYPE IndexType) =0;
virtual u32 stride() const =0; virtual u32 stride() const =0;
virtual u32 size() const =0;
virtual u32 size() const=0;
virtual void push_back (const u32 &element) =0; virtual void push_back (const u32 &element) =0;
virtual const u32 operator [](u32 index) const=0; virtual const u32 operator [](u32 index) const =0;
virtual const u32 getLast() =0; virtual const u32 getLast() =0;
virtual void setValue(u32 index, u32 value) =0; virtual void setValue(u32 index, u32 value) =0;
virtual void set_used(u32 usedNow) =0; virtual void set_used(u32 usedNow) =0;
virtual void reallocate(u32 new_size)=0; virtual void reallocate(u32 new_size) =0;
virtual u32 allocated_size() const=0; virtual u32 allocated_size() const=0;
virtual void* pointer() =0; virtual void* pointer() =0;
//! get the current hardware mapping hint //! get the current hardware mapping hint
virtual const E_HARDWARE_MAPPING getHardwareMappingHint() const = 0; virtual const E_HARDWARE_MAPPING getHardwareMappingHint() const =0;
//! set the hardware mapping hint, for driver //! set the hardware mapping hint, for driver
virtual void setHardwareMappingHint( E_HARDWARE_MAPPING NewMappingHint ) = 0; virtual void setHardwareMappingHint( E_HARDWARE_MAPPING NewMappingHint ) =0;
//! flags the meshbuffer as changed, reloads hardware buffers //! flags the meshbuffer as changed, reloads hardware buffers
virtual void setDirty() = 0; virtual void setDirty() = 0;
...@@ -64,7 +58,6 @@ namespace scene ...@@ -64,7 +58,6 @@ namespace scene
}; };
} // end namespace scene } // end namespace scene
} // end namespace irr } // end namespace irr
......
// Copyright (C) 2002-2008 Nikolaus Gebhardt // Copyright (C) 2008 Nikolaus Gebhardt
// This file is part of the "Irrlicht Engine". // This file is part of the "Irrlicht Engine".
// For conditions of distribution and use, see copyright notice in irrlicht.h // For conditions of distribution and use, see copyright notice in irrlicht.h
...@@ -9,9 +9,6 @@ ...@@ -9,9 +9,6 @@
#include "irrArray.h" #include "irrArray.h"
#include "S3DVertex.h" #include "S3DVertex.h"
namespace irr namespace irr
{ {
namespace scene namespace scene
...@@ -20,37 +17,34 @@ namespace scene ...@@ -20,37 +17,34 @@ namespace scene
class IVertexBuffer : public virtual IReferenceCounted class IVertexBuffer : public virtual IReferenceCounted
{ {
public: public:
virtual void* getData() =0;
virtual void* getData()=0;
virtual video::E_VERTEX_TYPE getType() =0; virtual video::E_VERTEX_TYPE getType() =0;
virtual void setType(video::E_VERTEX_TYPE vertexType)=0; virtual void setType(video::E_VERTEX_TYPE vertexType) =0;
virtual u32 stride() const =0; virtual u32 stride() const =0;
virtual u32 size() const=0; virtual u32 size() const =0;
virtual void push_back (const video::S3DVertex &element) =0; virtual void push_back(const video::S3DVertex &element) =0;
virtual video::S3DVertex& operator [](const u32 index) const=0; virtual video::S3DVertex& operator [](const u32 index) const =0;
virtual video::S3DVertex& getLast() =0; virtual video::S3DVertex& getLast() =0;
virtual void set_used(u32 usedNow) =0; virtual void set_used(u32 usedNow) =0;
virtual void reallocate(u32 new_size)=0; virtual void reallocate(u32 new_size) =0;
virtual u32 allocated_size() const=0; virtual u32 allocated_size() const =0;
virtual video::S3DVertex* pointer() =0; virtual video::S3DVertex* pointer() =0;
//! get the current hardware mapping hint //! get the current hardware mapping hint
virtual const E_HARDWARE_MAPPING getHardwareMappingHint() const = 0; virtual const E_HARDWARE_MAPPING getHardwareMappingHint() const =0;
//! set the hardware mapping hint, for driver //! set the hardware mapping hint, for driver
virtual void setHardwareMappingHint( E_HARDWARE_MAPPING NewMappingHint ) = 0; virtual void setHardwareMappingHint( E_HARDWARE_MAPPING NewMappingHint ) =0;
//! flags the meshbuffer as changed, reloads hardware buffers //! flags the meshbuffer as changed, reloads hardware buffers
virtual void setDirty() = 0; virtual void setDirty() =0;
//! Get the currently used ID for identification of changes. //! Get the currently used ID for identification of changes.
/** This shouldn't be used for anything outside the VideoDriver. */ /** This shouldn't be used for anything outside the VideoDriver. */
virtual const u32 getChangedID() const = 0; virtual const u32 getChangedID() const = 0;
}; };
} // end namespace scene } // end namespace scene
} // end namespace irr } // end namespace irr
......
// Copyright (C) 2002-2008 Nikolaus Gebhardt // Copyright (C) 2008 Nikolaus Gebhardt
// This file is part of the "Irrlicht Engine". // This file is part of the "Irrlicht Engine".
// For conditions of distribution and use, see copyright notice in irrlicht.h // For conditions of distribution and use, see copyright notice in irrlicht.h
...@@ -19,7 +19,6 @@ enum E_INDEX_TYPE ...@@ -19,7 +19,6 @@ enum E_INDEX_TYPE
}; };
/* /*
//! vertex index used by the Irrlicht engine. //! vertex index used by the Irrlicht engine.
template <class T> template <class T>
...@@ -27,14 +26,12 @@ struct SSpecificVertexIndex ...@@ -27,14 +26,12 @@ struct SSpecificVertexIndex
{ {
T Index; T Index;
//! default constructor //! default constructor
SSpecificVertexIndex() {} SSpecificVertexIndex() {}
//! constructor //! constructor
SSpecificVertexIndex(u32 _index) :Index(_index) {} SSpecificVertexIndex(u32 _index) :Index(_index) {}
bool operator==(const SSpecificVertexIndex& other) const bool operator==(const SSpecificVertexIndex& other) const
{ {
return (Index == other.Index); return (Index == other.Index);
...@@ -50,8 +47,6 @@ struct SSpecificVertexIndex ...@@ -50,8 +47,6 @@ struct SSpecificVertexIndex
return (Index < other.Index); return (Index < other.Index);
} }
SSpecificVertexIndex operator+(const u32& other) const SSpecificVertexIndex operator+(const u32& other) const
{ {
return SSpecificVertexIndex(Index + other); return SSpecificVertexIndex(Index + other);
...@@ -64,7 +59,8 @@ struct SSpecificVertexIndex ...@@ -64,7 +59,8 @@ struct SSpecificVertexIndex
E_INDEX_TYPE getType() const E_INDEX_TYPE getType() const
{ {
if (sizeof(T)==sizeof(u16)) return video::EIT_16BIT; if (sizeof(T)==sizeof(u16))
return video::EIT_16BIT;
return video::EIT_32BIT; return video::EIT_32BIT;
} }
...@@ -72,7 +68,6 @@ struct SSpecificVertexIndex ...@@ -72,7 +68,6 @@ struct SSpecificVertexIndex
//typedef SSpecificVertexIndex<u16> SVertexIndex; //typedef SSpecificVertexIndex<u16> SVertexIndex;
typedef u32 SVertexIndex; typedef u32 SVertexIndex;
*/ */
......
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