SVertexIndex.h 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  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