![]() |
Polygon Crucher SDK - Documentation
Documentation
|
A 3D face is a list of indexes of C3DPointList object point list. More...
A 3D face is a list of indexes of C3DPointList object point list.
A 3D face is usually built using a C3DFaceList::GetFace
#include <3DFace.h>
Public Member Functions | |
int | Triangulate (CTriangulateFaceHelper *helper, int srcfacenbr, int dstfacenbr) |
Triangulate the face. When called repeatly on multiple CFace of a C3DFaceList, this method is faster than the second one. | |
int | Triangulate (const CGeomInfo *, int srcfacenbr, int dstfacenbr) |
Triangulate the face using CGeomInfo information. | |
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, 0, 0);. | |
void | Get2DCoordinates (const CGeomInfo *, C2DPointList &points2d) |
void | GetCenter (const CGeomInfo *info, C3DPoint ¢er) const |
void | GetPlane (const CGeomInfo *, C4DVector &plane) |
void | SetMaterialID (MaterialID id) |
MaterialID | GetMaterialID () const |
double | GetCompacityFactor (const CGeomInfo *info) const |
double | Area (const CGeomInfo *info) const |
bool | IsPlane (const CGeomInfo *) |
bool | IsConvex (const CGeomInfo *) |
![]() | |
unsigned int | GetFaceIndex () const |
unsigned int | GetFlags () const |
void | SetFlags (unsigned int flags) |
bool | IsFlagSet (FACE_PROPERTIES) const |
bool | IsOneFlagSet (int flag) const |
void | SetFlag (FACE_PROPERTIES, bool set) |
void | SetFlags (unsigned int flags, bool set) |
void | Inherit (const CFace &srcface) |
Inherit srcface chunks (and so flags and others properties), but don't copy the srcface indexes. | |
bool | Copy (const CFace &srcface) |
bool | Copy (unsigned int srcindex) |
int * | SetSize (int size, FACE_PROPERTIES invalidFlag=FACE_IS_INVALID) |
Set the number of indexes for the face. If size < 3, then invalidFlag flag is set, if size >= 3 the flag is removed.. For channel flags, FACE_IS_UNUSED should be used to keep the same number of faces between 3d faces and channel faces, if the matching 3d face is not set to invalid on a clean operation. | |
int | ReplaceIndex (int oldindex, int newindex) |
bool | CompareIndexes (const CFace &refface, bool allowIndexShift) const |
int | AddIndex (int) |
bool | RemoveIndex (int) |
void | SetTriangle (int pointindex1, int pointindex2, int pointindex3) |
void | SetQuadrangle (int pointindex1, int pointindex2, int pointindex3, int pointindex4) |
void | Flip () |
bool | IsOnePointFlagSet (const CGeomInfo *info, unsigned int pointPropertiesFlags, bool set) |
check if one point has one of the pointPropertiesFlags set or unset (call IsPointFlagSet internally) | |
FLAGRESULT | IsPointFlagSet (const CGeomInfo *info, unsigned int pointPropertiesFlags, bool set) |
check how many points have one of the pointPropertiesFlags set or unset (call IsPointFlagSet internally) | |
void | SetPointFlag (const CGeomInfo *info, unsigned int pointPropertiesFlags, bool set) |
int | IsFacePoint (int pointindex) |
Check if point index belong to face. Return the index position of this pointindex or POINT_NOT_BELONG_TO_FACE. | |
int | GetPrevIndex (int offset) const |
int | GetNextIndex (int offset) const |
int | IsFaceEdge (int pt1, int pt2, bool sameOrder) |
bool | IsTriangular () |
void | GetCenter (const CGeomInfo *info, C4DPoint ¢er) const |
void * | GetDataChunk (unsigned int id) const |
SIZET | GetSizeOfData (unsigned int id) const |
Static Public Member Functions | |
static CTriangulateFaceHelper * | InitTriangulation (const CGeomInfo *info) |
static void | ReleaseTriangulation (CTriangulateFaceHelper *helper) |
Friends | |
class | C3DFaceList |
Triangulate the face using CGeomInfo information.
Triangulate a face
info | contains the face list as well as related channels which need to be triangulate contains the preallocated destination face list and destination channels source and destination list might contains only faces |
srcfacenbr | index of the face to triangulate |
dstfacenbr | index to which the new triangulated faces are copied If dstfacenbr == -1 => we assume to triangulate only one face, and initialize the destination face list buffer |