Home | History | Annotate | Download | only in Tools
      1 /*!****************************************************************************
      2 
      3  @file         PVRTGeometry.h
      4  @copyright    Copyright (c) Imagination Technologies Limited.
      5  @brief        Code to affect triangle mesh geometry.
      6 
      7 ******************************************************************************/
      8 #ifndef _PVRTGEOMETRY_H_
      9 #define _PVRTGEOMETRY_H_
     10 
     11 
     12 /****************************************************************************
     13 ** Defines
     14 ****************************************************************************/
     15 #define PVRTGEOMETRY_IDX	unsigned int
     16 
     17 #define PVRTGEOMETRY_SORT_VERTEXCACHE (0x01	/* Sort triangles for optimal vertex cache usage */)
     18 #define PVRTGEOMETRY_SORT_IGNOREVERTS (0x02	/* Do not sort vertices for optimal memory cache usage */)
     19 
     20 /****************************************************************************
     21 ** Functions
     22 ****************************************************************************/
     23 
     24 /*!***************************************************************************
     25  @brief      	    Triangle sorter
     26  @param[in,out]		pVtxData		Pointer to array of vertices
     27  @param[in,out]		pwIdx			Pointer to array of indices
     28  @param[in]			nStride			Size of a vertex (in bytes)
     29  @param[in]			nVertNum		Number of vertices. Length of pVtxData array
     30  @param[in]			nTriNum			Number of triangles. Length of pwIdx array is 3* this
     31  @param[in]			nBufferVtxLimit	Number of vertices that can be stored in a buffer
     32  @param[in]			nBufferTriLimit	Number of triangles that can be stored in a buffer
     33  @param[in]			dwFlags			PVRTGEOMETRY_SORT_* flags
     34 *****************************************************************************/
     35 void PVRTGeometrySort(
     36 	void				* const pVtxData,
     37 	PVRTGEOMETRY_IDX	* const pwIdx,
     38 	const int			nStride,
     39 	const int			nVertNum,
     40 	const int			nTriNum,
     41 	const int			nBufferVtxLimit,
     42 	const int			nBufferTriLimit,
     43 	const unsigned int	dwFlags);
     44 
     45 
     46 #endif /* _PVRTGEOMETRY_H_ */
     47 
     48 /*****************************************************************************
     49  End of file (PVRTGeometry.h)
     50 *****************************************************************************/
     51 
     52