Go to the source code of this file.
Defines | |
#define | SWAP(t, x, y) { t = x; x = y; y = t; } |
#define | NEW(p, type) |
#define | FREE(p) if (p) { free ((char *) p); p = NULL; } |
#define | HULL_ADD(head, p) |
#define | HULL_DELETE(head, p) |
#define | DESELECTED 0 |
#define | SELECTED 1 |
#define | MINUNIT 2048L |
#define | MAXUNIT 33554432L |
#define | min(a, b) ( ((a) < (b)) ? (a) : (b) ) |
#define | max(a, b) ( ((a) > (b)) ? (a) : (b) ) |
#define | X 0 |
#define | Y 1 |
#define | Z 2 |
#define | ONHULL TRUE |
#define | REMOVED TRUE |
#define | VISIBLE TRUE |
#define | PROCESSED TRUE |
#define | SAFE 1000000 |
Typedefs | |
typedef BOOL | bool |
typedef struct tVertexStructure | tsVertex |
typedef tsVertex * | tVertex |
typedef struct tEdgeStructure | tsEdge |
typedef tsEdge * | tEdge |
typedef struct tFaceStructure | tsFace |
typedef tsFace * | tFace |
Functions | |
BOOL | DoubleTriangle (void) |
void | ConstructHull (void) |
tVertex | MakeNullVertex (void) |
void | DeleteTemporaryStructures (void) |
BOOL WINAPI | DllMain (HANDLE hDLL, DWORD dwReason, LPVOID lpReserved) |
BOOL | _Xmodeler (HWND parent_window, HWND info_window, X__STRUCTURE *lpevi) |
void | ReadVertices (void) |
void | Print (void) |
void | SubVec (int a[3], int b[3], int c[3]) |
bool | HULL_ADDOne (tVertex p) |
int | VolumeSign (tFace f, tVertex p) |
int | Volumei (tFace f, tVertex p) |
tFace | MakeConeFace (tEdge e, tVertex p) |
void | MakeCcw (tFace f, tEdge e, tVertex p) |
tEdge | MakeNullEdge (void) |
tFace | MakeNullFace (void) |
tFace | MakeFace (tVertex v0, tVertex v1, tVertex v2, tFace f) |
void | CleanUp (void) |
void | CleanEdges (void) |
void | CleanFaces (void) |
void | CleanVertices (void) |
bool | Collinear (tVertex a, tVertex b, tVertex c) |
Variables | |
jmp_buf | jmp_buf_here |
tVertex | vertices = NULL |
tEdge | edges = NULL |
tFace | faces = NULL |
#define NEW | ( | p, | |||
type | ) |
Value:
if ((p=(type *) malloc (sizeof(type))) == NULL) {\ longjmp(jmp_buf_here,-1);\ }
Definition at line 68 of file chull.C.
Referenced by MakeNullEdge(), MakeNullFace(), and MakeNullVertex().
#define FREE | ( | p | ) | if (p) { free ((char *) p); p = NULL; } |
#define HULL_ADD | ( | head, | |||
p | ) |
Value:
if ( head ) { \ p->next = head; \ p->prev = head->prev; \ head->prev = p; \ p->prev->next = p; \ } \ else { \ head = p; \ head->next = head->prev = p; \ }
Definition at line 75 of file chull.C.
Referenced by MakeNullEdge(), MakeNullFace(), and MakeNullVertex().
#define HULL_DELETE | ( | head, | |||
p | ) |
Value:
if ( head ) { \ if ( head == head->next ) \ head = NULL; \ else if ( p == head ) \ head = head->next; \ p->next->prev = p->prev; \ p->prev->next = p->next; \ FREE( p ); \ }
Definition at line 86 of file chull.C.
Referenced by CleanEdges(), CleanFaces(), and CleanVertices().
#define X 0 |
Definition at line 116 of file chull.C.
Referenced by _Xmodeler(), Collinear(), DrawBrushInOne(), DrawProjectMapRectangle(), GetMapNormal(), GrabBrushPoint(), MapFacesByImageMap(), MapVerticesByImageMap(), SaveObject(), SaveObjects(), Volumei(), VolumeSign(), and WriteTextures().
#define Y 1 |
Definition at line 117 of file chull.C.
Referenced by _Xmodeler(), Collinear(), DrawBrushInOne(), DrawProjectMapRectangle(), GetMapNormal(), GrabBrushPoint(), MapFacesByImageMap(), MapVerticesByImageMap(), SaveObject(), SaveObjects(), Volumei(), VolumeSign(), and WriteTextures().
#define Z 2 |
Definition at line 118 of file chull.C.
Referenced by _RenderImageProcess(), _Xmodeler(), Collinear(), DistFromHidingObject(), DistFromVisibleObject(), Volumei(), and VolumeSign().
#define ONHULL TRUE |
Definition at line 319 of file chull.C.
Referenced by CleanVertices(), HULL_ADDOne(), and MakeNullVertex().
#define REMOVED TRUE |
#define VISIBLE TRUE |
#define PROCESSED TRUE |
Definition at line 322 of file chull.C.
Referenced by ConstructHull(), DoubleTriangle(), and MakeNullVertex().
BOOL DoubleTriangle | ( | void | ) |
Definition at line 377 of file chull.C.
References Collinear(), FALSE, MakeFace(), PROCESSED, TRUE, vertices, and VolumeSign().
Referenced by _Xmodeler().
void ConstructHull | ( | void | ) |
Definition at line 427 of file chull.C.
References CleanUp(), HULL_ADDOne(), PROCESSED, and vertices.
Referenced by _Xmodeler().
tVertex MakeNullVertex | ( | void | ) |
void DeleteTemporaryStructures | ( | void | ) |
BOOL WINAPI DllMain | ( | HANDLE | hDLL, | |
DWORD | dwReason, | |||
LPVOID | lpReserved | |||
) |
Definition at line 131 of file chull.C.
References DLL_PROCESS_ATTACH, DLL_PROCESS_DETACH, hThisInstance, and TRUE.
BOOL _Xmodeler | ( | HWND | parent_window, | |
HWND | info_window, | |||
X__STRUCTURE * | lpevi | |||
) |
Definition at line 146 of file chull.C.
References ConstructHull(), CreateEdge, CreateFace, CreateVertex, DeleteTemporaryStructures(), DESELECTED, double, DoubleTriangle(), edges, faces, FALSE, hThisInstance, IDX_STRING1, IDX_STRING2, IDX_STRING3, IDX_STRING4, jmp_buf_here, MainVp, MakeNullVertex(), max, MAXUNIT, MINUNIT, Nedge, Nface, Nvert, NvertDeselect, NvertSelect, SELECTED, TRUE, UpdateEdgeHeap, UpdateFaceHeap, UpdateVertexHeap, vertices, X, Y, and Z.
void ReadVertices | ( | void | ) |
Referenced by LoadObject(), and Restore_Undo().
void Print | ( | void | ) |
Definition at line 450 of file chull.C.
References edges, faces, FALSE, MakeConeFace(), ONHULL, REMOVED, TRUE, VISIBLE, and VolumeSign().
Referenced by ConstructHull().
Definition at line 550 of file chull.C.
References MakeCcw(), MakeNullEdge(), and MakeNullFace().
Referenced by HULL_ADDOne().
tEdge MakeNullEdge | ( | void | ) |
Definition at line 632 of file chull.C.
References edges, HULL_ADD, NEW, and REMOVED.
Referenced by MakeConeFace(), and MakeFace().
tFace MakeNullFace | ( | void | ) |
Definition at line 649 of file chull.C.
References faces, HULL_ADD, NEW, and VISIBLE.
Referenced by MakeConeFace(), and MakeFace().
Definition at line 667 of file chull.C.
References MakeNullEdge(), and MakeNullFace().
Referenced by DoubleTriangle().
void CleanUp | ( | void | ) |
Definition at line 702 of file chull.C.
References CleanEdges(), CleanFaces(), and CleanVertices().
Referenced by ConstructHull().
void CleanEdges | ( | void | ) |
void CleanFaces | ( | void | ) |
void CleanVertices | ( | void | ) |
jmp_buf jmp_buf_here |
Definition at line 121 of file chull.C.
Referenced by _Xmodeler(), CleanVertices(), ConstructHull(), DeleteTemporaryStructures(), DoubleTriangle(), MakeNullVertex(), and NurbsTeapot().
Definition at line 122 of file chull.C.
Referenced by _Xmodeler(), CleanEdges(), CleanVertices(), DeleteTemporaryStructures(), docube(), HULL_ADDOne(), and MakeNullEdge().
Definition at line 123 of file chull.C.
Referenced by _Xmodeler(), CleanFaces(), DeleteTemporaryStructures(), HULL_ADDOne(), and MakeNullFace().