Quad Struct Reference

Quad Struct Reference

#include <UVMeshGrid.h>

Class Description

Definition at line 12 of file UVMeshGrid.h.

Public Member Functions

 Quad ()
 
 Quad (const Mesh *pMesh, unsigned int iFaceIndex, int iSide=0)
 
bool Step (int iDirection=0)
 
unsigned int Corner (int iIndex) const
 
unsigned int CornerTCI (int iIndex)
 
Vector CornerPosition (int iIndex) const
 
Vector Center (void) const
 
void TurnRight (void)
 
void TurnLeft (void)
 
Quadoperator= (const Quad &pOther)
 

Public Attributes

const Meshm_pMesh
 
unsigned int m_iFaceIndex
 
int m_iSide
 

Constructor & Destructor Documentation

Quad ( )
inline

Definition at line 14 of file UVMeshGrid.h.

14  :
15  m_pMesh(0),
16  m_iFaceIndex(0xffffffff),
17  m_iSide(0xffffffff)
18  {
19  };
unsigned int m_iFaceIndex
Definition: UVMeshGrid.h:75
const Mesh * m_pMesh
Definition: UVMeshGrid.h:72
int m_iSide
Definition: UVMeshGrid.h:76
Quad ( const Mesh pMesh,
unsigned int  iFaceIndex,
int  iSide = 0 
)
inline

Definition at line 21 of file UVMeshGrid.h.

22  {
23  m_pMesh = pMesh;
24  m_iFaceIndex = iFaceIndex;
25  m_iSide = iSide;
26  };
unsigned int m_iFaceIndex
Definition: UVMeshGrid.h:75
const Mesh * m_pMesh
Definition: UVMeshGrid.h:72
int m_iSide
Definition: UVMeshGrid.h:76

Member Function Documentation

bool Step ( int  iDirection = 0)
inline

Definition at line 33 of file UVMeshGrid.h.

34  {
35  unsigned int a = m_pMesh->QuadAdjacency( m_iFaceIndex, (m_iSide+iDirection)%4 );
36  if ( a == 0xffffffff )
37  return false;
38  m_iFaceIndex = a/4;
39  m_iSide = (a%4+2-iDirection)%4;
40  return true;
41  };
virtual unsigned int QuadAdjacency(unsigned int iFaceIndex, unsigned int iSideIndex) const
Returns the vertex adjacency information index of a side of a quad.
Definition: topology.h:162
unsigned int m_iFaceIndex
Definition: UVMeshGrid.h:75
const Mesh * m_pMesh
Definition: UVMeshGrid.h:72
GLubyte GLubyte GLubyte a
Definition: GLee.h:5404
int m_iSide
Definition: UVMeshGrid.h:76
unsigned int Corner ( int  iIndex) const
inline

Definition at line 42 of file UVMeshGrid.h.

43  {
44  return m_pMesh->QuadIndex( m_iFaceIndex, (m_iSide+iIndex)%4 );
45  };
unsigned int QuadIndex(unsigned int iFaceIndex, unsigned int iCornerIndex) const
Returns the vertex position index of a corner of a quad.
Definition: topology.h:144
unsigned int m_iFaceIndex
Definition: UVMeshGrid.h:75
const Mesh * m_pMesh
Definition: UVMeshGrid.h:72
int m_iSide
Definition: UVMeshGrid.h:76
unsigned int CornerTCI ( int  iIndex)
inline

Definition at line 46 of file UVMeshGrid.h.

47  {
48  return m_pMesh->QuadTCI( m_iFaceIndex, (m_iSide+iIndex)%4 );
49  };
unsigned int m_iFaceIndex
Definition: UVMeshGrid.h:75
const Mesh * m_pMesh
Definition: UVMeshGrid.h:72
int m_iSide
Definition: UVMeshGrid.h:76
unsigned int QuadTCI(unsigned int iFaceIndex, unsigned int iCornerIndex) const
Returns the vertex texture coordinate index of a corner of a quad.
Definition: topology.h:156
Vector CornerPosition ( int  iIndex) const
inline

Definition at line 50 of file UVMeshGrid.h.

51  {
52  return m_pMesh->QuadVertexPosition( m_iFaceIndex, (m_iSide+iIndex)%4 );
53  };
unsigned int m_iFaceIndex
Definition: UVMeshGrid.h:75
const Vector & QuadVertexPosition(unsigned int iQuadIndex, unsigned int iCornerIndex) const
Returns the position of a corner of a mesh face. Can be used for quadric meshes only.
Definition: mesh.h:761
const Mesh * m_pMesh
Definition: UVMeshGrid.h:72
int m_iSide
Definition: UVMeshGrid.h:76
Vector Center ( void  ) const
inline

Definition at line 54 of file UVMeshGrid.h.

55  {
57  };
Vector CornerPosition(int iIndex) const
Definition: UVMeshGrid.h:50
void TurnRight ( void  )
inline

Definition at line 58 of file UVMeshGrid.h.

59  {
60  m_iSide = (m_iSide+3)%4;
61  };
int m_iSide
Definition: UVMeshGrid.h:76
void TurnLeft ( void  )
inline

Definition at line 62 of file UVMeshGrid.h.

63  {
64  m_iSide = (m_iSide+1)%4;
65  };
int m_iSide
Definition: UVMeshGrid.h:76
Quad& operator= ( const Quad pOther)
inline

Definition at line 66 of file UVMeshGrid.h.

67  {
68  m_pMesh = pOther.m_pMesh;
69  m_iFaceIndex = pOther.m_iFaceIndex;
70  m_iSide = pOther.m_iSide;
71  return *this;
72  };
unsigned int m_iFaceIndex
Definition: UVMeshGrid.h:75
const Mesh * m_pMesh
Definition: UVMeshGrid.h:72
int m_iSide
Definition: UVMeshGrid.h:76

Member Data Documentation

const Mesh* m_pMesh

Definition at line 72 of file UVMeshGrid.h.

unsigned int m_iFaceIndex

Definition at line 75 of file UVMeshGrid.h.

int m_iSide

Definition at line 76 of file UVMeshGrid.h.


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