#if defined(JAMBUILD)
#else
#include "../../include/Mudbox/mudbox.h"
#endif
struct VertexInfo
{
VertexInfo( void ) {};
VertexInfo(
unsigned int iGlobalVertexIndex,
unsigned int iVertexIndex,
const Vector &vDisp,
float fMask,
unsigned int iFaceIndex,
unsigned int iCornerIndex )
{
m_iGlobalVertexIndex = iGlobalVertexIndex;
m_iVertexIndex = iVertexIndex;
m_vDisplacement = vDisp;
m_fMask = fMask;
m_iCount = 1;
m_iFaceIndex = iFaceIndex;
m_iCornerIndex = iCornerIndex;
};
int operator -(
const VertexInfo &
v )
const {
return m_iGlobalVertexIndex-v.m_iGlobalVertexIndex; };
void Refine(
const Vector &vDisplacement,
float fMask )
{
m_vDisplacement = (m_iCount*m_vDisplacement+vDisplacement)/(m_iCount+1);
m_fMask = (m_iCount*m_fMask+fMask)/(m_iCount+1);
m_iCount++;
};
unsigned int m_iVertexIndex;
unsigned int m_iGlobalVertexIndex;
unsigned int m_iFaceIndex;
unsigned int m_iCornerIndex;
float m_fMask;
int m_iCount;
};
struct Tile
{
unsigned int m_iIndex;
bool m_bZero;
};
class DisplaceOperation :
public TreeNode
{
{
spaceAbsoluteTangent,
};
QString GetFileName(
const QString &sMask,
unsigned int iTile,
unsigned int iUPos,
unsigned int iVPos )
const;
public:
DisplaceOperation( void );
void Do( void );
void Execute( void );
void Serialize(
Stream &cStream );
static void Initializer( void );
aptr<Geometry> m_pObject;
aint m_iSubdivisionLevel;
aenum m_iDisplacementChannel;
unsigned int m_iVDim;
bool m_bFloatMap;
int m_iBaseU, m_iBaseV;
};