6#if !defined(AFX_POINTLIST_H__E9597160_87C0_11D3_A029_C00DB92E437A__INCLUDED_)
7#define AFX_POINTLIST_H__E9597160_87C0_11D3_A029_C00DB92E437A__INCLUDED_
18BEGIN_MOOTOOLS_NAMESPACE
22#define POINT_ORIGINAL_INDEX_CHUNK MAKE_CUSTOM_ID('P', 'O', 'O', 'I')
28 POINTLIST_NONE = 0x00,
34 virtual SIZET GetSizeof()
const = 0;
35 virtual ElementType GetType()
const = 0;
36 virtual void ConstructElement(
void*
pNewData) = 0;
39 ElementType GetBaseType()
const;
40 void CopyElement(
void*
pDest,
const void*
pSrc);
54 using CElementArray::GetThisRuntimeClassDescriptor;
55 using CElementArray::GetRuntimeClassDescriptor;
56 using CElementArray::GetSizeOfElement;
57 using CElementArray::IsKindOf;
58 using CElementArray::GetSize;
59 using CElementArray::SetAt;
60 using CElementArray::SetAtGrow;
61 using CElementArray::Add;
71 virtual void RemoveAll();
76 void *GetDataChunk(DataChunkID
id,
unsigned int index)
const;
80 SIZET GetSizeOfData(DataChunkID
id)
const;
83 const CPt *GetFirst()
const;
87 CPt *ElementAt(
int i);
88 const CPt *ElementAt(
int i)
const;
89 CPt *operator[](
int i);
90 const CPt *operator[](
int i)
const;
106 unsigned int GetPointFlags(
unsigned int index)
const;
110 void SetPointFlags(
unsigned int index,
unsigned int refflags,
bool set);
111 bool IsPointOneFlagSet(
unsigned int index,
unsigned int refflags)
const;
113 void SetPointsFlags(
unsigned int flags,
bool set);
117 void SavePointsIndex();
118 unsigned int GetOriginalIndex(
unsigned int index)
const;
122 int GetNumberOfPoints(
unsigned int properties,
bool set);
143 unsigned int changeStamp;
147 virtual bool UpdateList();
154inline bool CPointMethods::IsObject()
const
159inline ElementType CPointMethods::GetBaseType()
const
161 return MAKE_CUSTOM_ID(
'P',
'N',
'T',
'S');
164inline void CPointMethods::CopyElement(
void*
pDest,
const void*
pSrc)
177inline const CPt *CPointList::GetFirst()
const
179 return (
const CPt *)CElementArray::GetFirst();
187inline CPt *CPointList::GetFirst()
189 return (
CPt *)CElementArray::GetFirst();
197inline CPt *CPointList::ElementAt(
int i)
199 return ((
CPt *)CElementArray::ElementAt(
i));
202inline const CPt *CPointList::ElementAt(
int i)
const
204 return ((
const CPt *)CElementArray::ElementAt(
i));
207inline CPt *CPointList::operator[](
int i)
209 return ((
CPt *)CElementArray::operator[](
i));
212inline const CPt *CPointList::operator[](
int i)
const
214 return ((
const CPt *)CElementArray::ElementAt(
i));
217inline unsigned int CPointList::GetOriginalIndex(
unsigned int index)
const
228 return dataChunks.GetData(
id, index);
233 return dataChunks.GetSizeOfDataChunk(
id);
236END_MOOTOOLS_NAMESPACE
@ CHECKSUM_POINTS
Point position is taken into account (geometry and channel if CHECKSUM_CHANNELS set)
Definition 3DType.h:428
@ CHECKSUM_POINTS_EXTRA
Point flags (geometry and channel if CHECKSUM_CHANNELS set)
Definition 3DType.h:429
An advanced array class containing data that needs to be construct / destruct.
CPt class is the base class for different class of points (C3DPoint, CUVWPoint...)
POINT_PROPERTIES
Point flags used by any classes that inherit from CPt (C3DPoint, C3DVector...)
Definition Point.h:19
POINTLIST_PROPERTIES
Flags used by CPointList.
Definition PointList.h:27
@ POINTLIST_HAS_CHANGED
Should be set each time something important changed, in order to update internal graphs.
Definition PointList.h:29
The class defines an x, y, z 3D point which can use int, float or double.
Definition 3DPoint.h:27
Definition DataChunk.h:29
An advanced array class containing data that needs to be construct / destruct.
Definition ElementArray.h:69
@ GROW_KEEP_MODE
Keep the default grow size (SetAtGrow, SetSize)
Definition ElementArray.h:76
CElementMethods is provided to CElementArray and give some information on the data as well as the met...
Definition ElementArray.h:22
virtual bool IsObject() const
CFaceList is the common base class for a lot of different classes (C3DFaceList, CUVWFaceList....
Definition FaceList.h:179
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
unsigned int GetDataChunkNbr() const
Return the class that handles the data chunks.
void * GetDataChunk(DataChunkID id, unsigned int index) const
Return the data chunk for index point. The returned data can be cast accordingly giving the data chun...
Definition PointList.h:226
SIZET GetSizeOfData(DataChunkID id) const
Return the data size of one element of the given data chunk.
Definition PointList.h:231
virtual unsigned int GetChecksum(unsigned int checksumFlags=CHECKSUM_POINTS|CHECKSUM_POINTS_EXTRA) const
Return a value that is a simple way to check if the geometry changed between two call to the method.
virtual void SetSize(int size, bool growOnly=false, int growSize=CElementArray::GROW_KEEP_MODE)
growOnly = false means that memory block is shrink down if specified size is below existing size....
void PreAllocate(int size, bool constructAllElementsOnce=false)
bool RemoveDataChunk(DataChunkID channel)
Remove the data chunk specified by its id.
CPointList(CPointList *srcPoints)
Creates a new point array. When srcPoints is provided, the data structure (datachunks) is inherited b...
unsigned int GetChangedStamp() const
Return a value that can be used to know if the list changed (value changed each time POINTLIST_HAS_CH...
unsigned int AddDataChunk(DataChunkID dataid, CElementMethods *methods)
Add a data chunk defined by an id and methods which give the way to construct / destroy the data chun...
void AppendDataChunks(CPointList *srcPoints, bool copyEmpty=true)
Copy the data chunks that exists in the provided srcPoints list. If copyEmpty = true,...
const CDataChunk & GetDataChunks() const
Return the number of data chunk in the face list.
CPt base only contains some flags that are used by the derived class.
Definition Point.h:60
CXArray is an array of simple data information which does not requires to call a constructor / destru...
Definition XTemplate.h:34