reshuffling of dlls
[reactos.git] / reactos / dll / win32 / glu32 / libnurbs / nurbtess / sampleMonoPoly.h
1 /*
2 ** License Applicability. Except to the extent portions of this file are
3 ** made subject to an alternative license as permitted in the SGI Free
4 ** Software License B, Version 1.1 (the "License"), the contents of this
5 ** file are subject only to the provisions of the License. You may not use
6 ** this file except in compliance with the License. You may obtain a copy
7 ** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600
8 ** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at:
9 **
10 ** http://oss.sgi.com/projects/FreeB
11 **
12 ** Note that, as provided in the License, the Software is distributed on an
13 ** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS
14 ** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND
15 ** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A
16 ** PARTICULAR PURPOSE, AND NON-INFRINGEMENT.
17 **
18 ** Original Code. The Original Code is: OpenGL Sample Implementation,
19 ** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics,
20 ** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc.
21 ** Copyright in any portions created by third parties is as indicated
22 ** elsewhere herein. All Rights Reserved.
23 **
24 ** Additional Notice Provisions: The application programming interfaces
25 ** established by SGI in conjunction with the Original Code are The
26 ** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released
27 ** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version
28 ** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X
29 ** Window System(R) (Version 1.3), released October 19, 1998. This software
30 ** was created using the OpenGL(R) version 1.2.1 Sample Implementation
31 ** published by SGI, but has not been independently verified as being
32 ** compliant with the OpenGL(R) version 1.2.1 Specification.
33 **
34 ** $Date$ $Revision: 1.1 $
35 */
36 /*
37 ** $Header: /cygdrive/c/RCVS/CVS/ReactOS/reactos/lib/glu32/libnurbs/nurbtess/sampleMonoPoly.h,v 1.1 2004/02/02 16:39:15 navaraf Exp $
38 */
39
40 #ifndef _SAMPLEMONOPOLY_H
41 #define _SAMPLEMONOPOLY_H
42
43 #include "monoTriangulation.h"
44 #include "gridWrap.h"
45 #include "rectBlock.h"
46
47
48 void triangulateXYMono(Int n_upper, Real upperVerts[][2],
49 Int n_lower, Real lowerVerts[][2],
50 primStream* pStream);
51
52 void stripOfFanLeft(vertexArray* leftChain,
53 Int largeIndex,
54 Int smallIndex,
55 gridWrap* grid,
56 Int vlineIndex,
57 Int ulineSmallIndex,
58 Int ulineLargeIndex,
59 primStream* pStream,
60 Int gridLineUp
61 );
62 void sampleLeftOneGridStep(vertexArray* leftChain,
63 Int beginLeftIndex,
64 Int endLeftIndex,
65 gridBoundaryChain* leftGridChain,
66 Int leftGridChainStartIndex,
67 primStream* pStream
68 );
69
70 void sampleLeftSingleTrimEdgeRegion(Real upperVert[2], Real lowerVert[2],
71 gridBoundaryChain* gridChain,
72 Int beginIndex,
73 Int endIndex,
74 primStream* pStream);
75
76 void sampleLeftStripRec(vertexArray* leftChain,
77 Int topLeftIndex,
78 Int botLeftIndex,
79 gridBoundaryChain* leftGridChain,
80 Int leftGridChainStartIndex,
81 Int leftGridChainEndIndex,
82 primStream* pStream
83 );
84
85 void sampleLeftStrip(vertexArray* leftChain,
86 Int topLeftIndex,
87 Int botLeftIndex,
88 gridBoundaryChain* leftGridChain,
89 Int leftGridChainStartIndex,
90 Int leftGridChainEndIndex,
91 primStream* pStream
92 );
93
94 void findLeftGridIndices(directedLine* topEdge, Int firstGridIndex, Int lastGridIndex, gridWrap* grid, Int* ret_indices, Int* ret_inner);
95
96 void findRightGridIndices(directedLine* topEdge, Int firstGridIndex, Int lastGridIndex, gridWrap* grid, Int* ret_indices, Int* ret_inner);
97
98 void sampleMonoPoly(directedLine* polygon, gridWrap* grid, Int ulinear, Int vlinear, primStream *pStream, rectBlockArray* rbArray);
99
100 void sampleMonoPolyRec(
101 Real* topVertex,
102 Real* botVertex,
103 vertexArray* leftChain,
104 Int leftStartIndex,
105 vertexArray* rightChain,
106 Int rightStartIndex,
107 gridBoundaryChain* leftGridChain,
108 gridBoundaryChain* rightGridChain,
109 Int gridStartIndex,
110 primStream* pStream,
111 rectBlockArray* rbArray
112 );
113
114 void sampleLeftStripRecF(vertexArray* leftChain,
115 Int topLeftIndex,
116 Int botLeftIndex,
117 gridBoundaryChain* leftGridChain,
118 Int leftGridChainStartIndex,
119 Int leftGridChainEndIndex,
120 primStream* pStream
121 );
122
123 void findUpCorners(Real *topVertex,
124 vertexArray *leftChain,
125 Int leftChainStartIndex, Int leftChainEndIndex,
126 vertexArray *rightChain,
127 Int rightChainStartIndex, Int rightChainEndIndex,
128 Real v,
129 Real uleft,
130 Real uright,
131 Int& ret_leftCornerWhere,
132 Int& ret_leftCornerIndex,
133 Int& ret_rightCornerWhere,
134 Int& ret_rightCornerIndex
135 );
136 void findDownCorners(Real *botVertex,
137 vertexArray *leftChain, Int leftChainStartIndex, Int leftChainEndIndex,
138 vertexArray *rightChain, Int rightChainStartIndex, Int rightChainEndIndex,
139 Real v,
140 Real uleft,
141 Real uright,
142 Int& ret_leftCornerWhere,
143 Int& ret_leftCornerIndex,
144 Int& ret_rightCornerWhere,
145 Int& ret_rightCornerIndex
146 );
147 void findNeck(vertexArray *leftChain, Int botLeftIndex,
148 vertexArray *rightChain, Int botRightIndex,
149 Int& leftLastIndex, /*left point of the neck*/
150 Int& rightLastIndex /*right point of the neck*/
151 );
152
153 Int findNeckF(vertexArray *leftChain, Int botLeftIndex,
154 vertexArray *rightChain, Int botRightIndex,
155 gridBoundaryChain* leftGridChain,
156 gridBoundaryChain* rightGridChain,
157 Int gridStartIndex,
158 Int& neckLeft,
159 Int& neckRight);
160
161 void findTopAndBot(directedLine* polygon,
162 directedLine*& topV,
163 directedLine*& botV);
164 void findGridChains(directedLine* top, directedLine* bot,
165 gridWrap* grid,
166 gridBoundaryChain*& leftGridChain,
167 gridBoundaryChain*& rightGridChain);
168 void toVertexArrays(directedLine* topV, directedLine* botV, vertexArray& leftChain, vertexArray& rightChain);
169
170 void drawCorners(
171 Real* topV, Real* botV,
172 vertexArray* leftChain,
173 vertexArray* rightChain,
174 gridBoundaryChain* leftGridChain,
175 gridBoundaryChain* rightGridChain,
176 Int gridIndex1,
177 Int gridIndex2,
178 Int leftCornerWhere,
179 Int leftCornerIndex,
180 Int rightCornerWhere,
181 Int rightCornerIndex,
182 Int bot_leftCornerWhere,
183 Int bot_leftCornerIndex,
184 Int bot_rightCornerWhere,
185 Int bot_rightCornerIndex);
186
187 Int checkMiddle(vertexArray* chain, Int begin, Int end,
188 Real vup, Real vbelow);
189
190 #endif
191