Polygon Crucher SDK - Documentation
Documentation
Loading...
Searching...
No Matches
CPointNormalChannel Class Reference

CPointNormalChannel is the channel class dedicated to vertex colors. More...

Detailed Description

CPointNormalChannel is the channel class dedicated to vertex colors.

CPointNormalChannel belongs to CDependentChannels and is referenced by the POINT_NORMAL_CHANNEL identifier.

#include <PointNormalChannel.h>

Inheritance diagram for CPointNormalChannel:
CChannel CInstanciatedObject

Public Types

enum  _NormalType {
  NORMAL_UNDEFINED = 0x00 , COMPUTED_NORMAL = 0x01 , USER_NORMAL = 0x02 , SPECIFIED_NORMAL = 0x04 ,
  SMOOTH_NORMAL = 0x08
}
 
typedef enum CPointNormalChannel::_NormalType NormalType
 

Public Member Functions

 CPointNormalChannel (ChannelID id=CHANNELID_UNDEFINED)
 
C3DVectorListGetNormalVectorList ()
 
CNormalFaceListGetNormalFaceList ()
 
bool InitNormals (const CGeomInfo *info, float angle)
 
void PrepareSmoothing (const CGeomInfo *, CSpecNormalChannel *specNormalChannel)
 
C3DVectorGetSmoothNormalByCorner (int facenbr, int cornernbr, unsigned int *normalType=NULL)
 
C3DVectorGetSmoothNormalByIndex (int facenbr, int index, unsigned int *normalType=NULL)
 
bool CanBeRecomputed ()
 
bool SwapCoordinates (unsigned int swapMode)
 
bool MatrixTransform (const C4x4Matrix &refmatrix, POINT_PROPERTIES property=POINT_NONE, bool set=TRUE, int index=0, int count=-1)
 
bool Clean (const CGeomInfo *info, CXUIntArray *newfaceindex, CXUIntArray *newpointindex)
 
virtual CChannelCopy (unsigned int copyFlags) const
 
- Public Member Functions inherited from CChannel
 CChannel (ChannelID id=CHANNELID_UNDEFINED)
 You may assign a specific channel id at creation. This is useful to make a known reference between material and front / back UV channel for example. Note : 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.
 
virtual ~CChannel ()
 Use Delete instead, unless the CChannel is created on the stack (take care that it is referenced once only in this case)
 
void FreeExtra ()
 Release any extra memory attached to the channel.
 
void SetFlag (CHANNEL_PROPERTIES flag, bool set)
 
void SetFlags (unsigned int newflags, bool set)
 
bool IsFlagSet (unsigned int flag) const
 
bool IsOneFlagSet (unsigned int flag) const
 
CCustomDataGetCustomData ()
 
ChannelID GetChannelID () const
 The channel ID allows to rely a specific material to a specific channel. This is not a GUID (different object might different channel with the same ID, allowing a material to retrieve the UV channel to use for example)
 
CXString GetTypeString () const
 
CFaceListGetFaceList ()
 
CPointListGetPointList ()
 
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 caller.
 
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 the caller.
 
Channel3DType GetType () const
 
void InitGraph (const CGeomInfo *)
 
void DeleteGraph ()
 
ChannelConnectionInfoGetChannelPointsConnectedToPoint (int point, int &size)
 Return UVs connected to the point. size is the number of ChannelConnectionInfo * array entries for point index.
 
ChannelConnectionInfoGetChannelPointsConnectedToPoint (int point, int &size, int &facesize)
 facesize is the number of faces connected to the point, which might be different than size if some face has invalid or unused UV
 
CPtGetChannelPointIndex (int facenbr, int pointindex)
 
virtual bool CleanRemoveDuplicateIndex ()
 
virtual bool Weld (const CGeomInfo *info, double tolerance)
 
virtual bool Compare (const CChannel *channel) const
 Return true if the channel have same type and same content.
 
virtual bool Compare (const CPt *pt1, const CPt *pt2, double tolerance=0.0f) const
 
virtual void Serialize (CXArchive &ar)
 
virtual void Inherit (const CChannel &srcChannels)
 
- Public Member Functions inherited from CInstanciatedObject
virtual bool Delete ()
 
int GetRefCount () const
 
int AddRef () const
 

Additional Inherited Members

- Static Public Member Functions inherited from CChannel
static CChannelCreate (Channel3DType type, ChannelID id=CHANNELID_UNDEFINED)
 Allocates and creates a new channel. Use Delete if the channel is not attached to a CDependentChannel list. //!< 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.
 

Member Function Documentation

◆ CanBeRecomputed()

bool CPointNormalChannel::CanBeRecomputed ( )
virtual

Reimplemented from CChannel.

◆ Clean()

bool CPointNormalChannel::Clean ( const CGeomInfo info,
CXUIntArray newfaceindex,
CXUIntArray newpointindex 
)
virtual

Reimplemented from CChannel.

◆ Copy()

virtual CChannel * CPointNormalChannel::Copy ( unsigned int  copyFlags) const
virtual

Reimplemented from CChannel.

◆ MatrixTransform()

bool CPointNormalChannel::MatrixTransform ( const C4x4Matrix refmatrix,
POINT_PROPERTIES  property = POINT_NONE,
bool  set = TRUE,
int  index = 0,
int  count = -1 
)
virtual

Reimplemented from CChannel.

◆ SwapCoordinates()

bool CPointNormalChannel::SwapCoordinates ( unsigned int  swapMode)
virtual

Reimplemented from CChannel.


The documentation for this class was generated from the following file: