Polygon Crucher SDK - Documentation
Documentation
Loading...
Searching...
No Matches
UVWChannel.h
Go to the documentation of this file.
1//! @file UVWChannel.h
2//! @brief CUVWChannel class for handling UVW channel
3//!
4//////////////////////////////////////////////////////////////////////
5
6#if !defined(UVWCHANNEL_INCLUDE)
7#define UVWCHANNEL_INCLUDE
8
9#ifdef _MSC_VER
10#pragma once
11#endif // _MSC_VER
12
13#include "Channel.h"
14
15BEGIN_MOOTOOLS_NAMESPACE
16
17//! @class CUVWChannel
18//! @brief CUVWChannel is the channel class dedicated to UVs.
19//! @details CUVWChannel belongs to CDependentChannels and is referenced by the UVW_CHANNEL identifier.
20class DLL_3DFUNCTION CUVWChannel : public CChannel
21{
22 DECLARE_SERIAL_XOBJECT(CUVWChannel);
23
24public:
25 CUVWChannel(ChannelID id = CHANNELID_UNDEFINED); // If id = CHANNELID_UNDEFINED, the id is automatically assigned when adding the channel to object channels. If id != CHANNELID_UNDEFINED, the id might be modified if it already exists in object channels
26
27 virtual ~CUVWChannel(); // Use Delete instead, unless the CUVWChannel is created on the stack (take care that it is referenced once only in this case)
28
29 // UVW informations
30 CUVWFaceList *GetUVWFaceList();
31 CUVWPointList *GetUVWPointList();
32
33 // graph functions
34 int InitUVSymmetryFlag(const CGeomInfo* info, POINT_PROPERTIES pointFlag = POINT_UV_SYMMETRY, bool reinitPointFlag = false); // Check for symmetry for each UV points for on incident edges. If a symmetry is found, POINT_UV_SYMMETRY is set for UV, and pointFlag for corresponding point. UV symmetry cannot be checked on UV break, so InitShareUVFlag must be called before.
35 int InitShareUVFlag(const CGeomInfo *info, float tolerance, bool reinitPointFlag);
36 bool IsUVFrontier(const CGeomInfo *info, float tolerance, const C3DEdge& edge, int faceindex1, int faceindex2);
37
38 // Virtuals
39 virtual bool Compare(const CChannel *channel) const;
40 virtual bool Compare(const CPt *pt1, const CPt *pt2, double tolerance = 0.0f) const;
41
42protected:
43
44#if 0
45protected:
46 bool CheckUVWDirection(const CGeomInfo *info, int ptindex, int uvwindex1, int faceindex1, int uvwindex2, int faceindex2);
47 bool GetUVWVector(const CGeomInfo *info, int ptindex, int uvwindex, int faceindex, C3DVector& vector, C3DVector& uvvector);
48 bool GetEdge(int point, C3DFace& face, C3DEdge& edge);
49#endif
50};
51
52END_MOOTOOLS_NAMESPACE
53
54#endif // !defined(UVWCHANNEL_INCLUDE)
CChannel class definition which is the base class for object channels (UV, normals....
POINT_PROPERTIES
Point flags used by any classes that inherit from CPt (C3DPoint, C3DVector...)
Definition Point.h:19
@ POINT_UV_SYMMETRY
Used by uvwpoints and potentially by points (cf InitUVSymmetryFlag)
Definition Point.h:44
C3DEdge is a class containing 2 point indexes that represent the edge of a face.
Definition FaceList.h:72
A 3D face is a list of indexes of C3DPointList object point list.
Definition 3DFace.h:43
The class defines an x, y, z 3D point which can use int, float or double.
Definition 3DPoint.h:27
A CChannel is the base class for some additional information associated to an object.
Definition Channel.h:93
virtual bool Compare(const CChannel *channel) const
Return true if the channel have same type and same content.
CGeomInfo is an helper class oftenly required by different methods.
Definition GeomInfo.h:71
CPt base only contains some flags that are used by the derived class.
Definition Point.h:60
CUVWChannel is the channel class dedicated to UVs.
Definition UVWChannel.h:21
virtual bool Compare(const CChannel *channel) const
Return true if the channel have same type and same content.
CUVWFaceList is a CFaceList that contains CUVWFace. It usually belongs to a CUVWChannel.
Definition UVWFaceList.h:21
CUVWPointList is an array of CUVWPoint. It usually belongs to a CUVWChannel.
Definition UVWPointList.h:46