VertexAdjacency Struct Reference

VertexAdjacency Struct Reference

#include <mesh.h>

Class Description

Represents face adjacency data for a vertex.

This class contains an index to a face, and a corner of that face. There is one VertexAdjacency structure for each vertex. You can easily determine which faces are touching a vertex with this data.

Definition at line 183 of file mesh.h.

Public Member Functions

 VertexAdjacency ()
 Constructs a invalid adjacency structure. More...
 
 VertexAdjacency (unsigned int iFaceIndex, unsigned char iCornerIndex)
 Constructs an adjacency struture with the specified face and corner indices. More...
 
bool IsValid () const
 Returns true if this structure is valid, false otherwise. More...
 
unsigned int FaceIndex () const
 Returns the face index of a face which is touching the vertex that corresponds to this structure If VertexAdjacency::IsValid() returns false, the return value of this method is undefined. More...
 
unsigned char CornerIndex () const
 Returns the corner index of a face which is touching the vertex that corresponds to this structure If VertexAdjacency::IsValid() returns false, the return value of this method is undefined. More...
 

Constructor & Destructor Documentation

VertexAdjacency ( )
inline

Constructs a invalid adjacency structure.

Definition at line 188 of file mesh.h.

188 : m_iFaceIndex(INVALID_ID), m_iCornerIndex(0xff) {};
#define INVALID_ID
Definition: mesh.h:47
VertexAdjacency ( unsigned int  iFaceIndex,
unsigned char  iCornerIndex 
)
inline

Constructs an adjacency struture with the specified face and corner indices.

Definition at line 191 of file mesh.h.

191  :
192  m_iFaceIndex(iFaceIndex), m_iCornerIndex(iCornerIndex) {};

Member Function Documentation

bool IsValid ( void  ) const
inline

Returns true if this structure is valid, false otherwise.

Use this method to determine if a vertex is adjacent to any faces. If this method returns false, it means that the vertex is not used by any face.

Definition at line 197 of file mesh.h.

197 { return m_iCornerIndex < 0xff; }
unsigned int FaceIndex ( ) const
inline

Returns the face index of a face which is touching the vertex that corresponds to this structure If VertexAdjacency::IsValid() returns false, the return value of this method is undefined.

Definition at line 201 of file mesh.h.

201 { return m_iFaceIndex; }
unsigned char CornerIndex ( ) const
inline

Returns the corner index of a face which is touching the vertex that corresponds to this structure If VertexAdjacency::IsValid() returns false, the return value of this method is undefined.

Definition at line 205 of file mesh.h.

205 { return m_iCornerIndex; }

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