UVlessPainting/UVMeshGrid.h Source File
Go to the documentation of this file. 1 #ifndef __UV_MESH_GRID_H
2 #define __UV_MESH_GRID_H
7 #include "../../include/Mudbox/mudbox.h"
16 m_iFaceIndex(0xffffffff),
21 Quad(
const Mesh *pMesh,
unsigned int iFaceIndex,
int iSide = 0 )
24 m_iFaceIndex = iFaceIndex;
33 bool Step(
int iDirection = 0 )
35 unsigned int a = m_pMesh->QuadAdjacency( m_iFaceIndex, (m_iSide+iDirection)%4 );
36 if ( a == 0xffffffff )
39 m_iSide = (a%4+2-iDirection)%4;
42 unsigned int Corner(
int iIndex )
const
44 return m_pMesh->QuadIndex( m_iFaceIndex, (m_iSide+iIndex)%4 );
48 return m_pMesh->QuadTCI( m_iFaceIndex, (m_iSide+iIndex)%4 );
52 return m_pMesh->QuadVertexPosition( m_iFaceIndex, (m_iSide+iIndex)%4 );
56 return (CornerPosition(0)+CornerPosition(1)+CornerPosition(2)+CornerPosition(3))*0.25f;
60 m_iSide = (m_iSide+3)%4;
64 m_iSide = (m_iSide+1)%4;
99 unsigned int m_iWidth;
100 unsigned int m_iHeight;
109 for(
int i = 0; i < m_aGrids.
size(); ++i )
117 void SetMaxGridDimension(
unsigned int iMax ) { m_iMaxDimension = iMax; }
118 void MeshGridDimensions(
unsigned int iGrid,
unsigned int& iWidth,
unsigned int& iHeight )
const;
119 unsigned int MeshGridCount(
void )
const {
return m_pSolution ? m_pSolution->m_aGrids.size() : 0; }
120 unsigned int MeshGridFaceIndex(
unsigned int iGrid,
unsigned int iX,
unsigned int iY )
const;
123 unsigned int MeshGridFaceOrientation(
unsigned int iGrid,
unsigned int iX,
unsigned int iY )
const;
125 unsigned int MeshGridBleed(
unsigned int iGrid,
unsigned int iDefaultBleed )
const;
128 Vector MeshGridCenter(
unsigned int iGrid )
const;
130 void SetMesh(
Mesh* pMesh );
136 aptr<Mesh> m_pQuadMesh;
137 unsigned int m_iMaxDimension;
138 Solution* m_pSolution;
141 Solution* FindGrids(
int iGridSize,
Quad cCorner );
142 float ComputeFitness(
const Solution* pSolution );
143 Quad FindEV(
const Mesh* pMesh )
const;
145 unsigned int QuadMeshIndex(
unsigned int iQuadFaceIndex );
146 const Vector& QuadVertexPosition(
unsigned int iTriangleIndex,
unsigned int iMeshCorner,
unsigned int iFaceOrientation )
const;
147 void AddNonQuadFaces();
Represents a 3D vector or point with S23E8 floating point elements.
A Mesh is a collection of vertices organized into faces, and optional Texture Coordinate information...
unsigned int Corner(int iIndex) const
This is the base class for most classes in the Mudbox SDK.
Vector Center(void) const
unsigned int CornerTCI(int iIndex)
unsigned int m_iFaceIndex
Class: ConvolutionKernel.
GLubyte GLubyte GLubyte a
bool Step(int iDirection=0)
Quad(const Mesh *pMesh, unsigned int iFaceIndex, int iSide=0)
#define DECLARE_CLASS
This macro should be used in declaration of classes which are inherited from the Node class (or any d...
Quad & operator=(const Quad &pOther)
#define MB_SDN(a)
Utility macro to safely delete and reset a pointer.
Vector CornerPosition(int iIndex) const