IMPLICIT.C File Reference

Go to the source code of this file.

Defines

#define DESELECTED   0
#define SELECTED   1
#define UNIT   32768.0
#define TET   0
#define NOTET   1
#define RES   10
#define L   0
#define R   1
#define B   2
#define T   3
#define N   4
#define F   5
#define LBN   0
#define LBF   1
#define LTN   2
#define LTF   3
#define RBN   4
#define RBF   5
#define RTN   6
#define RTF   7
#define RAND()   ((rand()&32767)/32767.)
#define HASHBIT   (5)
#define HASHSIZE   (size_t)(1<<(3*HASHBIT))
#define MASK   ((1<<HASHBIT)-1)
#define HASH(i, j, k)   ((((((i)&MASK)<<HASHBIT)|((j)&MASK))<<HASHBIT)|((k)&MASK))
#define BIT(i, bit)   (((i)>>(bit))&1)
#define FLIP(i, bit)   ((i)^1<<(bit))
#define LB   0
#define LT   1
#define LN   2
#define LF   3
#define RB   4
#define RT   5
#define RN   6
#define RF   7
#define BN   8
#define BF   9
#define TN   10
#define TF   11

Typedefs

typedef struct ipt IPOINT
typedef struct test TEST
typedef struct pvert IVERTEX
typedef struct pverts IVERTICES
typedef struct corner CORNER
typedef struct cube CUBE
typedef struct cubes CUBES
typedef struct centerlist CENTERLIST
typedef struct cornerlist CORNERLIST
typedef struct edgelist EDGELIST
typedef struct intlist INTLIST
typedef struct intlists INTLISTS
typedef struct process PROCESS
typedef struct _threeints THREEINTS

Functions

BOOL WINAPI DllMain (HANDLE hDLL, DWORD dwReason, LPVOID lpReserved)
void ImplicitPolygon (void)
BOOL _Xmodeler (HWND parent_window, HWND info_window, X__STRUCTURE *lpevi)
void * calloc ()
char * mycalloc ()
double torus (double x, double y, double z)
double sphere (double x, double y, double z)
double blob (double x, double y, double z)
double sphere1 (double x, double y, double z)
 triangle (int i1, int i2, int i3, IVERTICES vertices)
void InsertInVertexList (long base, long Vj, long Vi)
void BuildEdges (long base)
void makecubetable (void)
void freecubetable (void)
char * polygonize (double(*function)(), double(*size)(), int bounds, double(*x)(), double(*y)(), double(*z)(), triproc, int mode)
CORNERsetcorner (PROCESS *p, int i, int j, int k)
TEST find (int sign, PROCESS *p, double x, double y, double z)
int dotet (CUBE *cube, int c1, int c2, int c3, int c4, PROCESS *p)
int docube (CUBE *cube, PROCESS *p)
int nextcwedge (int ipedge, int ipface)
int otherface (int ipedge, int ipface)
char * mycalloc (int nitems, int nbytes)
int setcenter (table, int i, int j, int k)
 setedge (table, int i1, int j1, int k1, int i2, int j2, int k2, int vid)
int getedge (table, int i1, int j1, int k1, int i2, int j2, int k2)
int vertid (CORNER *c1, CORNER *c2, PROCESS *p)
 addtovertices (IVERTICES *vertices, IVERTEX v)
 vnormal (IPOINT *ipt, PROCESS *p, IPOINT *v)

Variables

int gntris
IVERTICES gvertices
THREEINTSlistf


Define Documentation

#define DESELECTED   0

Definition at line 19 of file IMPLICIT.C.

#define SELECTED   1

Definition at line 20 of file IMPLICIT.C.

#define UNIT   32768.0

Definition at line 21 of file IMPLICIT.C.

#define TET   0

Definition at line 71 of file IMPLICIT.C.

Referenced by polygonize().

#define NOTET   1

Definition at line 72 of file IMPLICIT.C.

Referenced by ImplicitPolygon().

#define RES   10

Definition at line 74 of file IMPLICIT.C.

Referenced by polygonize().

#define L   0

#define R   1

#define B   2

#define T   3

#define N   4

Definition at line 80 of file IMPLICIT.C.

#define F   5

Definition at line 81 of file IMPLICIT.C.

Referenced by polygonize().

#define LBN   0

Definition at line 82 of file IMPLICIT.C.

Referenced by polygonize().

#define LBF   1

Definition at line 83 of file IMPLICIT.C.

Referenced by polygonize().

#define LTN   2

