Polygon Crucher SDK - Documentation
Documentation
Loading...
Searching...
No Matches
WeightPointList.h
1// WeightPointList.h: interface for the CWeightPointList class.
2//
3//////////////////////////////////////////////////////////////////////
4
5#if !defined(WEIGHTPOINTLIST_INCLUDE)
6#define WEIGHTPOINTLIST_INCLUDE
7
8#ifdef _MSC_VER
9#pragma once
10#endif // _MSC_VER
11
12#include "PointList.h"
13#include "WeightPoint.h"
14
15BEGIN_MOOTOOLS_NAMESPACE
16
17class CWeightPointMethods : public CPointMethods
18{
19 DECLARE_SERIAL_XOBJECT(CWeightPointMethods);
20
21 SIZET GetSizeof() const;
22 ElementType GetType() const;
23 void ConstructElement(void* pNewData);
24};
25
26///////////////////////////////////////////////
27// CWeightPointMethods access functions
28inline SIZET CWeightPointMethods::GetSizeof() const
29{
30 return sizeof(CWeightPoint);
31}
32
33inline ElementType CWeightPointMethods::GetType() const
34{
35 return MAKE_CUSTOM_ID('W', 'G', 'P', 'T');
36}
37
38inline void CWeightPointMethods::ConstructElement(void* pNewData)
39{
40 xConstruct(CWeightPoint, pNewData);
41}
42
43//! @class CWeightPointList
44//! @brief CWeightPointList is an array of CWeightPoint. It usually belongs to a CWeightChannel.
45class DLL_3DFUNCTION CWeightPointList : public CPointList
46{
47protected:
48
49public:
50 DECLARE_SERIAL_XOBJECT(CWeightPointList);
51
53 virtual ~CWeightPointList(); //!< Use Delete instead, unless the CWeightFaceList is created on the stack (take care that it is referenced once only in this case)
54
55 //! @name Access functions
56 //! Get access to the CWeightPoint data contained in the array
57 //!
58 //! @{
59 const CWeightPoint *GetFirst() const;
60 const CWeightPoint *GetNext(const CWeightPoint *weightCoordPtr) const;
61 CWeightPoint *GetFirst();
63 CWeightPoint *ElementAt(int i);
64 CWeightPoint *operator[](int i);
65
66 //! @}
67
68 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
69
70 // WeightPoint constructions functions
71 virtual CPointList& operator=(const CPointList& refpoints);
72
73#ifdef _DEBUG
75#endif
76};
77
78///////////////////////////////////////////////
79// CWeightPointList access functions
80// WeightPoint access functions
81inline const CWeightPoint *CWeightPointList::GetFirst() const
82{
83 return (const CWeightPoint *)CElementArray::GetFirst();
84}
85
86inline const CWeightPoint *CWeightPointList::GetNext(const CWeightPoint *weightCoordPtr) const
87{
88 return (const CWeightPoint *)CElementArray::GetNext(weightCoordPtr);
89}
90
91inline CWeightPoint *CWeightPointList::GetFirst()
92{
93 return (CWeightPoint *)CElementArray::GetFirst();
94}
95
96inline CWeightPoint *CWeightPointList::GetNext(CWeightPoint *weightCoordPtr)
97{
98 return (CWeightPoint *)CElementArray::GetNext(weightCoordPtr);
99}
100
101inline CWeightPoint *CWeightPointList::ElementAt(int i)
102{
103 return ((CWeightPoint *)CElementArray::ElementAt(i));
104}
105
106inline CWeightPoint *CWeightPointList::operator[](int i)
107{
108 return ((CWeightPoint *)CElementArray::operator[](i));
109}
110
111END_MOOTOOLS_NAMESPACE
112
113#endif // !defined(WEIGHTPOINTLIST_INCLUDE)
@ 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
CWeightPoint is a point that float value for matching a ponderation weight. //.
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
CWeightPoint is a point that have a float value and can be used for adding ponderation information.
Definition WeightPoint.h:20
CWeightPointList is an array of CWeightPoint. It usually belongs to a CWeightChannel.
Definition WeightPointList.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 ~CWeightPointList()
Use Delete instead, unless the CWeightFaceList is created on the stack (take care that it is referenc...
Definition WeightPointList.h:18