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:
10
** http://oss.sgi.com/projects/FreeB
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.
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.
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.
37
** $Header: //depot/main/gfx/lib/glu/libnurbs/nurbtess/sampleMonoPoly.h#4 $
40
#ifndef _SAMPLEMONOPOLY_H
41
#define _SAMPLEMONOPOLY_H
43
#include "monoTriangulation.h"
45
#include "rectBlock.h"
48
void triangulateXYMono(Int n_upper, Real upperVerts[][2],
49
Int n_lower, Real lowerVerts[][2],
52
void stripOfFanLeft(vertexArray* leftChain,
62
void sampleLeftOneGridStep(vertexArray* leftChain,
65
gridBoundaryChain* leftGridChain,
66
Int leftGridChainStartIndex,
70
void sampleLeftSingleTrimEdgeRegion(Real upperVert[2], Real lowerVert[2],
71
gridBoundaryChain* gridChain,
76
void sampleLeftStripRec(vertexArray* leftChain,
79
gridBoundaryChain* leftGridChain,
80
Int leftGridChainStartIndex,
81
Int leftGridChainEndIndex,
85
void sampleLeftStrip(vertexArray* leftChain,
88
gridBoundaryChain* leftGridChain,
89
Int leftGridChainStartIndex,
90
Int leftGridChainEndIndex,
94
void findLeftGridIndices(directedLine* topEdge, Int firstGridIndex, Int lastGridIndex, gridWrap* grid, Int* ret_indices, Int* ret_inner);
96
void findRightGridIndices(directedLine* topEdge, Int firstGridIndex, Int lastGridIndex, gridWrap* grid, Int* ret_indices, Int* ret_inner);
98
void sampleMonoPoly(directedLine* polygon, gridWrap* grid, Int ulinear, Int vlinear, primStream *pStream, rectBlockArray* rbArray);
100
void sampleMonoPolyRec(
103
vertexArray* leftChain,
105
vertexArray* rightChain,
107
gridBoundaryChain* leftGridChain,
108
gridBoundaryChain* rightGridChain,
111
rectBlockArray* rbArray
114
void sampleLeftStripRecF(vertexArray* leftChain,
117
gridBoundaryChain* leftGridChain,
118
Int leftGridChainStartIndex,
119
Int leftGridChainEndIndex,
123
void findUpCorners(Real *topVertex,
124
vertexArray *leftChain,
125
Int leftChainStartIndex, Int leftChainEndIndex,
126
vertexArray *rightChain,
127
Int rightChainStartIndex, Int rightChainEndIndex,
131
Int& ret_leftCornerWhere,
132
Int& ret_leftCornerIndex,
133
Int& ret_rightCornerWhere,
134
Int& ret_rightCornerIndex
136
void findDownCorners(Real *botVertex,
137
vertexArray *leftChain, Int leftChainStartIndex, Int leftChainEndIndex,
138
vertexArray *rightChain, Int rightChainStartIndex, Int rightChainEndIndex,
142
Int& ret_leftCornerWhere,
143
Int& ret_leftCornerIndex,
144
Int& ret_rightCornerWhere,
145
Int& ret_rightCornerIndex
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*/
153
Int findNeckF(vertexArray *leftChain, Int botLeftIndex,
154
vertexArray *rightChain, Int botRightIndex,
155
gridBoundaryChain* leftGridChain,
156
gridBoundaryChain* rightGridChain,
161
void findTopAndBot(directedLine* polygon,
163
directedLine*& botV);
164
void findGridChains(directedLine* top, directedLine* bot,
166
gridBoundaryChain*& leftGridChain,
167
gridBoundaryChain*& rightGridChain);
168
void toVertexArrays(directedLine* topV, directedLine* botV, vertexArray& leftChain, vertexArray& rightChain);
171
Real* topV, Real* botV,
172
vertexArray* leftChain,
173
vertexArray* rightChain,
174
gridBoundaryChain* leftGridChain,
175
gridBoundaryChain* rightGridChain,
180
Int rightCornerWhere,
181
Int rightCornerIndex,
182
Int bot_leftCornerWhere,
183
Int bot_leftCornerIndex,
184
Int bot_rightCornerWhere,
185
Int bot_rightCornerIndex);
187
Int checkMiddle(vertexArray* chain, Int begin, Int end,
188
Real vup, Real vbelow);