forked from hitmen047/Source-PlusPlus
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmstristrip.h
43 lines (39 loc) · 1.56 KB
/
mstristrip.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
//========= 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
);