Definition at line 84 of file IMPLICIT.C.

Referenced by polygonize().

#define LTF   3

Definition at line 85 of file IMPLICIT.C.

Referenced by polygonize().

#define RBN   4

Definition at line 86 of file IMPLICIT.C.

Referenced by polygonize().

#define RBF   5

Definition at line 87 of file IMPLICIT.C.

Referenced by polygonize().

#define RTN   6

Definition at line 88 of file IMPLICIT.C.

Referenced by polygonize().

#define RTF   7

Definition at line 89 of file IMPLICIT.C.

Referenced by polygonize().

 
#define RAND (  )     ((rand()&32767)/32767.)

Definition at line 94 of file IMPLICIT.C.

Referenced by find().

#define HASHBIT   (5)

Definition at line 95 of file IMPLICIT.C.

#define HASHSIZE   (size_t)(1<<(3*HASHBIT))

Definition at line 96 of file IMPLICIT.C.

Referenced by polygonize().

#define MASK   ((1<<HASHBIT)-1)

Definition at line 97 of file IMPLICIT.C.

#define HASH ( i,
j,
 )     ((((((i)&MASK)<<HASHBIT)|((j)&MASK))<<HASHBIT)|((k)&MASK))

Definition at line 98 of file IMPLICIT.C.

Referenced by getedge(), setcenter(), setcorner(), and setedge().

#define BIT ( i,
bit   )     (((i)>>(bit))&1)

Definition at line 99 of file IMPLICIT.C.

Referenced by makecubetable(), and polygonize().

#define FLIP ( i,
bit   )     ((i)^1<<(bit))

Definition at line 100 of file IMPLICIT.C.

#define LB   0

Definition at line 675 of file IMPLICIT.C.

Referenced by nextcwedge().

#define LT   1

Definition at line 676 of file IMPLICIT.C.

Referenced by nextcwedge().

#define LN   2

Definition at line 677 of file IMPLICIT.C.

Referenced by nextcwedge().

#define LF   3

Definition at line 678 of file IMPLICIT.C.

Referenced by nextcwedge().

#define RB   4

Definition at line 679 of file IMPLICIT.C.

Referenced by nextcwedge().

#define RT   5

Definition at line 680 of file IMPLICIT.C.

Referenced by nextcwedge().

#define RN   6

Definition at line 681 of file IMPLICIT.C.

Referenced by nextcwedge().

#define RF   7

Definition at line 682 of file IMPLICIT.C.

Referenced by nextcwedge().

#define BN   8

Definition at line 683 of file IMPLICIT.C.

Referenced by nextcwedge().

#define BF   9

Definition at line 684 of file IMPLICIT.C.

Referenced by nextcwedge().

#define TN   10

Definition at line 685 of file IMPLICIT.C.

Referenced by nextcwedge().

#define TF   11

Definition at line 686 of file IMPLICIT.C.

Referenced by nextcwedge().


Typedef Documentation

typedef struct ipt IPOINT

typedef struct test TEST

typedef struct pvert IVERTEX

typedef struct pverts IVERTICES

typedef struct corner CORNER

typedef struct cube CUBE

typedef struct cubes CUBES

typedef struct centerlist CENTERLIST

typedef struct cornerlist CORNERLIST

typedef struct edgelist EDGELIST

typedef struct intlist INTLIST

typedef struct intlists INTLISTS

typedef struct process PROCESS

typedef struct _threeints THREEINTS


Function Documentation

BOOL WINAPI DllMain ( HANDLE  hDLL,
DWORD  dwReason,
LPVOID  lpReserved 
)

Definition at line 31 of file IMPLICIT.C.

References DLL_PROCESS_ATTACH, DLL_PROCESS_DETACH, hThisInstance, and TRUE.

void ImplicitPolygon ( void   ) 

BOOL _Xmodeler ( HWND  parent_window,
HWND  info_window,
X__STRUCTURE lpevi 
)

Definition at line 52 of file IMPLICIT.C.

References FALSE, hThisInstance, IDX_STRING1, IDX_STRING2, ImplicitPolygon(), and TRUE.

void* calloc (  ) 

Referenced by mycalloc().

char* mycalloc (  ) 

double torus ( double  x,
double  y,
double  z 
)

Definition at line 189 of file IMPLICIT.C.

Referenced by ImplicitPolygon().

double sphere ( double  x,
double  y,
double  z 
)

Definition at line 200 of file IMPLICIT.C.

Referenced by blob().

double blob ( double  x,
double  y,
double  z 
)

