1#ifndef __CRUNCHER_TRACKINFO
2#define __CRUNCHER_TRACKINFO
6#include "OffsetArray.h"
12BEGIN_MOOTOOLS_NAMESPACE
17#define CELL_INDEX_TO_ACTION(a) ((NewCellState)(a + 2))
19 int CELL_ACTION_TO_INDEX(
int a);
21# define CELL_ACTION_TO_INDEX(a) (a-2)
26 CELL_ACTION_UNDEFINED = 0,
31 CELL_INDEX_TO_VALUE = 2,
32 CELL_FACE_NOINDEX = 0x01,
33 CELL_FACE_INDEX0 = 0x02,
34 CELL_FACE_INDEX1 = 0x03,
35 CELL_FACE_INDEX2 = 0x04,
36 CELL_SAME_AS_REMAINING = 0x01,
37 CELL_SAME_AS_REMOVED = 0x02,
40 CELL_KINDOF_MASK = 0xF0,
41 CELL_KINDOF_EDGE_CONTRACTION = 0x10,
42 CELL_KINDOF_UV_CONTRACTION = 0x20,
43 CELL_KINDOF_NORMAL_CONTRACTION = 0x30,
44 CELL_KINDOF_INVALIDFACE = 0x40,
45 CELL_KINDOF_FACE = 0x50,
46 CELL_KINDOF_UVFACE = 0x60,
47 CELL_KINDOF_NORMALFACE = 0x70,
48 CELL_KINDOF_MOVE_DUPLICATED_POINT = 0x80,
54#ifdef MOOTOOLS_PRIVATE_DEBUG
63class CTrackContractions;
66 friend CTrackContractions;
72 void SetKindOf(NewCellState
apply);
75 void SetChange(NewCellState state);
76 unsigned char GetChange();
77 unsigned int GetKindOf();
80#ifndef MOOTOOLS_NO_INLINE
81inline void CTrackInfo::Init()
83 state = CELL_ACTION_UNDEFINED;
86inline void CTrackInfo::SetKindOf(NewCellState
apply)
88 state &= (
unsigned char)(~CELL_KINDOF_MASK);
92inline void CTrackInfo::SetChange(NewCellState state)
94 this->state &= (
unsigned char)(~CELL_ACTION);
95 this->state |= (
unsigned char)state;
98inline unsigned char CTrackInfo::GetChange()
100 return (state & CELL_ACTION);
103inline unsigned int CTrackInfo::GetKindOf()
105 return (state & CELL_KINDOF_MASK);
112class DLLFUNCTION CTrackEdgeContraction :
public CTrackInfo
114 friend CTrackContractions;
125 const float *GetPoint()
const;
130#ifndef MOOTOOLS_NO_INLINE
143inline const float *CTrackEdgeContraction::GetPoint()
const
161class DLLFUNCTION CTrackMoveDuplicatedPoint :
public CTrackInfo
163 friend CTrackContractions;
169 void SetIndex(
int index);
170 int GetIndex()
const;
173#ifndef MOOTOOLS_NO_INLINE
174inline void CTrackMoveDuplicatedPoint::SetIndex(
int index)
179inline int CTrackMoveDuplicatedPoint::GetIndex()
const
185class DLLFUNCTION CTrackNormalContraction :
public CTrackInfo
187 friend CTrackContractions;
194 void SetNormalIndex(
int index);
195 int GetNormalIndex()
const;
200#ifndef MOOTOOLS_NO_INLINE
201inline void CTrackNormalContraction::SetNormalIndex(
int index)
206inline int CTrackNormalContraction::GetNormalIndex()
const
222class DLLFUNCTION CTrackUVContraction :
public CTrackInfo
224 friend CTrackContractions;
229 unsigned char channel;
232 void SetUVWIndex(
int index);
233 int GetUVWIndex()
const;
237 const float *GetUVWPoint()
const;
238 unsigned char GetChannel()
const;
239 void SetChannel(
unsigned char channel);
242#ifndef MOOTOOLS_NO_INLINE
243inline void CTrackUVContraction::SetUVWIndex(
int index)
248inline int CTrackUVContraction::GetUVWIndex()
const
263inline const float *CTrackUVContraction::GetUVWPoint()
const
268inline unsigned char CTrackUVContraction::GetChannel()
const
273inline void CTrackUVContraction::SetChannel(
unsigned char channel)
275 this->channel = channel;
282class DLLFUNCTION CTrackFace :
public CTrackInfo
284 friend CTrackContractions;
290 void SetCurrentFace(
int faceIndex);
291 int GetCurrentFace();
295#ifndef MOOTOOLS_NO_INLINE
296inline void CTrackFace::SetCurrentFace(
int faceIndex)
298 this->faceIndex = faceIndex;
301inline int CTrackFace::GetCurrentFace()
307class DLLFUNCTION CTrackInvalidFace :
public CTrackFace
313 int GetIsolatedFacePointNumber()
const;
314 void SetIsolatedFacePointNumber(
int ptnbr);
317#ifndef MOOTOOLS_NO_INLINE
318inline int CTrackInvalidFace::GetIsolatedFacePointNumber()
const
320 return (state & CELL_ACTION);
323inline void CTrackInvalidFace::SetIsolatedFacePointNumber(
int ptnbr)
326 this->state = (
unsigned char)(((
unsigned char)(
ptnbr) & CELL_ACTION) | (state & CELL_KINDOF_MASK));
330class DLLFUNCTION CTrackCell :
public CTrackInfo
332 friend CTrackContractions;
338 void SetIndexChange(
int index);
339 int GetIndexChange();
342#ifndef MOOTOOLS_NO_INLINE
343inline void CTrackCell::SetIndexChange(
int index)
348inline int CTrackCell::GetIndexChange()
357 friend CTrackContractions;
363 void SetCurrentFace(
int faceIndex);
364 int GetCurrentFace();
367#ifndef MOOTOOLS_NO_INLINE
368inline void CTrackFace2::SetCurrentFace(
int faceIndex)
370 this->faceIndex = faceIndex;
373inline int CTrackFace2::GetCurrentFace()
381 friend CTrackContractions;
384 unsigned char channel;
387 unsigned char GetChannel()
const;
388 void SetChannel(
unsigned char channel);
391#ifndef MOOTOOLS_NO_INLINE
392inline unsigned char CTrackUVFace2::GetChannel()
const
397inline void CTrackUVFace2::SetChannel(
unsigned char channel)
399 this->channel = channel;
405class DLLFUNCTION CTrackChannelFace :
public CTrackCell
407 friend CTrackContractions;
410 unsigned char channel;
437#ifdef MOOTOOLS_PRIVATE_DEBUG
442 unsigned char GetChannel()
const;
443 void SetChannel(
unsigned char channel);
446#ifndef MOOTOOLS_NO_INLINE
447inline unsigned char CTrackChannelFace::GetChannel()
const
452inline void CTrackChannelFace::SetChannel(
unsigned char channel)
454 this->channel = channel;
460class DLLFUNCTION CTrackNormalFace :
public CTrackCell
462 friend CTrackContractions;
465#ifdef MOOTOOLS_PRIVATE_DEBUG
471#ifdef MOOTOOLS_PRIVATE_DEBUG
477 friend CTrackContractions;
480 unsigned int index, flags;
483 unsigned int GetIndex()
const;
484 void SetIndex(
unsigned int index);
485 unsigned int GetFlags()
const;
486 void SetFlags(
unsigned int flags);
489#ifndef MOOTOOLS_NO_INLINE
490inline unsigned int CTrackFlags::GetIndex()
const
495inline void CTrackFlags::SetIndex(
unsigned int index)
500inline unsigned int CTrackFlags::GetFlags()
const
505inline void CTrackFlags::SetFlags(
unsigned int flags)
521 unsigned int revertTrackPos;
523 COffsetArray edgesContractionArray;
525 SIZET dataSize, dataOffset;
526 unsigned int edgeContractionNbr;
527 unsigned int staticPtNbr, staticFaceNbr;
529 int currentContraction;
531 virtual ~CTrackContractions();
534 CTrackInfo *GetNextTrackInfo(CTrackInfo *
trackinfo)
const;
536 int GetNumberOfInvalidFaces();
543 void InitSizeFrom(
const CTrackContractions *info);
546 void SetCurrentContraction(
int currentContraction);
547 int GetCurrentContraction()
const;
548 int GetContractionsNbr()
const;
549 int GetStaticFaceNbr()
const;
550 int GetStaticPointNbr()
const;
552#ifdef MOOTOOLS_PRIVATE_DEBUG
563 CTrackEdgeContraction *GetNewEdgeContraction();
564 CTrackMoveDuplicatedPoint *GetNewMoveDuplicatedPoint();
565 CTrackUVContraction *GetNewUVContraction();
566 CTrackNormalContraction *GetNewNormalContraction();
567 CTrackFace *GetNewTrackFace();
568 CTrackInvalidFace *GetNewTrackInvalidFace();
569 CTrackChannelFace *GetNewTrackChannelFace(NewCellState
channeltype);
570 CTrackNormalFace *GetNewTrackNormalFace();
576#ifdef MOOTOOLS_PRIVATE_DEBUG
580 CTrackEdgeContraction *GetEdgeContraction(
unsigned int contractionNbr)
const;
581 CTrackInfo *GetFirstCell(CTrackEdgeContraction *
contraction)
const;
582 CTrackInfo *GetNextCell(CTrackInfo *
cell)
const;
583 CTrackInfo *GetLastCell(CTrackEdgeContraction *
contraction);
584 CTrackInfo *GetPrevCell(CTrackInfo *
cell);
585 bool AddCell(CTrackInfo *
cell);
587 SIZET GetDataSize()
const;
588 const void *GetData(SIZET& size)
const;
589 bool InitFromData(
const void *data, SIZET size);
592END_MOOTOOLS_NAMESPACE
C3DFace class definition for a 3D face, which is a list of indexes that refers to a 3D point list.
C3DTPoint template class definition for handling x, y, z 3D point coordinate.
The file contains enum and type declarations used by the SDK.
CUVWFace is a face that refers to an UV in a CUVWPointList.
CUVWPoint is a point that have u, v, w coordinates.
This class handles static optimization of an object.
Definition 3DExtObject.h:66
C3DFaceList class which implement a list of C3DFace. Each face contains indexes to 3D points stored i...
Definition 3DFaceList.h:249
This is the base class for any object containing geometry (curve, polygonal object,...
Definition 3DGeomObject.h:49
The class defines an x, y, z 3D point which can use int, float or double.
Definition 3DPoint.h:27
Definition InstanciatedObject.h:16
CUVWPoint is a point that have u, v, w for handling object texturing.
Definition UVWPoint.h:21
CXArray is an array of simple data information which does not requires to call a constructor / destru...
Definition XTemplate.h:34