Polygon Crucher SDK - Documentation
Documentation
Loading...
Searching...
No Matches
VCPointList.h
1// VCPointList.h: interface for the CVCPointList class.
2//
3//////////////////////////////////////////////////////////////////////
4
5#if !defined(AFX_VCPOINTLIST_H__350DEEC2_8B26_11D3_A382_E0AAB89E432D__INCLUDED_)
6#define AFX_VCPOINTLIST_H__350DEEC2_8B26_11D3_A382_E0AAB89E432D__INCLUDED_
7
8#ifdef _MSC_VER
9#pragma once
10#endif // _MSC_VER
11
12#include "PointList.h"
13#include "VCPoint.h"
14
15BEGIN_MOOTOOLS_NAMESPACE
16
17class CVCPointMethods : public CPointMethods
18{
19 DECLARE_SERIAL_XOBJECT(CVCPointMethods);
20
21 SIZET GetSizeof() const;
22 ElementType GetType() const;
23 void ConstructElement(void* pNewData);
24};
25
26///////////////////////////////////////////////
27// CVCPointMethods access functions
28inline SIZET CVCPointMethods::GetSizeof() const
29{
30 return sizeof(CVCPoint);
31}
32
33inline ElementType CVCPointMethods::GetType() const
34{
35 return MAKE_CUSTOM_ID('V', 'C', 'P', 'T');
36}
37
38inline void CVCPointMethods::ConstructElement(void* pNewData)
39{
40 xConstruct(CVCPoint, pNewData);
41}
42
43//! @class CVCPointList
44//! @brief CVCPointList is an array of CVCPoint. It usually belongs to a CVCChannel.
45class DLL_3DFUNCTION CVCPointList : public CPointList
46{
47 DECLARE_SERIAL_XOBJECT(CVCPointList);
48
49public:
51 virtual ~CVCPointList(); //!< Use Delete instead, unless the CVCPointList is created on the stack (take care that it is referenced once only in this case)
52
53 //! @name Access functions
54 //! Get access to the CVCPoint data contained in the array
55 //!
56 //! @{
57 const CVCPoint *GetFirst() const;
58 const CVCPoint *GetNext(const CVCPoint *pointList) const;
59 CVCPoint *GetFirst();
60 CVCPoint *GetNext(CVCPoint *pointList);
61 CVCPoint *ElementAt(int i);
62 CVCPoint *operator[](int i);
63
64 //! @}
65
66 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
67
68 // CVCPoint Construction functions
69 virtual CPointList& operator=(const CPointList& refpoints);
70
71#ifdef _DEBUG
73#endif
74};
75
76///////////////////////////////////////////////
77// CVCPointList access functions
78inline const CVCPoint *CVCPointList::GetFirst() const
79{
80 return (const CVCPoint *)CElementArray::GetFirst();
81}
82
83inline const CVCPoint *CVCPointList::GetNext(const CVCPoint *pointList) const
84{
85 return (CVCPoint *)CElementArray::GetNext(pointList);
86}
87
88inline CVCPoint *CVCPointList::GetFirst()
89{
90 return (CVCPoint *)CElementArray::GetFirst();
91}
92
93inline CVCPoint *CVCPointList::GetNext(CVCPoint *pointList)
94{
95 return (CVCPoint *)CElementArray::GetNext(pointList);
96}
97
98inline CVCPoint *CVCPointList::ElementAt(int i)
99{
100 return ((CVCPoint *)CElementArray::ElementAt(i));
101}
102
103inline CVCPoint *CVCPointList::operator[](int i)
104{
105 return ((CVCPoint *)CElementArray::operator[](i));
106}
107
108END_MOOTOOLS_NAMESPACE
109
110#endif // !defined(AFX_VCPOINTLIST_H__350DEEC2_8B26_11D3_A382_E0AAB89E432D__INCLUDED_)
@ 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
CVCPoint is a point that have a color value // VCPoint.h: interface for the VCPoint class.
The class defines an x, y, z 3D point which can use int, float or double.
Definition 3DPoint.h:27
CPointList is the base class for different classes (C3DPointList, CUVWPointList......
Definition PointList.h:50
CVCPoint is a point that have a CRGBColor and which is used for handling object vertex colors.
Definition VCPoint.h:22
CVCPointList is an array of CVCPoint. It usually belongs to a CVCChannel.
Definition VCPointList.h:46
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 ~CVCPointList()
Use Delete instead, unless the CVCPointList is created on the stack (take care that it is referenced ...
Definition VCPointList.h:18