6#if !defined(AFX_FACE_H__CA6BC29D_FAC2_11D1_A0DE_000000000000__INCLUDED_)
7#define AFX_FACE_H__CA6BC29D_FAC2_11D1_A0DE_000000000000__INCLUDED_
13#include "Collection.h"
16BEGIN_MOOTOOLS_NAMESPACE
18#define POINT_NOT_BELONG_TO_FACE -1
19#define EDGE_NOT_BELONG_TO_FACE -1
26 FACE_DUPLICATED_INDEX = 0x04,
31 CONDITION_BELONG_TO_NONE = 0x00,
32 CONDITION_BELONG_TO_SOME = 0x01,
33 CONDITION_BELONG_TO_ALL = 0x02,
45 FACE_IS_HIDDEN = 0x04,
52 FACE_IS_BORDER = 0x1000,
53 FACE_HAS_COPLANAR_NEIGHBOURG = 0x2000,
54 FACE_HAS_CONFUSED_POINTS = 0x4000,
59 FACE_USER_PROPERTIES1 = 0x01000000,
60 FACE_USER_PROPERTIES2 = 0x02000000,
61 FACE_USER_PROPERTIES3 = 0x04000000,
62 FACE_USER_PROPERTIES4 = 0x08000000,
81inline CFacePropertyData::CFacePropertyData()
116 unsigned int GetFaceIndex()
const;
117 unsigned int GetFlags()
const;
118 void SetFlags(
unsigned int flags);
120 bool IsOneFlagSet(
int flag)
const;
122 void SetFlags(
unsigned int flags,
bool set);
132 bool RemoveIndex(
int);
142 int GetPrevIndex(
int offset)
const;
143 int GetNextIndex(
int offset)
const;
149 void *GetDataChunk(
unsigned int id)
const;
150 SIZET GetSizeOfData(
unsigned int id)
const;
162inline unsigned int CFace::GetFaceIndex()
const
164 return GetEntryIndex();
167inline unsigned int CFace::GetFlags()
const
172inline void CFace::SetFlags(
unsigned int flags)
182 prop->flags &=
~flag;
185inline void CFace::SetFlags(
unsigned int newflags,
bool set)
195 return ((prop->flags &
flag) ==
flag);
198inline bool CFace::IsOneFlagSet(
int flag)
const
201 return ((prop->flags &
flag) != 0);
205inline int CFace::GetNextIndex(
int offset)
const
208 const int *
pts_data = GetData(size);
209 XASSERT(offset >=0 && offset < size);
214inline int CFace::GetPrevIndex(
int offset)
const
217 const int *
pts_data = GetData(size);
218 XASSERT(offset >=0 && offset < size);
219 return pts_data[(size+offset-1) % size];
228END_MOOTOOLS_NAMESPACE
FACE_PROPERTIES
Face flags used by any classes that inherit from CFace (C3DFace, CUVWFace...)
Definition Face.h:39
@ FACE_USER_SELECTED
Flag used for interacting with point list. This is a helper to keep FACE_IS_SELECTED flags is interac...
Definition Face.h:57
@ FACE_IS_DOUBLE_SIDED
Force double side display.
Definition Face.h:48
@ FACE_IS_SELECTED
Face computed properties.
Definition Face.h:49
@ FACE_NONE
These flags can be used whatever the face class.
Definition Face.h:40
@ FACE_IS_INVALID
This flag is used when a face a less than 3 indexes or when it is tagged invalid. Geometric faces tha...
Definition Face.h:43
@ FACE_IS_UNUSED
This flag is to be used in a dependent channel, meaning that the face should be ignored and does not ...
Definition Face.h:44
@ FACE_IS_TEMP_SELECTED
used by some algorithm to tag some faces. It must be reset to FALSE each time you need to use it.
Definition Face.h:55
@ FACE_IS_SINGLE_SIDED
Force single side display (cannot be used with FACE_IS_DOUBLE_SIDED)
Definition Face.h:47
CPt class is the base class for different class of points (C3DPoint, CUVWPoint...)
The class defines an x, y, z 3D point which can use int, float or double.
Definition 3DPoint.h:27
Definition Collection.h:30
Definition DataChunk.h:29
A CFace contains the information related to a given face in a CFaceList.
Definition Face.h:97
FLAGRESULT IsPointFlagSet(const CGeomInfo *info, unsigned int pointPropertiesFlags, bool set)
check how many points have one of the pointPropertiesFlags set or unset (call IsPointFlagSet internal...
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)
int IsFacePoint(int pointindex)
Check if point index belong to face. Return the index position of this pointindex or POINT_NOT_BELONG...
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,...
Definition Face.h:222
CFaceList is the common base class for a lot of different classes (C3DFaceList, CUVWFaceList....
Definition FaceList.h:179
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