Mesh Library - Face
Sturcture: | Face |
source: | face.c |
Definition:
struct face{
Id faceno;
Loop * floop;
Solid * fsolid;
double normal[3];
Face * next;
Face * prev;
int alivef;
};
Data Members:
- faceno - face number
- floop - pointer to the loop structure, loop is a double linked list of halfedges, the order is counter clock wise.
- fsolid - back pointer to solid it belongs to.
- normal - face normal
- next,prev - pointers in facelist, no geometric meaning
- alivef - indicating if the current face is alive
Methods:
- void FaceConstruct( Solid ** s, Vertex * a, Vertex *b, Vertex *c);
Construct a Face, the input vertices should be ordered couter clockwisely, s is the pointer to the solid this face belongs to.
- void FaceDestruct( Face ** f);
Destruct the Face f
- int FaceOrientation( Face *f , double x, double y, double z );
Judge if the face f is visible given eye position (x,y,z)
- int FaceNormal( Face * f);
Calculate face normal of face f.