Polygon Crucher SDK - Documentation
Documentation
Loading...
Searching...
No Matches
WeightChannel.h
Go to the documentation of this file.
1//! @file WeightChannel.h
2//! @brief CWeightChannel class for handling weight channel
3//!
4//////////////////////////////////////////////////////////////////////
5
6#if !defined(WEIGHTCHANNEL_INCLUDE)
7#define WEIGHTCHANNEL_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 CWeightChannel
18//! @brief CWeightChannel is the channel class dedicated to weight information.
19//! @details CWeightChannel belongs to CDependentChannels and is referenced by the WEIGHT_CHANNEL identifier.
20class DLL_3DFUNCTION CWeightChannel : public CChannel
21{
22 DECLARE_SERIAL_XOBJECT(CWeightChannel);
23
24public:
25 CWeightChannel(ChannelID id = CHANNELID_UNDEFINED, bool pointOnly = true); // 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 virtual ~CWeightChannel(); // Use Delete instead, unless the CWeightChannel is created on the stack (take care that it is referenced once only in this case)
27
28 // Weight informations
29 CWeightFaceList *GetWeightFaceList();
30 CWeightPointList *GetWeightPointList();
31
32 void GetLimits(real& min, real& max);
33 void Normalize(bool invert = false);
34 void Invert();
35
36 //! Returns a list of WeightPoints which are the average value of the weights of the points of each face of the geominfo. You have to desallocate the returned CPointList* by using CWeightPointList::Delete() when you don't use it anymore.
38
39 // Virtuals
40 virtual bool Compare(const CPt *pt1, const CPt *pt2, double tolerance = 0.0f) const;
41
42protected:
43};
44
45END_MOOTOOLS_NAMESPACE
46
47#endif // !defined(WEIGHTCHANNEL_INCLUDE)
CChannel class definition which is the base class for object channels (UV, normals....
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
CWeightChannel is the channel class dedicated to weight information.
Definition WeightChannel.h:21
CWeightPointList * GetWeightPointOnlyList(CGeomInfo *geominfo)
Returns a list of WeightPoints which are the average value of the weights of the points of each face ...
CWeightFaceList is a CFaceList that contains CWieghtFace. It usually belongs to a CWeightChannel.
Definition WeightFaceList.h:21
CWeightPointList is an array of CWeightPoint. It usually belongs to a CWeightChannel.
Definition WeightPointList.h:46