7#if !defined(AFX_3DFACE_H__CA6BC29D_FAC2_11D1_A0DE_000000000000__INCLUDED_)
8#define AFX_3DFACE_H__CA6BC29D_FAC2_11D1_A0DE_000000000000__INCLUDED_
16BEGIN_MOOTOOLS_NAMESPACE
18class C3DFacePropertyMethods;
23 friend C3DFacePropertyMethods;
28 MaterialID materialid;
30 C3DFacePropertyData();
33inline C3DFacePropertyData::C3DFacePropertyData()
35 materialid = DEFAULT_MATERIAL_ID;
76 void SetMaterialID(MaterialID
id);
77 MaterialID GetMaterialID()
const;
80 double GetCompacityFactor(
const CGeomInfo *info)
const;
96 if (
abs(
det) < FLOAT_EPSILON3)
104 if (
tuv[1] < 0.0 ||
tuv[1] > 1.0)
110 if (
tuv[2] < 0.0 ||
tuv[1] +
tuv[2] > 1.0)
138template<
typename TYPE>
148#define MIN3(a,b,c) ((((a)<(b))&&((a)<(c))) ? (a) : (((b)<(c)) ? (b) : (c)))
149#define MAX3(a,b,c) ((((a)>(b))&&((a)>(c))) ? (a) : (((b)>(c)) ? (b) : (c)))
166 #ifdef NEW_SIGN3_CODE
167 #define SIGN3_EPS 10e-5
169 ((((A).x < SIGN3_EPS) ? 4 : 0) | (((A).x > -SIGN3_EPS) ? 32 : 0) | \
170 (((A).y < SIGN3_EPS) ? 2 : 0) | (((A).y > -SIGN3_EPS) ? 16 : 0) | \
171 (((A).z < SIGN3_EPS) ? 1 : 0) | (((A).z > -SIGN3_EPS) ? 8 : 0))
173 #define SIGN3( A ) ((((A).x<0)?4:0) | (((A).y<0)?2:0) | (((A).z<0)?1:0))
178 if (
vect1h.x < PRECISION_LIMIT &&
vect1h.y < PRECISION_LIMIT &&
vect1h.z < PRECISION_LIMIT)
185 if (
vect2h.x < PRECISION_LIMIT &&
vect2h.y < PRECISION_LIMIT &&
vect2h.z < PRECISION_LIMIT)
192 if (
vect3h.x < PRECISION_LIMIT &&
vect3h.y < PRECISION_LIMIT &&
vect3h.z < PRECISION_LIMIT)
215END_MOOTOOLS_NAMESPACE
The class handles C2DPoint list of points.
Definition 2DPointList.h:48
A 3D face is a list of indexes of C3DPointList object point list.
Definition 3DFace.h:43
bool GetNormal(const CGeomInfo *, C3DVector &normal, bool normalize=true)
Return false if the normal can't be computed (weird face). In such case, a unit vector is returned (1...
int Triangulate(const CGeomInfo *, int srcfacenbr, int dstfacenbr)
Triangulate the face using CGeomInfo information.
int Triangulate(CTriangulateFaceHelper *helper, int srcfacenbr, int dstfacenbr)
Triangulate the face. When called repeatly on multiple CFace of a C3DFaceList, this method is faster ...
C3DFaceList class which implement a list of C3DFace. Each face contains indexes to 3D points stored i...
Definition 3DFaceList.h:249
The class defines an x, y, z 3D point which can use int, float or double.
Definition 3DPoint.h:27
A CFace contains the information related to a given face in a CFaceList.
Definition Face.h:97
CFacePropertyData is the main data chunk of CFaceList which consists of storing the flags.
Definition Face.h:70
CGeomInfo is an helper class oftenly required by different methods.
Definition GeomInfo.h:71