ReactOS 0.4.16-dev-424-ge4748fe
|
#include "gluos.h"
#include <math.h>
#include <GL/gl.h>
#include "glimports.h"
#include "zlassert.h"
#include "sampleMonoPoly.h"
#include "sampleComp.h"
#include "polyDBG.h"
#include "partitionX.h"
Go to the source code of this file.
Macros | |
#define | max(a, b) ((a>b)? a:b) |
#define | min(a, b) ((a>b)? b:a) |
#define | ZERO 0.00001 |
Functions | |
directedLine * | polygonConvert (directedLine *polygon) |
void | triangulateConvexPolyVertical (directedLine *topV, directedLine *botV, primStream *pStream) |
void | triangulateConvexPolyHoriz (directedLine *leftV, directedLine *rightV, primStream *pStream) |
void | triangulateConvexPoly (directedLine *polygon, Int ulinear, Int vlinear, primStream *pStream) |
void | drawCorners (Real *topV, Real *botV, vertexArray *leftChain, vertexArray *rightChain, gridBoundaryChain *leftGridChain, gridBoundaryChain *rightGridChain, Int gridIndex1, Int gridIndex2, Int leftCornerWhere, Int leftCornerIndex, Int rightCornerWhere, Int rightCornerIndex, Int bot_leftCornerWhere, Int bot_leftCornerIndex, Int bot_rightCornerWhere, Int bot_rightCornerIndex) |
void | toVertexArrays (directedLine *topV, directedLine *botV, vertexArray &leftChain, vertexArray &rightChain) |
void | findTopAndBot (directedLine *polygon, directedLine *&topV, directedLine *&botV) |
void | findGridChains (directedLine *topV, directedLine *botV, gridWrap *grid, gridBoundaryChain *&leftGridChain, gridBoundaryChain *&rightGridChain) |
void | findDownCorners (Real *botVertex, vertexArray *leftChain, Int leftChainStartIndex, Int leftChainEndIndex, vertexArray *rightChain, Int rightChainStartIndex, Int rightChainEndIndex, Real v, Real uleft, Real uright, Int &ret_leftCornerWhere, Int &ret_leftCornerIndex, Int &ret_rightCornerWhere, Int &ret_rightCornerIndex) |
void | findUpCorners (Real *topVertex, vertexArray *leftChain, Int leftChainStartIndex, Int leftChainEndIndex, vertexArray *rightChain, Int rightChainStartIndex, Int rightChainEndIndex, Real v, Real uleft, Real uright, Int &ret_leftCornerWhere, Int &ret_leftCornerIndex, Int &ret_rightCornerWhere, Int &ret_rightCornerIndex) |
Int | findNeckF (vertexArray *leftChain, Int botLeftIndex, vertexArray *rightChain, Int botRightIndex, gridBoundaryChain *leftGridChain, gridBoundaryChain *rightGridChain, Int gridStartIndex, Int &neckLeft, Int &neckRight) |
void | findNeck (vertexArray *leftChain, Int botLeftIndex, vertexArray *rightChain, Int botRightIndex, Int &leftLastIndex, Int &rightLastIndex) |
void | findLeftGridIndices (directedLine *topEdge, Int firstGridIndex, Int lastGridIndex, gridWrap *grid, Int *ret_indices, Int *ret_innerIndices) |
void | findRightGridIndices (directedLine *topEdge, Int firstGridIndex, Int lastGridIndex, gridWrap *grid, Int *ret_indices, Int *ret_innerIndices) |
void | sampleMonoPoly (directedLine *polygon, gridWrap *grid, Int ulinear, Int vlinear, primStream *pStream, rectBlockArray *rbArray) |
void | sampleMonoPolyRec (Real *topVertex, Real *botVertex, vertexArray *leftChain, Int leftStartIndex, vertexArray *rightChain, Int rightStartIndex, gridBoundaryChain *leftGridChain, gridBoundaryChain *rightGridChain, Int gridStartIndex, primStream *pStream, rectBlockArray *rbArray) |
void | sampleLeftStrip (vertexArray *leftChain, Int topLeftIndex, Int botLeftIndex, gridBoundaryChain *leftGridChain, Int leftGridChainStartIndex, Int leftGridChainEndIndex, primStream *pStream) |
void | sampleLeftStripRec (vertexArray *leftChain, Int topLeftIndex, Int botLeftIndex, gridBoundaryChain *leftGridChain, Int leftGridChainStartIndex, Int leftGridChainEndIndex, primStream *pStream) |
void | sampleLeftStripRecF (vertexArray *leftChain, Int topLeftIndex, Int botLeftIndex, gridBoundaryChain *leftGridChain, Int leftGridChainStartIndex, Int leftGridChainEndIndex, primStream *pStream) |
void | sampleLeftSingleTrimEdgeRegion (Real upperVert[2], Real lowerVert[2], gridBoundaryChain *gridChain, Int beginIndex, Int endIndex, primStream *pStream) |
Int | findIncreaseChainFromBegin (vertexArray *chain, Int begin, Int end) |
Int | checkMiddle (vertexArray *chain, Int begin, Int end, Real vup, Real vbelow) |
void | sampleLeftOneGridStepNoMiddle (vertexArray *leftChain, Int beginLeftIndex, Int endLeftIndex, gridBoundaryChain *leftGridChain, Int leftGridChainStartIndex, primStream *pStream) |
void | sampleLeftOneGridStep (vertexArray *leftChain, Int beginLeftIndex, Int endLeftIndex, gridBoundaryChain *leftGridChain, Int leftGridChainStartIndex, primStream *pStream) |
void | triangulateXYMono (Int n_upper, Real upperVerts[][2], Int n_lower, Real lowerVerts[][2], primStream *pStream) |
void | stripOfFanLeft (vertexArray *leftChain, Int largeIndex, Int smallIndex, gridWrap *grid, Int vlineIndex, Int ulineSmallIndex, Int ulineLargeIndex, primStream *pStream, Int gridLineUp) |
#define ZERO 0.00001 |
Definition at line 60 of file sampleMonoPoly.cc.
Definition at line 1971 of file sampleMonoPoly.cc.
Referenced by sampleLeftOneGridStep(), and sampleRightOneGridStep().
void drawCorners | ( | Real * | topV, |
Real * | botV, | ||
vertexArray * | leftChain, | ||
vertexArray * | rightChain, | ||
gridBoundaryChain * | leftGridChain, | ||
gridBoundaryChain * | rightGridChain, | ||
Int | gridIndex1, | ||
Int | gridIndex2, | ||
Int | leftCornerWhere, | ||
Int | leftCornerIndex, | ||
Int | rightCornerWhere, | ||
Int | rightCornerIndex, | ||
Int | bot_leftCornerWhere, | ||
Int | bot_leftCornerIndex, | ||
Int | bot_rightCornerWhere, | ||
Int | bot_rightCornerIndex | ||
) |
Definition at line 266 of file sampleMonoPoly.cc.
void findDownCorners | ( | Real * | botVertex, |
vertexArray * | leftChain, | ||
Int | leftChainStartIndex, | ||
Int | leftChainEndIndex, | ||
vertexArray * | rightChain, | ||
Int | rightChainStartIndex, | ||
Int | rightChainEndIndex, | ||
Real | v, | ||
Real | uleft, | ||
Real | uright, | ||
Int & | ret_leftCornerWhere, | ||
Int & | ret_leftCornerIndex, | ||
Int & | ret_rightCornerWhere, | ||
Int & | ret_rightCornerIndex | ||
) |
Definition at line 430 of file sampleMonoPoly.cc.
Referenced by sampleMonoPolyRec().
void findGridChains | ( | directedLine * | topV, |
directedLine * | botV, | ||
gridWrap * | grid, | ||
gridBoundaryChain *& | leftGridChain, | ||
gridBoundaryChain *& | rightGridChain | ||
) |
Definition at line 388 of file sampleMonoPoly.cc.
Int findIncreaseChainFromBegin | ( | vertexArray * | chain, |
Int | begin, | ||
Int | end | ||
) |
Definition at line 1950 of file sampleMonoPoly.cc.
Referenced by sampleLeftOneGridStep().
void findLeftGridIndices | ( | directedLine * | topEdge, |
Int | firstGridIndex, | ||
Int | lastGridIndex, | ||
gridWrap * | grid, | ||
Int * | ret_indices, | ||
Int * | ret_innerIndices | ||
) |
Definition at line 974 of file sampleMonoPoly.cc.
Referenced by findGridChains(), and sampleMonoPoly().
void findNeck | ( | vertexArray * | leftChain, |
Int | botLeftIndex, | ||
vertexArray * | rightChain, | ||
Int | botRightIndex, | ||
Int & | leftLastIndex, | ||
Int & | rightLastIndex | ||
) |
Definition at line 941 of file sampleMonoPoly.cc.
Int findNeckF | ( | vertexArray * | leftChain, |
Int | botLeftIndex, | ||
vertexArray * | rightChain, | ||
Int | botRightIndex, | ||
gridBoundaryChain * | leftGridChain, | ||
gridBoundaryChain * | rightGridChain, | ||
Int | gridStartIndex, | ||
Int & | neckLeft, | ||
Int & | neckRight | ||
) |
Definition at line 850 of file sampleMonoPoly.cc.
Referenced by sampleMonoPolyRec().
void findRightGridIndices | ( | directedLine * | topEdge, |
Int | firstGridIndex, | ||
Int | lastGridIndex, | ||
gridWrap * | grid, | ||
Int * | ret_indices, | ||
Int * | ret_innerIndices | ||
) |
Definition at line 1092 of file sampleMonoPoly.cc.
Referenced by findGridChains(), and sampleMonoPoly().
void findTopAndBot | ( | directedLine * | polygon, |
directedLine *& | topV, | ||
directedLine *& | botV | ||
) |
Definition at line 372 of file sampleMonoPoly.cc.
void findUpCorners | ( | Real * | topVertex, |
vertexArray * | leftChain, | ||
Int | leftChainStartIndex, | ||
Int | leftChainEndIndex, | ||
vertexArray * | rightChain, | ||
Int | rightChainStartIndex, | ||
Int | rightChainEndIndex, | ||
Real | v, | ||
Real | uleft, | ||
Real | uright, | ||
Int & | ret_leftCornerWhere, | ||
Int & | ret_leftCornerIndex, | ||
Int & | ret_rightCornerWhere, | ||
Int & | ret_rightCornerIndex | ||
) |
Definition at line 651 of file sampleMonoPoly.cc.
Referenced by sampleMonoPolyRec().
directedLine * polygonConvert | ( | directedLine * | polygon | ) |
Definition at line 72 of file sampleMonoPoly.cc.
Referenced by monoTriangulationOpt(), monoTriangulationRecGenOpt(), and sampleMonoPoly().
void sampleLeftOneGridStep | ( | vertexArray * | leftChain, |
Int | beginLeftIndex, | ||
Int | endLeftIndex, | ||
gridBoundaryChain * | leftGridChain, | ||
Int | leftGridChainStartIndex, | ||
primStream * | pStream | ||
) |
Definition at line 2011 of file sampleMonoPoly.cc.
Referenced by sampleLeftStripRec(), and sampleLeftStripRecF().
void sampleLeftOneGridStepNoMiddle | ( | vertexArray * | leftChain, |
Int | beginLeftIndex, | ||
Int | endLeftIndex, | ||
gridBoundaryChain * | leftGridChain, | ||
Int | leftGridChainStartIndex, | ||
primStream * | pStream | ||
) |
Definition at line 1984 of file sampleMonoPoly.cc.
Referenced by sampleLeftOneGridStep().
void sampleLeftSingleTrimEdgeRegion | ( | Real | upperVert[2], |
Real | lowerVert[2], | ||
gridBoundaryChain * | gridChain, | ||
Int | beginIndex, | ||
Int | endIndex, | ||
primStream * | pStream | ||
) |
Definition at line 1907 of file sampleMonoPoly.cc.
Referenced by sampleLeftStrip(), sampleLeftStripRec(), and sampleLeftStripRecF().
void sampleLeftStrip | ( | vertexArray * | leftChain, |
Int | topLeftIndex, | ||
Int | botLeftIndex, | ||
gridBoundaryChain * | leftGridChain, | ||
Int | leftGridChainStartIndex, | ||
Int | leftGridChainEndIndex, | ||
primStream * | pStream | ||
) |
Definition at line 1682 of file sampleMonoPoly.cc.
void sampleLeftStripRec | ( | vertexArray * | leftChain, |
Int | topLeftIndex, | ||
Int | botLeftIndex, | ||
gridBoundaryChain * | leftGridChain, | ||
Int | leftGridChainStartIndex, | ||
Int | leftGridChainEndIndex, | ||
primStream * | pStream | ||
) |
Definition at line 1724 of file sampleMonoPoly.cc.
Referenced by sampleLeftStrip(), and sampleLeftStripRec().
void sampleLeftStripRecF | ( | vertexArray * | leftChain, |
Int | topLeftIndex, | ||
Int | botLeftIndex, | ||
gridBoundaryChain * | leftGridChain, | ||
Int | leftGridChainStartIndex, | ||
Int | leftGridChainEndIndex, | ||
primStream * | pStream | ||
) |
Definition at line 1803 of file sampleMonoPoly.cc.
Referenced by sampleCompLeft(), and sampleLeftStripRecF().
void sampleMonoPoly | ( | directedLine * | polygon, |
gridWrap * | grid, | ||
Int | ulinear, | ||
Int | vlinear, | ||
primStream * | pStream, | ||
rectBlockArray * | rbArray | ||
) |
Definition at line 1219 of file sampleMonoPoly.cc.
Referenced by Slicer::slice_new().
void sampleMonoPolyRec | ( | Real * | topVertex, |
Real * | botVertex, | ||
vertexArray * | leftChain, | ||
Int | leftStartIndex, | ||
vertexArray * | rightChain, | ||
Int | rightStartIndex, | ||
gridBoundaryChain * | leftGridChain, | ||
gridBoundaryChain * | rightGridChain, | ||
Int | gridStartIndex, | ||
primStream * | pStream, | ||
rectBlockArray * | rbArray | ||
) |
Definition at line 1401 of file sampleMonoPoly.cc.
Referenced by sampleMonoPoly(), and sampleMonoPolyRec().
void stripOfFanLeft | ( | vertexArray * | leftChain, |
Int | largeIndex, | ||
Int | smallIndex, | ||
gridWrap * | grid, | ||
Int | vlineIndex, | ||
Int | ulineSmallIndex, | ||
Int | ulineLargeIndex, | ||
primStream * | pStream, | ||
Int | gridLineUp | ||
) |
Definition at line 2368 of file sampleMonoPoly.cc.
Referenced by sampleBotLeftWithGridLinePost(), sampleCompBot(), sampleCompTop(), sampleLeftOneGridStep(), and sampleTopLeftWithGridLinePost().
void toVertexArrays | ( | directedLine * | topV, |
directedLine * | botV, | ||
vertexArray & | leftChain, | ||
vertexArray & | rightChain | ||
) |
Definition at line 346 of file sampleMonoPoly.cc.
void triangulateConvexPoly | ( | directedLine * | polygon, |
Int | ulinear, | ||
Int | vlinear, | ||
primStream * | pStream | ||
) |
Definition at line 210 of file sampleMonoPoly.cc.
Referenced by sampleMonoPoly().
void triangulateConvexPolyHoriz | ( | directedLine * | leftV, |
directedLine * | rightV, | ||
primStream * | pStream | ||
) |
Definition at line 164 of file sampleMonoPoly.cc.
Referenced by triangulateConvexPoly().
void triangulateConvexPolyVertical | ( | directedLine * | topV, |
directedLine * | botV, | ||
primStream * | pStream | ||
) |
Definition at line 102 of file sampleMonoPoly.cc.
Referenced by triangulateConvexPoly().
void triangulateXYMono | ( | Int | n_upper, |
Real | upperVerts[][2], | ||
Int | n_lower, | ||
Real | lowerVerts[][2], | ||
primStream * | pStream | ||
) |
Definition at line 2258 of file sampleMonoPoly.cc.
Referenced by stripOfFanLeft(), stripOfFanRight(), and triangulateConvexPolyHoriz().