Definition at line 210 of file IMPLICIT.C.

References sphere().

double sphere1 ( double  x,
double  y,
double  z 
)

Definition at line 216 of file IMPLICIT.C.

triangle ( int  i1,
int  i2,
int  i3,
IVERTICES  vertices 
)

Definition at line 227 of file IMPLICIT.C.

Referenced by _ExternalTextureProcedure(), and ImplicitPolygon().

void InsertInVertexList ( long  base,
long  Vj,
long  Vi 
)

Definition at line 252 of file IMPLICIT.C.

References MainVp, X__Malloc, and X__Realloc.

void BuildEdges ( long  base  ) 

Definition at line 278 of file IMPLICIT.C.

References CreateEdge, MainVp, Nedge, Nvert, UpdateEdgeHeap, and X__Free.

void makecubetable ( void   ) 

Definition at line 758 of file IMPLICIT.C.

References BIT, mycalloc(), nextcwedge(), and otherface().

Referenced by polygonize().

void freecubetable ( void   ) 

Definition at line 790 of file IMPLICIT.C.

Referenced by polygonize().

char* polygonize ( double (*)()  function,
double (*)()  size,
int  bounds,
double (*)()  x,
double (*)()  y,
double (*)()  z,
triproc  ,
int  mode 
)

Definition at line 383 of file IMPLICIT.C.

References B, BIT, docube(), dotet(), double, F, find(), freecubetable(), HASHSIZE, L, LBF, LBN, LTF, LTN, makecubetable(), mycalloc(), N, R, RBF, RBN, RES, RTF, RTN, setcenter(), setcorner(), T, and TET.

Referenced by ImplicitPolygon().

CORNER* setcorner ( PROCESS p,
int  i,
int  j,
int  k 
)

Definition at line 571 of file IMPLICIT.C.

References double, HASH, and mycalloc().

Referenced by polygonize().

TEST find ( int  sign,
PROCESS p,
double  x,
double  y,
double  z 
)

Definition at line 597 of file IMPLICIT.C.

References RAND.

Referenced by polygonize().

int dotet ( CUBE cube,
int  c1,
int  c2,
int  c3,
int  c4,
PROCESS p 
)

Definition at line 626 of file IMPLICIT.C.

References vertid().

Referenced by polygonize().

int docube ( CUBE cube,
PROCESS p 
)

Definition at line 701 of file IMPLICIT.C.

References edges, and vertid().

Referenced by polygonize().

int nextcwedge ( int  ipedge,
int  ipface 
)

Definition at line 726 of file IMPLICIT.C.

References B, BF, BN, L, LB, LF, LN, LT, R, RB, RF, RN, RT, T, TF, and TN.

Referenced by makecubetable().

int otherface ( int  ipedge,
int  ipface 
)

Definition at line 748 of file IMPLICIT.C.

Referenced by makecubetable().

char* mycalloc ( int  nitems,
int  nbytes 
)

Definition at line 816 of file IMPLICIT.C.

References calloc().

int setcenter ( table  ,
int  i,
int  j,
int  k 
)

Definition at line 829 of file IMPLICIT.C.

References HASH, and mycalloc().

Referenced by polygonize().

setedge ( table  ,
int  i1,
int  j1,
int  k1,
int  i2,
int  j2,
int  k2,
int  vid 
)

Definition at line 846 of file IMPLICIT.C.

References HASH, and mycalloc().

Referenced by vertid().

int getedge ( table  ,
int  i1,
int  j1,
int  k1,
int  i2,
int  j2,
int  k2 
)

Definition at line 866 of file IMPLICIT.C.

References HASH.

Referenced by vertid().

int vertid ( CORNER c1,
CORNER c2,
PROCESS p 
)

Definition at line 890 of file IMPLICIT.C.

References addtovertices(), getedge(), setedge(), and vnormal().

Referenced by docube(), and dotet().

addtovertices ( IVERTICES vertices,
IVERTEX  v 
)

Definition at line 911 of file IMPLICIT.C.

References if(), and mycalloc().

Referenced by vertid().

vnormal ( IPOINT ipt,
PROCESS p,
IPOINT v 
)

Definition at line 930 of file IMPLICIT.C.

Referenced by vertid().


Variable Documentation

int gntris

Definition at line 221 of file IMPLICIT.C.

Definition at line 222 of file IMPLICIT.C.

Definition at line 223 of file IMPLICIT.C.


Generated on Sun Apr 27 14:20:16 2014 for OpenFX by  doxygen 1.5.6