2
0

CmIndexData.h 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. #pragma once
  2. #include "CmPrerequisites.h"
  3. #include "CmIndexBuffer.h"
  4. namespace CamelotFramework
  5. {
  6. /** Summary class collecting together index data source information. */
  7. class CM_EXPORT IndexData
  8. {
  9. public:
  10. IndexData();
  11. ~IndexData();
  12. /// pointer to the HardwareIndexBuffer to use, must be specified if useIndexes = true
  13. IndexBufferPtr indexBuffer;
  14. /// index in the buffer to start from for this operation
  15. UINT32 indexStart;
  16. /// The number of indexes to use from the buffer
  17. UINT32 indexCount;
  18. /** Re-order the indexes in this index data structure to be more
  19. vertex cache friendly; that is to re-use the same vertices as close
  20. together as possible.
  21. @remarks
  22. Can only be used for index data which consists of triangle lists.
  23. It would in fact be pointless to use it on triangle strips or fans
  24. in any case.
  25. */
  26. void optimiseVertexCacheTriList(void);
  27. protected:
  28. /// Protected copy constructor, to prevent misuse
  29. IndexData(const IndexData& rhs); /* do nothing, should not use */
  30. /// Protected operator=, to prevent misuse
  31. IndexData& operator=(const IndexData& rhs); /* do not use */
  32. };
  33. }