Polygon Crucher SDK - Documentation
Documentation
All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
FaceList.h
Go to the documentation of this file.
1//! @file FaceList.h
2//! @brief CFaceList class is the base class for different kind of face list.
3//!
4//////////////////////////////////////////////////////////////////////
5
6#if !defined(AFX_FACELIST_H__CA6BC2A4_FAC2_11D1_A0DE_000000000000__INCLUDED_)
7#define AFX_FACELIST_H__CA6BC2A4_FAC2_11D1_A0DE_000000000000__INCLUDED_
8
9#ifdef _MSC_VER
10#pragma once
11#endif // _MSC_VER
12
13#include "DataChunk.h"
14#include "3DExtraData.h"
15#include "AssociationMap.h"
16#include "ElementArray.h"
17#include "Face.h"
18
19BEGIN_MOOTOOLS_NAMESPACE
20
21//! @enum FACELIST_PROPERTIES
22//! @brief some face list properties
24{
25 FACELIST_NONE = 0x00,
26 FACELIST_INTERNAL_FLAGS = 0xFFF00000,
27 FACELIST_ORDERED_FOR_RENDERING = 0x00100000,
28 FACELIST_MAT2FACE_INCLUDE_BACK = 0x00200000, // The material graph includes both front and back face materials
29 FACELIST_HAS_CHANGED = 0x00400000, //!< Should be set each time something important changed, in order to update internal graphs
30 FACELIST_SERIALIZE_FLAGS = FACELIST_ORDERED_FOR_RENDERING,
32
33//! @enum ConnectionInfoType
34//! @brief This enum allows to get a set of face indexes given two point indexes
35//! It is used by different methods such CFaceList::GetFacesConnectedToPoints or CFaceList::GetFacesNeighbourg
36typedef enum ConnectionInfoType XEnumType(unsigned int)
37{
38 //!< The following are used by CFaceList::GetFacesConnectedToPoints
39 CONNECTION_PT1_OR_PT2 = 1, //!< Union of faces shared by pt1 and pt2
40 CONNECTION_PT1_AND_PT2 = 2, //!< Intersection of faces shared by pt1 and pt2
41 CONNECTION_PT1_MINUS_PT2, //!< Faces shared by pt1 but not by pt2
42 CONNECTION_PT2_MINUS_PT1, //!< Faces shared by pt2 but not by pt1
43 CONNECTION_PT1_XOR_PT2, //!< All faces shared by pt1 xor pt2
44 CONNECTION_EDGE1 = 0x01, //!< Used by CFaceList::GetFacesByOppositeEdges
45 CONNECTION_EDGE2 = 0x02, //!< Used by CFaceList::GetFacesByOppositeEdges
46 CONNECTION_EXCLUDE_EDGE12 = 0x04, //!< Used by CFaceList::GetFacesByOppositeEdges
47 CONNECTION_BY_POINTS = CONNECTION_PT1_OR_PT2, //!< Get neighbourg faces of face index (CFaceList::GetFacesNeighbourg)
48 CONNECTION_BY_EDGES = CONNECTION_PT1_AND_PT2, //!< Get point indexes of any edges which contain point index (link by and edge) or get faces connected by an edge to face index (CFaceList::GetFacesNeighbourg)
49 CONNECTION_BY_FACES, //!< Get point indexes of any faces which contain point index (CFaceList::GetPointsNeighbourg only)
50 CONNECTION_BY_FACES_EXCLUDING_EDGE, //!< Get point indexes of any faces which contain point index minus the edges which contain point index (CFaceList::GetPointsNeighbourg only)
52
53// Default data chunk that can be added to a face list
54#define FACEPROPERTY_CHUNK MAKE_CUSTOM_ID('F', 'C', 'P', 'R')
55#define FACE_ORIGINAL_INDEX_CHUNK MAKE_CUSTOM_ID('F', 'A', 'O', 'I')
56#define FACE_SMOOTH_FLAG MAKE_CUSTOM_ID('F', 'A', 'S', 'F')
57#define FACE_SUB_MAT_FLAG MAKE_CUSTOM_ID('F', 'A', 'S', 'M')
58#define FACE_BACK_MATERIAL MAKE_CUSTOM_ID('B', 'K', 'M', 'T')
59#define FACETAG_DATA_CHUNK MAKE_CUSTOM_ID('F', 'C', 'T', 'G')
60
62{
63 DECLARE_SERIAL_XOBJECT(CFacePropertyMethods);
64
65 SIZET GetSizeof() const;
66 ElementType GetType() const;
67 ElementType GetBaseType() const;
68 void ConstructElement(void* pNewData);
69};
70
72{
73protected:
74 int point1;
75 int point2;
76
77public:
78 C3DEdge();
79 C3DEdge(int point1, int point2);
80 int Point1() const;
81 int Point2() const;
82
83 void SetMatchLessEdge(int point1, int point2);
84 void SetEdge(int point1, int point2);
85 C3DEdge& operator=(const C3DEdge& edge);
86 bool operator<(const C3DEdge& edge);
87 bool operator==(const C3DEdge& edge) const;
88 bool operator!=(const C3DEdge& edge) const;
89};
90
91//! @class CFaceGraphHelper
92//! @brief This class allows to increase performance on repetitive calls to specific CFaceList methods.
93class DLL_3DFUNCTION CFaceGraphHelper
94{
95 friend CFaceList;
96
97public:
99 virtual ~CFaceGraphHelper();
100
101 void ReleaseArray(const int *connections); //!< To be call once do not need any more indexes returned by the method using the CFaceGraphHelper.
102
103protected:
104#ifdef _DEBUG
105 bool lock;
106#endif
107
108 CHashTable<int> hash;
109 int *connections;
110 unsigned int connectionsSize;
111
112 int *GetArray(unsigned int size);
113};
114
115//! @class CFaceTagger
116//! @brief CFaceTagger is the base class that allows to gather face together using C3DFaceList::TagFaces.
117//! @details Derive this class to have your own control on the way face are gathered together.
118class DLL_3DFUNCTION CFaceTagger
119{
120 friend CFaceList;
121
122protected:
123 CGeomInfo *info;
124 CPointList *points;
125 CFaceList *faces;
126
127 // initialized before calling BelongToGroup
128public:
129 virtual ~CFaceTagger();
130
131 //! Default implementation return true
132 virtual bool InitProcess(CGeomInfo *info);
133 //! Default implementation does nothing
134 virtual void EndProcess(unsigned int createdGroup);
135
136 //! @brief BeginNewGroup is called when a new group is to be created.
137 //! @details Groupnbr is the number of the group, firstface is the first face of the group
138 //! default implementation does nothing
139 virtual void BeginNewGroup(unsigned int groupnbr, unsigned int firstface);
140
141 //! @name BelongToGroup check if some faces belong to the #face group
142 //! @details You decide if a face belong to a group or not using your own criteria and goal
143 //! * Returns false if the given face should not belong to #face group\n
144 //! * Returns true if it belongs to #face group\n
145 //! You can exclude some of the provided faces to be part of the group. In such case simply set faces[i] = -1\n
146 //! Faces you let belong to the group will be enqueued, so you'll be asked by propagation if their connections belong to the same group too.\n
147 //! Faces you exclude from the group will be excluded from the group but process laterly in a different group.\n\n
148 //! * The default implementation returns true, without excluding any faces to belong to the group.\n
149 //! Doing that all connected faces belong to the group.\n
150 //! This implementation automatically creates group of faces connected by edges, or group of faces connected by points\n
151 //!
152 //! * If you return false, following your own criteria, a new group will begin and the process continue until all faces have been assigned to its specific group.
153 //! @{
154 virtual bool BelongToGroup(unsigned int face, C3DEdge& edge, int *faces, unsigned int size); //!< Called when exploreByEdge= true in C3DFaceList::TagFaces.\n faces is an array of size face indexes connected by an edge to face.\n Return true by default
155 virtual bool BelongToGroup(unsigned int face, unsigned int point, int *faces, unsigned int size); //!< Called when exploreByEdge= false. faces is an array of size face indexes connected to faces points.\n C3DFaceList::TagFaces.\n Return true by default
156
157 //! @}
158
159 //! @brief ProcessGroup validates a group of face that belong to the same group.
160 //! @brief This group contains size elements
161 virtual void ProcessGroup(const int *faces, unsigned int size) = 0;
162};
163
164#define FACELIST_DEFAULT_INDEX_NBR 4
165
166class CSingleFace;
167
168//! @class CFaceList
169//! @brief CFaceList is the common base class for a lot of different classes (C3DFaceList, CUVWFaceList...)
170//! @details Every faces is an index array (of at least 3 indexes) that refers to another list (usually points or vectors).
171//! Faces are gather together in a CFaceList, which is in fact an array of array.
172//!
173//! CFaceList offers all methods to get/set the face indexes, to modify these indexes and associates any kind of data to faces\n
174//! CFaceList includes different relationship graph to find easily who is connected with who.
175//! Cf. @ref FACES to get advanced details on the way using CFaceList.
176//!
177//! @note As CFaceList inherits from CInstanciatedObject, it can be referenced multiple time. Use CPointList::Delete instead of delete to delete the list.
178class DLL_3DFUNCTION CFaceList : public CXObject, public CInstanciatedObject
179{
180 DECLARE_DYNAMIC_XOBJECT(CFaceList);
181
182public:
183 //! @enum SetSizeMode
184 //! Defines the way SetSize size down or not the index memory block
186 {
187 DEFAULT = 0, //!< Memory block is shrink down if specified size is below existing size
188 FREE_EXTRA, //!< Free any extra memory and do not allocate any extra memory
189 //!< The number of face is growing, but we don't know the exact size.
190 //!< Preallocate is first called with an estimated #number of faces, SetSize is then called several time with and increasing number of face (GROW_MODE),
191 //!< and finally called a last time with the definitive number of face.
192 GROW_MODE,
193 };
194
195 //!< Create a new face list. When srcFaces is provided, the data structure (datachunks) is inherited but the face list is created empty
197
198 virtual CFace *CreateFace() const = 0; //!< Get a face object the appropriate derived face type (ie it will return a C3DFace, with C3DFaceList, CNormalFace with CNormalFaceList...). Call CFaceList::ReleaseFace when you do not need it anymore
199 void ReleaseFace(CFace *face) const; //!< Release a face created with CFaceList::CreateFace
200
201 bool GetFace(unsigned int index, CFace& face) const;
202 bool GetFace(unsigned int index, CFace& face);
203 int *GetIndexes(unsigned int index, int& size) const;
204 int IsFaceIndex(unsigned int faceindex, int pointindex) const; //!< Check if point index belong to face. Return the index position of this pointindex or POINT_NOT_BELONG_TO_FACE) const;
205 int* SetFaceSize(unsigned int index, int size, FACE_PROPERTIES invalidFlag = FACE_IS_INVALID); //!< Set the number of indexes for the given face index. 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
206 unsigned int GetFaceFlags(unsigned int index) const;
207 bool IsFaceFlagSet(unsigned int index, FACE_PROPERTIES flag) const;
208 bool CheckFaceFlags(unsigned int index, unsigned int flags, bool allSetOrNoneSet) const;
209 bool IsFaceOneFlagSet(unsigned int index, unsigned int flags) const;
210 void SetFaceFlag(unsigned int index, FACE_PROPERTIES flag, bool set);
211 void SetFaceFlags(unsigned int index, unsigned int flags, bool set);
212 int CollectIndexes(unsigned int index, CHashTable<int>& hash, bool erase = false) const; //!< Add the face indexes to the hash, and return the adedd count
213
214 bool CopyFace(unsigned int dstindex, unsigned int srcindex, bool inheritPropertiesOnly = false); //!< Copy srcindex face to dstindex face. inheritPropertiesOnly = true means only flags and properties are copied, otherwise indexes are also copied.
215 bool CopyFace(unsigned int dstindex, unsigned int srcindex, const CFaceList& srcfacelist, bool inheritPropertiesOnly = false); //!< Copy a face from another face list.
216 bool CopyFace(unsigned int dstindex, const CFace& srcface, bool inheritPropertiesOnly = false);
217
218 // Save a particular face outside the face list
219 void CopyTo(int index, CSingleFace& face) const;
220 void CopyFrom(int index, const CSingleFace& face);
221
222 // Element access
223 virtual void Serialize(CXArchive& ar);
224 void RemoveAll();
225
226 //! @brief Preallocate the data with an estimated face nbr and total indexes count for the whole face set. The method removes any existing data.
227 //! @details When filling the faces, SetSize must be called using GROW_MODE, otherwise faces array will be resized, loosing the preallocation advantages
228 //! use constructAllElementsOnce carefully as it construct all elements (even if they are not used)
230 void SetSize(int size, SetSizeMode sizeMode, int defaultFaceSize = FACELIST_DEFAULT_INDEX_NBR); //!< Resize the size of the number of face. If growOnly, memory is not reallocated if buffer's size decrease
231 void SetSize(int size, int defaultFaceSize = FACELIST_DEFAULT_INDEX_NBR, SetSizeMode sizeMode = DEFAULT, int growFaceMode = -1); //!< Resize the size of the number of face. If growOnly, memory is not reallocated if buffer's size decrease
232 void SetSize(int size, unsigned int *initialSize, int defaultFaceSize = FACELIST_DEFAULT_INDEX_NBR, int growFaceMode = -1); //!< This reset the face and initialize it again
233 void SetSize(const CFaceList& srcfaces, int growFaceMode = -1); //!< Reset face list and get faces size from srcfaces face list. No data is copied, only size are preallocated
234 void ExpandSize(const CFaceList& srcfaces); //!< Expand the face list with srcfaces sizes. No data is copied, only size are preallocated. The method grows the faces (if needed), so CFaceList::PreAllocate can be used
235 void FreeExtra();
236
237 bool RemoveDataChunk(DataChunkID id); //!< Remove the data chunk specified by its id
238 unsigned int AddDataChunk(DataChunkID id, CElementMethods *methods); //!< Add a data chunk defined by an id and methods which give the way to construct / destroy the data chunk data.
239 void *GetDataChunk(DataChunkID id, unsigned int index) const; //!< Return the data chunk for index face. The returned data can be cast accordingly giving the data chunk id.
240 CFacePropertyData *GetMainDataChunk(unsigned int index) const; //!< return the main data chunk for index. The main data chunk is a chunk like another one, but with faster access. It contains the flags, and it can be cast to C3DFacePropertyData, as it also contain the material
241 void AppendDataChunks(CFaceList *srcFaces, bool copyEmpty = true); //!< Copy the data chunks that exists in the provided srcFaces list. If copyEmpty = true, the data chunk are created empty. Otherwise they are copied from the source face list.
242 unsigned int GetDataChunkNbr() const; //!< Return the number of data chunk in the face list
243 const CDataChunk& GetDataChunks() const; //!< Return the class that handles the data chunks.
244 SIZET GetSizeOfData(DataChunkID id) const; //!< Return the data size of one element of the given data chunk.
245
246#ifdef _DEBUG
247 unsigned int CountElements() const;
248 virtual void Dump() const;
249 unsigned int MemoryStats() const;
250 virtual CXString GetFaceListType() const = 0;
251#endif
252
253 int GetSize() const; //!< Return the number of faces of the list
254
255 void SaveFacesIndex(unsigned int dataChunkID = FACE_ORIGINAL_INDEX_CHUNK); //!< Save face indexes in a specific FACE_ORIGINAL_INDEX_CHUNK data chunk. Face index can be retrieve after, after a process that delete some faces or reorder them.
256 unsigned int GetOriginalIndex(unsigned int index, unsigned int dataChunkID = FACE_ORIGINAL_INDEX_CHUNK) const; //!< Retrieve the original index of the face
257
258// int GetConnectedFaceGroup(const CGeomInfo *info, CHashAssocMap<int, int, int>& faceGroup, ConnectionInfoType mode, FACE_PROPERTIES flag = FACE_NONE, bool set = TRUE);
259 bool AreFacesConnected(const CGeomInfo *info, CHashTable<int>& facesSet);
260// bool MergeFaces(const CGeomInfo *info, CFace& mergeFace, CHashTable<int>& facesToMerge);
261 void GetEdgesOnBorder(CEdgeGraph& borderMap, CHashTable<int>& faces);
262 void FlipFaces(FACE_PROPERTIES properties = FACE_NONE, bool musthave = true); //!< Reverse the indexes order. For a 3D face, a side effect is the normal inversion
263
264 //! @brief Create group of faces which points/edges are delimited by a given property.
265 //! @details This property is implemented by the caller through the faceTagger method.
266 //! * exploreByEdge = true\n
267 //! the faces are explored using an edge connection\n
268 //! * exploreByEdge = false\n
269 //! the faces are explored using a point connection.\n
270 //! this is the slowest exploration mode as CFaceTagger::BelongToGroup is called for each face corner
271 //!
272 //! @return The method returns the number of created group.
273 unsigned int TagFaces(CGeomInfo *info, CFaceTagger& faceTagger, bool exploreByEdge); //!< Gather face together in a CFaceTagger object.
274
275 bool Clean(const CGeomInfo *info); //!< Clean faces with FACE_IS_INVALID status defined
276 bool Clean(const CGeomInfo *info, bool cleanFaces, CXUIntArray *newfacesindex = NULL); //!< Clean faces with FACE_IS_INVALID status defined and get an array contains the new to old index position (useful to clean external data too).
277 bool ReorderFaces(const unsigned int *neworder, unsigned int size, bool moveToDestinationIndexes); //!< Reorder faces given the order specified by neworder. If moveToDestinationIndexes is true : Face[0] goes to face[neworder[0]], otherwise Face[neworder[0]] goes to face[0]. -1 in the array means no order changes.
278 bool UpdateIndex(const unsigned int *newpointindex, unsigned int bufsize, bool onlyValidFaces = true); // Replace index using newpointindex information which size is bufsize (usually same than number of faces). For example index #0 will be newpointindex[0] after the call. newpointindex[i] can be egal to -1, meaning no change (equal to newpointindex[i] = i).
279 bool UpdateIndex(CXUIntArray *newpointindex, bool onlyValidFaces = true); //!< Same method with a CXUIntArray class
280 // int ReplaceIndex(const CGeomInfo *info, int replaceWithIndex, int *replacedIndexes, unsigned int size);
281
282 // List informations
283 void SetSizeAndFlags(int newsize, unsigned int flags); //!< Set face size and flags
284 void SetSizeAndFlags(const CFaceList& faces, unsigned int flags); //!< Set faces which size are the same than provided faces list and set flags for these faces.
285 void ExpandSizeAndFlags(const CFaceList& faces, unsigned int flags); //!< Increase face size and set flags for the new faces
286
287 void SetFlag(FACELIST_PROPERTIES flag, bool set); //<! Set face list flag
288 bool IsFlagSet(FACELIST_PROPERTIES flag) const; //<! Retrieve face list flag
289 unsigned int GetChangedStamp() const; // Return a value that can be used to know if the list changed (value changed each time FACELIST_HAS_CHANGED set)
290
291 bool IsTriangular(FACE_PROPERTIES properties = FACE_NONE, bool musthave = true) const; // Returns true if the face list contains triangles with the given optional properties. The function returns false if it has at least one valid not triangular face. It returns false, if there is no face or only triangles with the provided properties.
292 bool HasQuadrangle(FACE_PROPERTIES properties = FACE_NONE, bool musthave = true) const; // Returns true if the face list contains at least one face with more than 4 points and the given properties (or no specific properties if properties = FACE_NONE)
293 bool HasNGons(FACE_PROPERTIES properties = FACE_NONE, bool musthave = true) const; // Returns true if the face list contains at least one face with more than 4 points and the given properties (or no specific properties if properties = FACE_NONE)
294 unsigned int GetFaceCount(unsigned int edgenbr, FACE_PROPERTIES properties = FACE_NONE, bool musthave = true) const; // Returns the number of face with the given properties and edgenbr. If edgenbr = -1, return the number of face > 4 edges
295 unsigned int GetIndexesCount(FACE_PROPERTIES properties = FACE_NONE, bool musthave = true) const;
296
298 int GetNumberOfFaces(FACE_PROPERTIES, bool set) const;
299 int GetNumberOfFaces(unsigned int property, bool set) const; // Return the number of faces that have at least one flag set.
300 void SetFacesFlags(unsigned int first, unsigned int last, unsigned int flags, bool set);
301 void SetFacesFlags(unsigned int flags, bool set);
302 void SetFacesSize(unsigned int facesize);
303
304 const C3DEdgeArray* InitEdgeArray(); //!< Always return an array (even if empty) containing all edge of the face list, without connection information.
305 void DeleteEdgeArray(); //!< A call to DeleteEdgeArray must be balanced for each call to InitEdgeArray
306
307 int InitEdgeToFaceGraph(const CGeomInfo *info); //!< Init Edge graph which is a map containing each different edge and their connections. Return the number of edges of the graph. Needed for any methods that required information about connections.
308 void DeleteEdgeToFaceGraph(); //!< Release the edge graph when no longer needed. Any call to InitEdgeToFaceGraph must be followed by a call to DeleteEdgeToFaceGraph
309
310 const int *GetFacesConnectedToEdge(const C3DEdge&, int& size); //!< Get faces connected to an edge. The returned array has size indexes.
311 CEdgeGraph& GetEdgeGraph(void); //!< Get the CEdgeGraph
312 void SetBorderFacesStatus(void);
313
314 int InitPointToFaceGraph(const CGeomInfo *info); //<! Init a point to face graph that informs about which point is connected to which face. Return the number of entry in the point to face graph, which is the number of points, unless some faces are invalid
315 void DeletePointToFaceGraph(); //!< Release the point to face graph. Any call to InitPointToFaceGraph must be followed by a call to DeletePointToFaceGraph
316 bool HasPointToFaceGraph() const; //!< Return true if the point to face graph is computed
317
318 //int *GetFacesConnectedToFace(int, int& size);
319 const int *GetFacesNeighbourg(CFaceGraphHelper& helper, int faceindex, ConnectionInfoType type, int& size);
320 int GetFacesNeighbourg(CHashTable<int>& hash, int faceindex, ConnectionInfoType type, bool clearhash);
321 const int *GetFacesConnectedToPoint(int, int& size) const;
322 int GetFacesConnectedToPoints(CHashTable<int>& hash, int point1, int point2, ConnectionInfoType type, bool clearhash) const;
323 const int *GetFacesConnectedToPoints(CFaceGraphHelper& helper, int point1, int point2, ConnectionInfoType type, int& size) const;
324 int GetPointsConnectedToPoints(CHashTable<int>& hash, int point1, int point2, ConnectionInfoType type);
325 const int *GetPointsConnectedToPoints(CFaceGraphHelper& helper, int point1, int point2, ConnectionInfoType type, int& size);
326 const int *GetPointsConnectedToEdge(CFaceGraphHelper& helper, int point1, int point2, int& size, bool excludePt1AndPt2);
327 const int *GetPointsNeighbourg(CFaceGraphHelper& helper, int pointindex, int& size, ConnectionInfoType type);
328 bool IsPointNeighbourg(CFaceGraphHelper& helper, int index, int isNeighbourgIndex);
329 bool DoesEdgeExists(const C3DEdge& edge, int face = -1) const;
330 int GetFacesByOppositeEdges(CFaceGraphHelper& helper, int point1, int point2, ConnectionInfoType type, CEdgeGraph& edgeGraph);
331 bool IsIsolatedFace(int facenbr) const;
332
333 // Update the point to face graph when it exists
334 int GraphRemoveFaceReference(CGeomInfo *info, int faceindex, bool setAlonePointsToInvalid);
335 int GraphMergePointConnectivity(int, int);
336 bool GraphDisconnectFace(int ptindex, int faceindex);
337 bool GraphConnectFace(int ptindex, int faceindex);
338
339 virtual unsigned int GetChecksum(unsigned int checksumFlags = CHECKSUM_FACES | CHECKSUM_FACES_EXTRA) const; //!< Return a value that is a simple way to check if the geometry changed between two call to the method
340
341 // virtual function
342 virtual void Inherit(const CFaceList& reffaces);
343 virtual CFaceList& operator=(const CFaceList& reffaces);
344
345private:
346 int size;
348 CDataChunk dataChunks;
349
350 // Point to face graph
352 CFaceGraph *faceGraph;
353 int faceGraphLock;
354
355 // Edge to face graph
356 CEdgeGraph *edgeGraph;
357 int edgeGraphLock;
358
359 // Edge array
360 C3DEdgeArray* edgeArray;
361 int edgeArrayLock;
362
363 CHashTable<int> *hashConnectionSet; // Hash for GetConnectionSet
364
365 int GetConnectionSet(CHashTable<int>& hashConnections, const int *pt1data, const int *pt2data, int size1, int size2, ConnectionInfoType type);
366
367protected:
368 unsigned int changeStamp;
369 unsigned int flags;
370
371 virtual ~CFaceList(); // Use Delete instead
372
373 // protected Methods
374 void CleanPointsIndex(const CGeomInfo *info);
375
376 // Virtual protected methods
377 virtual bool UpdateList();
378
379 // Protected point graph
380 void CreatePointToFaceGraph(const CGeomInfo *info);
381
382 // Protected edge graph
383 void CreateEdgeToFaceGraph();
384};
385
386// Allow to save a face outside a face for a temporary usage.
387class DLL_3DFUNCTION CSingleFace
388{
389 friend CFaceList;
390
391protected:
393 CDataChunk dataChunks;
394
395 void SetList(const CFaceList& list);
396
397public:
398 CSingleFace(const CFaceList& list);
399};
400
401///////////////////////////////////////////////////////////////////////////////////
402// CFacePropertyMethods
403inline SIZET CFacePropertyMethods::GetSizeof() const
404{
405 return sizeof(CFacePropertyData);
406}
407
408inline ElementType CFacePropertyMethods::GetType() const
409{
410 return MAKE_CUSTOM_ID('F', 'A', 'C', 'E');
411}
412
413inline ElementType CFacePropertyMethods::GetBaseType() const
414{
415 return MAKE_CUSTOM_ID('F', 'A', 'C', 'E');
416}
417
418inline void CFacePropertyMethods::ConstructElement(void* pNewData)
419{
420 xConstruct(CFacePropertyData, pNewData);
421}
422
423///////////////////////////////////////////////////////////////////////////////////
424// C3DEdge
426{
427#ifdef _DEBUG
428 lock = false; // lock can be FALSE (ie. CFaceList::GetFacesConnectedToPoints)
429 XASSERT(!refconnections || refconnections == this->connections);
430#endif
431}
432
433///////////////////////////////////////////////////////////////////////////////////
434//! @class C3DEdge
435//! @brief C3DEdge is a class containing 2 point indexes that represent the edge of a face.
436//! @note
437//! The points are ordered for making comparison easier. That means that C3DEdge::point1 < C3DEdge::point2\n
438//! If you need unordered edge, use C3DEdge::SetMatchLessEdge. C3DEdge::operator == cannot be used with such edges
439inline C3DEdge::C3DEdge()
440{
441}
442
443inline void C3DEdge::SetEdge(int refpoint1, int refpoint2)
444{
445#ifdef _DEBUG
446 if (refpoint1 == refpoint2)
447 XTRACE("SetEdge point1 == point2\n");
448#endif
449
450 if (refpoint1 < refpoint2)
451 {
452 this->point1 = refpoint1;
453 this->point2 = refpoint2;
454 }
455 else
456 {
457 this->point1 = refpoint2;
458 this->point2 = refpoint1;
459 }
460}
461
462inline C3DEdge::C3DEdge(int refpoint1, int refpoint2)
463{
464 SetEdge(refpoint1, refpoint2);
465};
466
467inline int C3DEdge::Point1() const
468{
469 return point1;
470}
471
472inline int C3DEdge::Point2() const
473{
474 return point2;
475}
476
477inline void C3DEdge::SetMatchLessEdge(int refpoint1, int refpoint2)
478{
479 // The operator == cannot be used with such edge
480 // But this is useful in another case, ie for symetric edge
481 // e1 = Edge(a,b), e2 = Sym(e1)
482 // SetMatchLessEdge, allows to know that e1.point1 = Sym(e2.point1) and e1.point2 = Sym(e2.point2)
483 this->point1 = refpoint1;
484 this->point2 = refpoint2;
485}
486
487inline C3DEdge& C3DEdge::operator=(const C3DEdge& edge)
488{
489 this->point1 = edge.point1;
490 this->point2 = edge.point2;
491
492 return *this;
493}
494
495inline bool C3DEdge::operator<(const C3DEdge& edge)
496{
497 if (point1 < edge.point1)
498 return true;
499
500 return false;
501}
502
503inline bool C3DEdge::operator==(const C3DEdge& edge) const
504{
505 // Pair are ordered (point1 < point2)
506 if (point1 == edge.point1 && point2 == edge.point2)
507 return true;
508
509 return false;
510};
511
512inline bool C3DEdge::operator!=(const C3DEdge& edge) const
513{
514 // Pair are ordered (point1 < point2)
515 if (point1 != edge.point1)
516 return true;
517
518 if (point2 != edge.point2)
519 return true;
520
521 return false;
522};
523
524// This hash value does not work with unordered pairs (C3DEdge(point1 = 3, point2 = 8) and C3DEdge(point1 = 8, point2 = 3) does not give the same hash)
525template <> class CHashMethods<C3DEdge>
526{
527public:
528 static inline unsigned int HashValue(const C3DEdge &edge)
529 {
530 #ifdef OLD_HASH_FUNCTIONS
531 return ((unsigned int)(edge.Point1() << 8)) + edge.Point2();
532 #else
533 return HashMixValue(edge.Point1()) + edge.Point2();
534 #endif
535 }
536
537 static inline bool HashCompare(const C3DEdge &edge1, const C3DEdge &edge2)
538 {
539 // Pair are ordered (point1 < point2)
540 if (edge1.Point1() != edge2.Point1() || edge1.Point2() != edge2.Point2())
541 return false;
542
543 return true;
544 }
545};
546
547///////////////////////////////////////////////////////////////////////////////////
548// CFaceList
549inline int CFaceList::GetSize() const
550{
551 return size;
552}
553
554inline void CFaceList::ReleaseFace(CFace *face) const
555{
556 xDelete(face);
557}
558
559inline bool CFaceList::GetFace(unsigned int index, CFace& face) const
560{
561 if (index >= ptsIndex.GetEntriesSize())
562 return false;
563
564 ((CFace&)face).faces = (CFaceList *)this; // Not really safe. Should be NULL ?
565 ptsIndex.GetEntry(index, face);
566 face.prop = (CFacePropertyData *)dataChunks.GetMainData(index);
567
568 return true;
569}
570
571inline bool CFaceList::GetFace(unsigned int index, CFace& face)
572{
573 if (index >= ptsIndex.GetEntriesSize())
574 return false;
575
576 face.faces = this;
577 ptsIndex.GetEntry(index, face);
578 face.prop = (CFacePropertyData *)dataChunks.GetMainData(index);
579
580 return true;
581}
582
583// Note: this method is to be use with care, as it does not perform any check on the provided data.
584// The face might have the FACE_IS_UNUSED or FACE_IS_INVALID flag
585inline int *CFaceList::GetIndexes(unsigned int index, int& refsize) const
586{
587 XASSERT(index < ptsIndex.GetEntriesSize());
588 return ptsIndex.GetEntry(index, refsize);
589}
590
591inline int CFaceList::IsFaceIndex(unsigned int faceindex, int pointindex) const
592{
593 if (faceindex >= ptsIndex.GetEntriesSize())
594 return POINT_NOT_BELONG_TO_FACE;
595
596 int size;
597 const int *points_data = ptsIndex.GetEntry(faceindex, size);
598 for (int i = 0; i < size; i++)
599 {
600 if (points_data[i] == pointindex)
601 return i;
602 }
603
604 return POINT_NOT_BELONG_TO_FACE;
605}
606
607inline int* CFaceList::SetFaceSize(unsigned int index, int refsize, FACE_PROPERTIES invalidFlag)
608{
609 XASSERT(index < ptsIndex.GetEntriesSize());
610 SetFaceFlag(index, invalidFlag, refsize < 3);
611 return ptsIndex.SetEntrySize(index, refsize);
612}
613
614inline unsigned int CFaceList::GetFaceFlags(unsigned int index) const
615{
616 if (index >= ptsIndex.GetEntriesSize())
617 return FACE_NONE;
618
619 return ((CFacePropertyData *)dataChunks.GetMainData(index))->flags;
620}
621
622inline bool CFaceList::IsFaceFlagSet(unsigned int index, FACE_PROPERTIES flag) const
623{
624 if (index >= ptsIndex.GetEntriesSize())
625 return false;
626
627 CFacePropertyData *prop = (CFacePropertyData *)dataChunks.GetMainData(index);
628 return ((prop->flags & flag) == flag);
629}
630
631inline bool CFaceList::CheckFaceFlags(unsigned int index, unsigned int checkflags, bool allSetOrNoneSet) const
632{
633 if (index >= ptsIndex.GetEntriesSize())
634 return false;
635
636 CFacePropertyData *prop = (CFacePropertyData *)dataChunks.GetMainData(index);
637
638 if (allSetOrNoneSet && ((prop->flags & checkflags) == checkflags))
639 return true;
640 else if (!allSetOrNoneSet && ((prop->flags & checkflags) == 0))
641 return true;
642
643 return false;
644}
645
646inline void CFaceList::SetFaceFlag(unsigned int index, FACE_PROPERTIES flag, bool set)
647{
648 if (index >= ptsIndex.GetEntriesSize())
649 return;
650
651 CFacePropertyData *prop = (CFacePropertyData *)dataChunks.GetMainData(index);
652 if (set)
653 prop->flags |= flag;
654 else
655 prop->flags &= ~flag;
656}
657
658inline void CFaceList::SetFaceFlags(unsigned int index, unsigned int refflags, bool set)
659{
660 if (index >= ptsIndex.GetEntriesSize())
661 return;
662
663 CFacePropertyData *prop = (CFacePropertyData *)dataChunks.GetMainData(index);
664 if (set)
665 prop->flags |= refflags;
666 else
667 prop->flags &= ~refflags;
668}
669
670inline bool CFaceList::IsFaceOneFlagSet(unsigned int index, unsigned int refflags) const
671{
672 if (index >= ptsIndex.GetEntriesSize())
673 return false;
674
675 CFacePropertyData *prop = (CFacePropertyData *)dataChunks.GetMainData(index);
676 return ((prop->flags & refflags) != 0);
677}
678
679// inheritPropertiesOnly = true means that only the flags and properties are copied. The face indexes and size are not modified. If the face is empty, it remains empty
680// inheritPropertiesOnly = false means that the whole face is copied (indexes and properties)
681//
682// Do not use this method if a CFace exists for the list. It might become invalid if reallocation occurs
683// Prefer CFace::Copy() instead or use GetFace(dstindex) after the call to the method
684inline bool CFaceList::CopyFace(unsigned int dstindex, unsigned int srcindex, bool inheritPropertiesOnly)
685{
686 if (dstindex == srcindex)
687 return true;
688
689 dataChunks.CopyData(dstindex, srcindex, dataChunks);
691 return true;
692
693 ptsIndex.SetEntry(dstindex, srcindex);
694 return true;
695}
696
697// inheritPropertiesOnly = true means that only the flags and properties are copied. The face indexes and size are not modified. If the face is empty, it remains empty
698// inheritPropertiesOnly = false means that the whole face is copied (indexes and properties)// Slowest method, because it create a CFace accessor each time its called
699//
700// use CopyFace(CFace& dstface, const CFace& srcface) when possible
701inline bool CFaceList::CopyFace(unsigned int dstindex, unsigned int srcindex, const CFaceList& srcfacelist, bool inheritPropertiesOnly)
702{
703 dataChunks.CopyData(dstindex, srcindex, srcfacelist.dataChunks);
705 return true;
706
707 int tmpsize;
708 int *indexes = srcfacelist.ptsIndex.GetEntry(srcindex, tmpsize);
709 if (!indexes)
710 return false;
711
712 ptsIndex.SetEntry(dstindex, indexes, tmpsize);
713 return true;
714}
715
716// inheritPropertiesOnly = true means that only the flags and properties are copied. The face indexes and size are not modified. If the face is empty, it remains empty
717// inheritPropertiesOnly = false means that the whole face is copied (indexes and properties)
718//
719// If srcface belong to the face list, it might become invalid if reallocation occurs
720// Prefer CFace::Copy() instead or use GetFace after the call to the method
721inline bool CFaceList::CopyFace(unsigned int dstindex, const CFace& srcface, bool inheritPropertiesOnly)
722{
723 dataChunks.CopyData(dstindex, srcface.GetEntryIndex(), srcface.faces->dataChunks);
725 return true;
726
727 ptsIndex.SetEntry(dstindex, srcface);
728 return true;
729}
730
732{
733 return dataChunks;
734}
735
736inline unsigned int CFaceList::GetOriginalIndex(unsigned int index, unsigned int dataChunkID) const
737{
738 COriginalIndexData *data = (COriginalIndexData *)dataChunks.GetData(dataChunkID, index);
739 if (data)
740 return data->index;
741
742 return -1;
743}
744
745///////////////////////////////////////////////////////////////////////////////////
746// CFacePropertyData Inline implementation
747
748inline CFacePropertyData *CFaceList::GetMainDataChunk(unsigned int index) const
749{
750 return static_cast<CFacePropertyData *>(dataChunks.GetMainData(index));
751}
752
753inline void *CFaceList::GetDataChunk(unsigned id, unsigned int index) const
754{
755 return dataChunks.GetData(id, index);
756}
757
758inline SIZET CFaceList::GetSizeOfData(unsigned id) const
759{
760 return dataChunks.GetSizeOfDataChunk(id);
761}
762
763///////////////////////////////////////////////////////////////////////////////////
764// CFace Inline implementation (method with reference to CFaceList only)
765inline bool CFace::Copy(const CFace& srcface)
766{
768 return faces->CopyFace(GetEntryIndex(), srcface, true);
769}
770
771inline bool CFace::Copy(unsigned int srcindex)
772{
774 return faces->CopyFace(GetEntryIndex(), srcindex, true);
775}
776
777inline void CFace::Inherit(const CFace& face)
778{
779 faces->CopyFace(GetEntryIndex(), face, true);
780}
781
782inline void *CFace::GetDataChunk(unsigned int id) const
783{
784 return faces->GetDataChunk(id, GetEntryIndex());
785}
786
787inline SIZET CFace::GetSizeOfData(unsigned int id) const
788{
789 return faces->GetSizeOfData(id);
790}
791
792
793END_MOOTOOLS_NAMESPACE
794
795#endif // !defined(AFX_FACELIST_H__CA6BC2A4_FAC2_11D1_A0DE_000000000000__INCLUDED_)
This file contains implementation of different extra data information that can be attached through CP...
@ CHECKSUM_FACES_EXTRA
faces material & flags (geometry and channel if CHECKSUM_CHANNELS set)
Definition 3DType.h:431
@ CHECKSUM_FACES
faces position (geometry and channel if CHECKSUM_CHANNELS set)
Definition 3DType.h:430
An advanced array class containing data that needs to be construct / destruct.
FACE_PROPERTIES
Face flags used by any classes that inherit from CFace (C3DFace, CUVWFace...)
Definition Face.h:39
@ 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
ConnectionInfoType
This enum allows to get a set of face indexes given two point indexes It is used by different methods...
Definition FaceList.h:37
@ CONNECTION_BY_FACES
Get point indexes of any faces which contain point index (CFaceList::GetPointsNeighbourg only)
Definition FaceList.h:49
@ CONNECTION_BY_POINTS
Get neighbourg faces of face index (CFaceList::GetFacesNeighbourg)
Definition FaceList.h:47
@ CONNECTION_PT1_MINUS_PT2
Faces shared by pt1 but not by pt2.
Definition FaceList.h:41
@ CONNECTION_EDGE2
Used by CFaceList::GetFacesByOppositeEdges.
Definition FaceList.h:45
@ CONNECTION_PT1_OR_PT2
The following are used by CFaceList::GetFacesConnectedToPoints.
Definition FaceList.h:39
@ CONNECTION_PT1_AND_PT2
Intersection of faces shared by pt1 and pt2.
Definition FaceList.h:40
@ CONNECTION_EDGE1
Used by CFaceList::GetFacesByOppositeEdges.
Definition FaceList.h:44
@ CONNECTION_EXCLUDE_EDGE12
Used by CFaceList::GetFacesByOppositeEdges.
Definition FaceList.h:46
@ CONNECTION_PT2_MINUS_PT1
Faces shared by pt2 but not by pt1.
Definition FaceList.h:42
@ CONNECTION_BY_EDGES
Get point indexes of any edges which contain point index (link by and edge) or get faces connected by...
Definition FaceList.h:48
@ CONNECTION_PT1_XOR_PT2
All faces shared by pt1 xor pt2.
Definition FaceList.h:43
@ CONNECTION_BY_FACES_EXCLUDING_EDGE
Get point indexes of any faces which contain point index minus the edges which contain point index (C...
Definition FaceList.h:50
FACELIST_PROPERTIES
some face list properties
Definition FaceList.h:24
@ FACELIST_HAS_CHANGED
Should be set each time something important changed, in order to update internal graphs.
Definition FaceList.h:29
C3DEdge is a class containing 2 point indexes that represent the edge of a face.
Definition FaceList.h:72
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
CElementMethods is provided to CElementArray and give some information on the data as well as the met...
Definition ElementArray.h:22
This class allows to increase performance on repetitive calls to specific CFaceList methods.
Definition FaceList.h:94
void ReleaseArray(const int *connections)
To be call once do not need any more indexes returned by the method using the CFaceGraphHelper.
Definition FaceList.h:425
A CFace contains the information related to a given face in a CFaceList.
Definition Face.h:97
void Inherit(const CFace &srcface)
Inherit srcface chunks (and so flags and others properties), but don't copy the srcface indexes.
Definition FaceList.h:777
CFaceList is the common base class for a lot of different classes (C3DFaceList, CUVWFaceList....
Definition FaceList.h:179
void FlipFaces(FACE_PROPERTIES properties=FACE_NONE, bool musthave=true)
Reverse the indexes order. For a 3D face, a side effect is the normal inversion.
void ReleaseFace(CFace *face) const
Release a face created with CFaceList::CreateFace.
Definition FaceList.h:554
bool HasPointToFaceGraph() const
Return true if the point to face graph is computed.
CEdgeGraph & GetEdgeGraph(void)
Get the CEdgeGraph.
bool CopyFace(unsigned int dstindex, unsigned int srcindex, bool inheritPropertiesOnly=false)
Copy srcindex face to dstindex face. inheritPropertiesOnly = true means only flags and properties are...
Definition FaceList.h:684
void SetSize(int size, int defaultFaceSize=FACELIST_DEFAULT_INDEX_NBR, SetSizeMode sizeMode=DEFAULT, int growFaceMode=-1)
Resize the size of the number of face. If growOnly, memory is not reallocated if buffer's size decrea...
virtual unsigned int GetChecksum(unsigned int checksumFlags=CHECKSUM_FACES|CHECKSUM_FACES_EXTRA) const
Return a value that is a simple way to check if the geometry changed between two call to the method.
bool Clean(const CGeomInfo *info)
Clean faces with FACE_IS_INVALID status defined.
int CollectIndexes(unsigned int index, CHashTable< int > &hash, bool erase=false) const
Add the face indexes to the hash, and return the adedd count.
CFacePropertyData * GetMainDataChunk(unsigned int index) const
return the main data chunk for index. The main data chunk is a chunk like another one,...
Definition FaceList.h:748
void DeleteEdgeToFaceGraph()
Release the edge graph when no longer needed. Any call to InitEdgeToFaceGraph must be followed by a c...
SIZET GetSizeOfData(DataChunkID id) const
Return the data size of one element of the given data chunk.
Definition FaceList.h:758
SetSizeMode
Definition FaceList.h:186
void ExpandSizeAndFlags(const CFaceList &faces, unsigned int flags)
Increase face size and set flags for the new faces.
void DeleteEdgeArray()
A call to DeleteEdgeArray must be balanced for each call to InitEdgeArray.
const CDataChunk & GetDataChunks() const
Return the class that handles the data chunks.
Definition FaceList.h:731
void DeletePointToFaceGraph()
Release the point to face graph. Any call to InitPointToFaceGraph must be followed by a call to Delet...
bool UpdateIndex(CXUIntArray *newpointindex, bool onlyValidFaces=true)
Same method with a CXUIntArray class.
void AppendDataChunks(CFaceList *srcFaces, bool copyEmpty=true)
Copy the data chunks that exists in the provided srcFaces list. If copyEmpty = true,...
void SetSize(int size, SetSizeMode sizeMode, int defaultFaceSize=FACELIST_DEFAULT_INDEX_NBR)
Resize the size of the number of face. If growOnly, memory is not reallocated if buffer's size decrea...
int InitEdgeToFaceGraph(const CGeomInfo *info)
Init Edge graph which is a map containing each different edge and their connections....
void SaveFacesIndex(unsigned int dataChunkID=FACE_ORIGINAL_INDEX_CHUNK)
Save face indexes in a specific FACE_ORIGINAL_INDEX_CHUNK data chunk. Face index can be retrieve afte...
bool RemoveDataChunk(DataChunkID id)
Remove the data chunk specified by its id.
void SetSizeAndFlags(const CFaceList &faces, unsigned int flags)
Set faces which size are the same than provided faces list and set flags for these faces.
int IsFaceIndex(unsigned int faceindex, int pointindex) const
Check if point index belong to face. Return the index position of this pointindex or POINT_NOT_BELONG...
Definition FaceList.h:591
unsigned int TagFaces(CGeomInfo *info, CFaceTagger &faceTagger, bool exploreByEdge)
Create group of faces which points/edges are delimited by a given property.
int * SetFaceSize(unsigned int index, int size, FACE_PROPERTIES invalidFlag=FACE_IS_INVALID)
Set the number of indexes for the given face index. If size < 3, then invalidFlag flag is set,...
Definition FaceList.h:607
void SetSize(int size, unsigned int *initialSize, int defaultFaceSize=FACELIST_DEFAULT_INDEX_NBR, int growFaceMode=-1)
This reset the face and initialize it again.
const int * GetFacesConnectedToEdge(const C3DEdge &, int &size)
Get faces connected to an edge. The returned array has size indexes.
bool Clean(const CGeomInfo *info, bool cleanFaces, CXUIntArray *newfacesindex=NULL)
Clean faces with FACE_IS_INVALID status defined and get an array contains the new to old index positi...
bool ReorderFaces(const unsigned int *neworder, unsigned int size, bool moveToDestinationIndexes)
Reorder faces given the order specified by neworder. If moveToDestinationIndexes is true : Face[0] go...
void ExpandSize(const CFaceList &srcfaces)
Expand the face list with srcfaces sizes. No data is copied, only size are preallocated....
const C3DEdgeArray * InitEdgeArray()
Always return an array (even if empty) containing all edge of the face list, without connection infor...
void PreAllocate(int estimatedFaceNbr, int estimatedIndexNbr, bool constructAllElementsOnce=false)
Preallocate the data with an estimated face nbr and total indexes count for the whole face set....
unsigned int AddDataChunk(DataChunkID id, CElementMethods *methods)
Add a data chunk defined by an id and methods which give the way to construct / destroy the data chun...
unsigned int GetOriginalIndex(unsigned int index, unsigned int dataChunkID=FACE_ORIGINAL_INDEX_CHUNK) const
Retrieve the original index of the face.
Definition FaceList.h:736
void SetSize(const CFaceList &srcfaces, int growFaceMode=-1)
Reset face list and get faces size from srcfaces face list. No data is copied, only size are prealloc...
virtual CFace * CreateFace() const =0
Get a face object the appropriate derived face type (ie it will return a C3DFace, with C3DFaceList,...
int GetSize() const
Return the number of faces of the list.
Definition FaceList.h:549
void SetSizeAndFlags(int newsize, unsigned int flags)
Set face size and flags.
void * GetDataChunk(DataChunkID id, unsigned int index) const
Return the data chunk for index face. The returned data can be cast accordingly giving the data chunk...
Definition FaceList.h:753
unsigned int GetDataChunkNbr() const
Return the number of data chunk in the face list.
CFacePropertyData is the main data chunk of CFaceList which consists of storing the flags.
Definition Face.h:70
Definition FaceList.h:62
CFaceTagger is the base class that allows to gather face together using C3DFaceList::TagFaces.
Definition FaceList.h:119
virtual void EndProcess(unsigned int createdGroup)
Default implementation does nothing.
virtual bool InitProcess(CGeomInfo *info)
Default implementation return true.
virtual void BeginNewGroup(unsigned int groupnbr, unsigned int firstface)
BeginNewGroup is called when a new group is to be created.
virtual bool BelongToGroup(unsigned int face, C3DEdge &edge, int *faces, unsigned int size)
Called when exploreByEdge= true in C3DFaceList::TagFaces. faces is an array of size face indexes con...
virtual bool BelongToGroup(unsigned int face, unsigned int point, int *faces, unsigned int size)
Called when exploreByEdge= false. faces is an array of size face indexes connected to faces points....
virtual void ProcessGroup(const int *faces, unsigned int size)=0
ProcessGroup validates a group of face that belong to the same group.
CGeomInfo is an helper class oftenly required by different methods.
Definition GeomInfo.h:71
Definition Hash.h:146
Definition InstanciatedObject.h:16
Class for storing the original face index in CFaceList::SaveFacesIndex or CPointList::SavePointsIndex...
Definition 3DExtraData.h:28
CPointList is the base class for different classes (C3DPointList, CUVWPointList......
Definition PointList.h:50
Definition FaceList.h:388
Definition XArchive.h:17
CXArray is an array of simple data information which does not requires to call a constructor / destru...
Definition XTemplate.h:34