1 // Copyright (C) 2008-2012 Nikolaus Gebhardt
\r
2 // This file is part of the "Irrlicht Engine".
\r
3 // For conditions of distribution and use, see copyright notice in irrlicht.h
\r
5 #ifndef __S_VERTEX_INDEX_H_INCLUDED__
\r
6 #define __S_VERTEX_INDEX_H_INCLUDED__
\r
8 #include "irrTypes.h"
\r
23 //! vertex index used by the Irrlicht engine.
\r
25 struct SSpecificVertexIndex
\r
29 //! default constructor
\r
30 SSpecificVertexIndex() {}
\r
33 SSpecificVertexIndex(u32 _index) :Index(_index) {}
\r
35 bool operator==(const SSpecificVertexIndex& other) const
\r
37 return (Index == other.Index);
\r
40 bool operator!=(const SSpecificVertexIndex& other) const
\r
42 return (Index != other.Index);
\r
45 bool operator<(const SSpecificVertexIndex& other) const
\r
47 return (Index < other.Index);
\r
50 SSpecificVertexIndex operator+(const u32& other) const
\r
52 return SSpecificVertexIndex(Index + other);
\r
55 operator const u32() const
\r
57 return (const u32)Index;
\r
60 E_INDEX_TYPE getType() const
\r
62 if (sizeof(T)==sizeof(u16))
\r
63 return video::EIT_16BIT;
\r
64 return video::EIT_32BIT;
\r
69 //typedef SSpecificVertexIndex<u16> SVertexIndex;
\r
71 typedef u32 SVertexIndex;
\r
75 } // end namespace video
\r
76 } // end namespace irr
\r