00001 // Copyright (C) 2008-2012 Nikolaus Gebhardt 00002 // This file is part of the "Irrlicht Engine". 00003 // For conditions of distribution and use, see copyright notice in irrlicht.h 00004 00005 #ifndef __S_VERTEX_INDEX_H_INCLUDED__ 00006 #define __S_VERTEX_INDEX_H_INCLUDED__ 00007 00008 #include "irrTypes.h" 00009 00010 00011 namespace irr 00012 { 00013 namespace video 00014 { 00015 enum E_INDEX_TYPE 00016 { 00017 EIT_16BIT = 0, 00018 EIT_32BIT 00019 }; 00020 00021 00022 /* 00024 template <class T> 00025 struct SSpecificVertexIndex 00026 { 00027 T Index; 00028 00030 SSpecificVertexIndex() {} 00031 00033 SSpecificVertexIndex(u32 _index) :Index(_index) {} 00034 00035 bool operator==(const SSpecificVertexIndex& other) const 00036 { 00037 return (Index == other.Index); 00038 } 00039 00040 bool operator!=(const SSpecificVertexIndex& other) const 00041 { 00042 return (Index != other.Index); 00043 } 00044 00045 bool operator<(const SSpecificVertexIndex& other) const 00046 { 00047 return (Index < other.Index); 00048 } 00049 00050 SSpecificVertexIndex operator+(const u32& other) const 00051 { 00052 return SSpecificVertexIndex(Index + other); 00053 } 00054 00055 operator const u32() const 00056 { 00057 return (const u32)Index; 00058 } 00059 00060 E_INDEX_TYPE getType() const 00061 { 00062 if (sizeof(T)==sizeof(u16)) 00063 return video::EIT_16BIT; 00064 return video::EIT_32BIT; 00065 } 00066 00067 }; 00068 00069 //typedef SSpecificVertexIndex<u16> SVertexIndex; 00070 00071 typedef u32 SVertexIndex; 00072 */ 00073 00074 00075 } // end namespace video 00076 } // end namespace irr 00077 00078 #endif 00079