aboutsummaryrefslogtreecommitdiff
path: root/mp/src/utils/common/mstristrip.h
diff options
context:
space:
mode:
authorJoe Ludwig <[email protected]>2013-06-26 15:22:04 -0700
committerJoe Ludwig <[email protected]>2013-06-26 15:22:04 -0700
commit39ed87570bdb2f86969d4be821c94b722dc71179 (patch)
treeabc53757f75f40c80278e87650ea92808274aa59 /mp/src/utils/common/mstristrip.h
downloadsource-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.h43
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
+);
+