SVertexIndex.h 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. // Copyright (C) 2008-2012 Nikolaus Gebhardt
  2. // This file is part of the "Irrlicht Engine".
  3. // For conditions of distribution and use, see copyright notice in irrlicht.h
  4. #ifndef S_VERTEX_INDEX_H_INCLUDED
  5. #define S_VERTEX_INDEX_H_INCLUDED
  6. #include "irrTypes.h"
  7. namespace irr
  8. {
  9. namespace video
  10. {
  11. enum E_INDEX_TYPE
  12. {
  13. EIT_16BIT = 0,
  14. EIT_32BIT
  15. };
  16. /*
  17. //! vertex index used by the Irrlicht engine.
  18. template <class T>
  19. struct SSpecificVertexIndex
  20. {
  21. T Index;
  22. //! default constructor
  23. SSpecificVertexIndex() {}
  24. //! constructor
  25. SSpecificVertexIndex(u32 _index) :Index(_index) {}
  26. bool operator==(const SSpecificVertexIndex& other) const
  27. {
  28. return (Index == other.Index);
  29. }
  30. bool operator!=(const SSpecificVertexIndex& other) const
  31. {
  32. return (Index != other.Index);
  33. }
  34. bool operator<(const SSpecificVertexIndex& other) const
  35. {
  36. return (Index < other.Index);
  37. }
  38. SSpecificVertexIndex operator+(const u32& other) const
  39. {
  40. return SSpecificVertexIndex(Index + other);
  41. }
  42. operator const u32() const
  43. {
  44. return (const u32)Index;
  45. }
  46. E_INDEX_TYPE getType() const
  47. {
  48. if (sizeof(T)==sizeof(u16))
  49. return video::EIT_16BIT;
  50. return video::EIT_32BIT;
  51. }
  52. };
  53. //typedef SSpecificVertexIndex<u16> SVertexIndex;
  54. typedef u32 SVertexIndex;
  55. */
  56. } // end namespace video
  57. } // end namespace irr
  58. #endif