diff options
| author | Joe Ludwig <[email protected]> | 2013-06-26 15:22:04 -0700 |
|---|---|---|
| committer | Joe Ludwig <[email protected]> | 2013-06-26 15:22:04 -0700 |
| commit | 39ed87570bdb2f86969d4be821c94b722dc71179 (patch) | |
| tree | abc53757f75f40c80278e87650ea92808274aa59 /mp/src/utils/common/mstristrip.h | |
| download | source-sdk-2013-39ed87570bdb2f86969d4be821c94b722dc71179.tar.xz source-sdk-2013-39ed87570bdb2f86969d4be821c94b722dc71179.zip | |
First version of the SOurce SDK 2013
Diffstat (limited to 'mp/src/utils/common/mstristrip.h')
| -rw-r--r-- | mp/src/utils/common/mstristrip.h | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/mp/src/utils/common/mstristrip.h b/mp/src/utils/common/mstristrip.h new file mode 100644 index 00000000..626a0062 --- /dev/null +++ b/mp/src/utils/common/mstristrip.h @@ -0,0 +1,43 @@ +//========= Copyright Valve Corporation, All rights reserved. ============//
+//
+// Purpose:
+//
+// $NoKeywords: $
+//
+//=============================================================================//
+//-----------------------------------------------------------------------------
+// FILE: TRISTRIP.H
+//
+// Desc: tristrip header file
+//
+// Copyright (c) 1999-2000 Microsoft Corporation. All rights reserved.
+//-----------------------------------------------------------------------------
+
+typedef unsigned short WORD;
+
+//
+// Main Stripify routine. Returns number of strip indices contained
+// in ppstripindices. Caller must delete [] ppstripindices.
+//
+int Stripify(
+ int numtris, // Number of triangles
+ WORD *ptriangles, // triangle indices pointer
+ int *pnumindices, // number of indices in ppstripindices (out)
+ WORD **ppstripindices // triangle strip indices
+);
+
+//
+// Re-arrange vertices so that they occur in the order that they are first
+// used. This function doesn't actually move vertex data around, it returns
+// an array that specifies where in the new vertex array each old vertex
+// should go. It also re-maps the strip indices to use the new vertex
+// locations. Caller must delete [] pVertexPermutation.
+//
+void ComputeVertexPermutation
+(
+ int numstripindices, // Number of strip indices
+ WORD *pstripindices, // Strip indices
+ int *pnumverts, // Number of verts (in and out)
+ WORD **ppvertexpermutation // Map from orignal index to remapped index
+);
+
|