PVRTGeometry.h 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. /******************************************************************************
  2. @File PVRTGeometry.h
  3. @Title PVRTGeometry
  4. @Version
  5. @Copyright Copyright (C) Imagination Technologies Limited.
  6. @Platform Independant
  7. @Description Code to affect triangle mesh geometry.
  8. ******************************************************************************/
  9. #ifndef _PVRTGEOMETRY_H_
  10. #define _PVRTGEOMETRY_H_
  11. /****************************************************************************
  12. ** Defines
  13. ****************************************************************************/
  14. #define PVRTGEOMETRY_IDX unsigned int
  15. #define PVRTGEOMETRY_SORT_VERTEXCACHE (0x01 /* Sort triangles for optimal vertex cache usage */)
  16. #define PVRTGEOMETRY_SORT_IGNOREVERTS (0x02 /* Do not sort vertices for optimal memory cache usage */)
  17. /****************************************************************************
  18. ** Functions
  19. ****************************************************************************/
  20. /*!***************************************************************************
  21. @Function PVRTGeometrySort
  22. @Modified pVtxData Pointer to array of vertices
  23. @Modified pwIdx Pointer to array of indices
  24. @Input nStride Size of a vertex (in bytes)
  25. @Input nVertNum Number of vertices. Length of pVtxData array
  26. @Input nTriNum Number of triangles. Length of pwIdx array is 3* this
  27. @Input nBufferVtxLimit Number of vertices that can be stored in a buffer
  28. @Input nBufferTriLimit Number of triangles that can be stored in a buffer
  29. @Input dwFlags PVRTGEOMETRY_SORT_* flags
  30. @Description Triangle sorter
  31. *****************************************************************************/
  32. void PVRTGeometrySort(
  33. void * const pVtxData,
  34. PVRTGEOMETRY_IDX * const pwIdx,
  35. const int nStride,
  36. const int nVertNum,
  37. const int nTriNum,
  38. const int nBufferVtxLimit,
  39. const int nBufferTriLimit,
  40. const unsigned int dwFlags);
  41. #endif /* _PVRTGEOMETRY_H_ */
  42. /*****************************************************************************
  43. End of file (PVRTGeometry.h)
  44. *****************************************************************************/