Polygon Crucher SDK - Documentation
Documentation
Loading...
Searching...
No Matches
CFace Class Reference

A CFace contains the information related to a given face in a CFaceList. More...

Detailed Description

A CFace contains the information related to a given face in a CFaceList.

CFace is most of the time built from CFaceList::GetFace method. It represents a single face of this list at the specified index. CFace is the base class for more specific classes C3DFace, CUVWFace...
It contains an array of indexes that refers to CPointList.

Note
CFaces indexes can be modified or resized but do not forget that they are part of the whole CFaceList, which is in a single memory block.
Resizing faces (especially if indexes are added) can lead to numerous memory reallocations and loss of performance.
The CFaceList class contains a number of methods for pre-allocating memory, so that a call to SetSize does not lead to inappropriate memory reallocations.

#include <Face.h>

Inheritance diagram for CFace:
CCollectionElement< int, unsigned short > C3DFace CNormalFace CUVWFace CVCFace CWeightFace

Public Member Functions

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)
 
intSetSize (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 &center) const
 
voidGetDataChunk (unsigned int id) const
 
SIZET GetSizeOfData (unsigned int id) const
 

The documentation for this class was generated from the following files: