Polygon Crucher SDK - Documentation
Documentation
Loading...
Searching...
No Matches
UVWPointList.h
1// CUVWPointList.h: interface for the CUVWPointList class.
2//
3//////////////////////////////////////////////////////////////////////
4
5#if !defined(UVWPOINTLIST_INCLUDE)
6#define UVWPOINTLIST_INCLUDE
7
8#ifdef _MSC_VER
9#pragma once
10#endif // _MSC_VER
11
12#include "PointList.h"
13#include "UVWPoint.h"
14
15BEGIN_MOOTOOLS_NAMESPACE
16
17class CUVWPointMethods : public CPointMethods
18{
19 DECLARE_SERIAL_XOBJECT(CUVWPointMethods);
20
21 SIZET GetSizeof() const;
22 ElementType GetType() const;
23 void ConstructElement(void* pNewData);
24};
25
26///////////////////////////////////////////////
27// CUVWPointMethods access functions
28inline SIZET CUVWPointMethods::GetSizeof() const
29{
30 return sizeof(CUVWPoint);
31}
32
33inline ElementType CUVWPointMethods::GetType() const
34{
35 return MAKE_CUSTOM_ID('U', 'V', 'W', 'P');
36}
37
38inline void CUVWPointMethods::ConstructElement(void* pNewData)
39{
40 xConstruct(CUVWPoint, pNewData);
41}
42
43//! @class CUVWPointList
44//! @brief CUVWPointList is an array of CUVWPoint. It usually belongs to a CUVWChannel.
45class DLL_3DFUNCTION CUVWPointList : public CPointList
46{
47public:
48 DECLARE_SERIAL_XOBJECT(CUVWPointList);
49
51 virtual ~CUVWPointList(); //!< Use Delete instead, unless the CUVWPointList 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 CUVWPoint data contained in the array
55 //!
56 //! @{
57 const CUVWPoint *GetFirst()const;
58 const CUVWPoint *GetNext(const CUVWPoint *uvcoordPtr) const;
59 CUVWPoint *GetFirst();
61 CUVWPoint *ElementAt(int i);
62 CUVWPoint *operator[](int i);
63
64 //! @}
65
66 void GetMinMax(CUVWPoint& minUV, CUVWPoint& maxUV) const;
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 // UVWPoint constructions functions
71 virtual CPointList& operator=(const CPointList& refpoints);
72
73#ifdef _DEBUG
75#endif
76};
77
78///////////////////////////////////////////////
79// CUVWPoint access functions
80
81inline const CUVWPoint *CUVWPointList::GetFirst() const
82{
83 return (const CUVWPoint *)CElementArray::GetFirst();
84}
85
86inline const CUVWPoint *CUVWPointList::GetNext(const CUVWPoint *uvcoordPtr) const
87{
88 return (const CUVWPoint *)CElementArray::GetNext(uvcoordPtr);
89}
90
91inline CUVWPoint *CUVWPointList::GetFirst()
92{
93 return (CUVWPoint *)CElementArray::GetFirst();
94}
95
96inline CUVWPoint *CUVWPointList::GetNext(CUVWPoint *uvcoordPtr)
97{
98 return (CUVWPoint *)CElementArray::GetNext(uvcoordPtr);
99}
100
101inline CUVWPoint *CUVWPointList::ElementAt(int i)
102{
103 return ((CUVWPoint *)CElementArray::ElementAt(i));
104}
105
106inline CUVWPoint *CUVWPointList::operator[](int i)
107{
108 return ((CUVWPoint *)CElementArray::operator[](i));
109}
110
111END_MOOTOOLS_NAMESPACE
112
113#endif // !defined(UVWPOINTLIST_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
CUVWPoint is a point that have u, v, w coordinates.
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
CUVWPoint is a point that have u, v, w for handling object texturing.
Definition UVWPoint.h:21
CUVWPointList is an array of CUVWPoint. It usually belongs to a CUVWChannel.
Definition UVWPointList.h:46
virtual ~CUVWPointList()
Use Delete instead, unless the CUVWPointList is created on the stack (take care that it is referenced...
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.
Definition UVWPointList.h:18