6#if !defined(AFX_CHANNEL_H__79EB93C1_8866_11D3_A029_8FE73A9B677B__INCLUDED_)
7#define AFX_CHANNEL_H__79EB93C1_8866_11D3_A029_8FE73A9B677B__INCLUDED_
17#if !defined(MOOTOOLS_CRUNCHERSDK)
18#include "ChannelPrivate.h"
21BEGIN_MOOTOOLS_NAMESPACE
28 CHANNEL_TYPE_UNDEFINED = 0x00,
29 CHANNEL_UNKNOWN = 0x00,
36 ALL_CHANNELS_TYPE = 0xFFFF,
39#define UVW_DEFAULT_CHANNNEL_ID (CDependentChannels::GetFirstChannelIDByType(UVW_CHANNEL))
40#define VC_DEFAULT_CHANNNEL_ID (CDependentChannels::GetFirstChannelIDByType(VC_CHANNEL))
41#define WEIGHT_DEFAULT_CHANNNEL_ID (CDependentChannels::GetFirstChannelIDByType(WEIGHT_CHANNEL))
42#define POINT_NORMAL_DEFAULT_CHANNNEL_ID (CDependentChannels::GetFirstChannelIDByType(POINT_NORMAL_CHANNEL))
43#define FACE_NORMAL_DEFAULT_CHANNNEL_ID (CDependentChannels::GetFirstChannelIDByType(FACE_NORMAL_CHANNEL))
44#define SPEC_NORMAL_DEFAULT_CHANNNEL_ID (CDependentChannels::GetFirstChannelIDByType(SPEC_NORMAL_CHANNEL))
46typedef enum CHANNEL_COPY_FLAGS
48 CHANNEL_COPY_DEFAULT = 0x00,
49 CHANNEL_COPY_INHERIT_ID = 0x01,
50 CHANNEL_COPY_ONLY_VALID = 0x02,
51 CHANNEL_COPY_ADD = 0x04,
52 CHANNEL_COPY_EMPTY = 0x08,
53 CHANNEL_COPY_USEFUL_ONLY = 0x10,
54 CHANNEL_COPY_CLONE = 0x20,
57typedef enum CHANNEL_PROPERTIES
60 CHANNEL_IS_INVALID = 0x01,
61 CHANNEL_CACHE_DATA = 0x02,
62 CHANNEL_INVALID_CACHE = 0x04,
63 CHANNEL_IS_AUTOGENERATED = 0x08,
64 CHANNEL_SUPPORT_INCOMPLETE_FACES = 0x10,
65 CHANNEL_HAS_NO_FACE_OR_POINT = 0x20,
66 CHANNEL_RECOMPUTE_ON_TRIANGULATION = 0x40,
68 CHANNEL_USER_PROPERTIES1 = 0x01000000,
69 CHANNEL_USER_PROPERTIES2 = 0x02000000,
70 CHANNEL_USER_PROPERTIES3 = 0x04000000,
71 CHANNEL_USER_PROPERTIES4 = 0x08000000,
106 void SetFlag(CHANNEL_PROPERTIES
flag,
bool set);
108 bool IsFlagSet(
unsigned int flag)
const;
109 bool IsOneFlagSet(
unsigned int flag)
const;
145 virtual bool SwapCoordinates(
unsigned int swapMode);
147 virtual bool CleanRemoveDuplicateIndex();
158 virtual bool CanBeRecomputed();
180 unsigned int faceStamp, chnFaceStamp;
186END_MOOTOOLS_NAMESPACE
Channel3DType
The channel type which can be used to cast to the appropriate class Bitwise operations can be use to ...
Definition Channel.h:27
@ FACE_NORMAL_CHANNEL
Autogenerated face normal channel (one normal per face)
Definition Channel.h:34
@ POINT_NORMAL_CHANNEL
Autogenerated point normal channel (one or several normals per point)
Definition Channel.h:33
@ WEIGHT_CHANNEL
Float value channel.
Definition Channel.h:32
@ SPEC_NORMAL_CHANNEL
User specified normals channel.
Definition Channel.h:35
@ VC_CHANNEL
Vertex color channel.
Definition Channel.h:31
@ UVW_CHANNEL
Texture channel.
Definition Channel.h:30
CCustomData class is a handly class for storing any kind of data.
CFaceList class is the base class for different kind of face list.
POINT_PROPERTIES
Point flags used by any classes that inherit from CPt (C3DPoint, C3DVector...)
Definition Point.h:19
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.
CChannel(ChannelID id=CHANNELID_UNDEFINED)
You may assign a specific channel id at creation. This is useful to make a known reference between ma...
virtual ~CChannel()
Use Delete instead, unless the CChannel is created on the stack (take care that it is referenced once...
void SetFaceList(Channel3DType channeltype, CFaceList *newfaces, bool deletePrevious=true)
Attach a face list to the channel. newfaces is owned by the channel, and should not be deleted by the...
ChannelConnectionInfo * GetChannelPointsConnectedToPoint(int point, int &size, int &facesize)
facesize is the number of faces connected to the point, which might be different than size if some fa...
void SetPointList(Channel3DType channeltype, CPointList *newpoints, bool deletePrevious=true)
Attach a point list to the channel. newpoints is owned by the channel, and should not be deleted by t...
static CChannel * Create(Channel3DType type, ChannelID id=CHANNELID_UNDEFINED)
Allocates and creates a new channel. Use Delete if the channel is not attached to a CDependentChannel...
ChannelID GetChannelID() const
The channel ID allows to rely a specific material to a specific channel. This is not a GUID (differen...
ChannelConnectionInfo * GetChannelPointsConnectedToPoint(int point, int &size)
Return UVs connected to the point. size is the number of ChannelConnectionInfo * array entries for po...
void FreeExtra()
Release any extra memory attached to the channel.
CCustomData is a handly class for storing any kind of data.
Definition CustomData.h:106
This class contains an array of CChannel information which are associated to the object.
Definition DependentChannels.h:56
CFaceList is the common base class for a lot of different classes (C3DFaceList, CUVWFaceList....
Definition FaceList.h:179
CGeomInfo is an helper class oftenly required by different methods.
Definition GeomInfo.h:71
Definition InstanciatedObject.h:16
CPointList is the base class for different classes (C3DPointList, CUVWPointList......
Definition PointList.h:50
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
Used by GetChannelPointsConnectedToPoint.
Definition Channel.h:77