ORIENT.H
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00012 typedef struct Orient_WORKFACE {
00013 long f;
00014 long fa[3];
00015 int id;
00016 } workface;
00017
00023 typedef struct Orient_VTXADJ {
00024 long nf;
00025 long *flist;
00026 } vtxadj;
00027
00028 #ifndef min
00029 #define min(a,b) ( ((a) < (b)) ? (a) : (b) )
00030 #endif
00031 #ifndef max
00032 #define max(a,b) ( ((a) > (b)) ? (a) : (b) )
00033 #endif
00034 #define VECCOPY(a,b) { b[0] = a[0]; b[1] = a[1]; b[2] = a[2]; }
00035 #define VECSUB(a,b,c) { c[0]=a[0]-b[0]; c[1]=a[1]-b[1]; c[2]=a[2]-b[2];}
00036 #define VECSUM(a,b,c) { c[0]=a[0]+b[0]; c[1]=a[1]+b[1]; c[2]=a[2]+b[2];}
00037 #define VECSCALE(a,b,c) { c[0]=(a)*b[0]; c[1]=(a)*b[1]; c[2]=(a)*b[2];}
00038 #define DOT(a,b) ( (a[0]*b[0]) + (a[1]*b[1]) + (a[2]*b[2]) )
00039 #define CROSS(v1,v2,r) { \
00040 r[0] = (v1[1]*v2[2]) - (v2[1]*v1[2]); \
00041 r[1] = (v1[2]*v2[0]) - (v1[0]*v2[2]); \
00042 r[2] = (v1[0]*v2[1]) - (v2[0]*v1[1]); \
00043 }
00044 #define POINT2VECTOR(p,v) v[0]=(double)p[0]; v[1]=(double)p[1]; \
00045 v[2]=(double)p[2];
00046 #define VECTOR2POINT(v,p) p[0]=(long)v[0]; p[1]=(long)v[1]; \
00047 p[2]=(long)v[2];
00048
00049 #define NO 0
00050 #define YES 1
00051 #define FAIL -1
00052 #define OK 1
00053