PtexExtractor/PtexLayout.h
#if defined(JAMBUILD)
#else
#include "../../include/Mudbox/mudbox.h"
#include "../../include/MapExtractor/MapExtractorInterface.h"
#include "../../include/UVlessPainting/UVGeneratorInterface.h"
#endif
class PtexLayout :
public Layout
{
enum
{
dataURes,
dataVRes,
dataFaceID
};
PtexLayout( void );
virtual QWidget *UserInterface(
void );
virtual unsigned int Prepare( void );
virtual void Serialize(
Stream &
s );
void InitializeResolution(
const Mesh *pMesh );
void CalculateQuadResolution( unsigned int iQuadIndex, int &iHRes, int &iVRes );
int Calculate1DResolution( float fIdeal );
enum Distribution
{
distUniform,
distWorldArea,
distUVArea,
distCustom
};
unsigned int m_iDesiredTexelCount;
void PrepareAdjacency(
const Mesh *m_pMesh );
unsigned int AdjacentFaceForTriangle( unsigned int iFaceIndex, unsigned int iSide, unsigned int iSegment, unsigned int &iEdge ) const;
unsigned int AdjacentFace( unsigned int iFaceID, unsigned int iSide, unsigned int &iEdge ) const;
struct ResolutionCalc
{
float m_fTotalSurfaceArea;
unsigned int m_iTexelCount;
float m_fProcessedArea;
float m_fTolerance;
} m_sRes;
};