AGX Dynamics 2.41.3.0
Loading...
Searching...
No Matches
agxCollide::Mesh::VertexEdgeCirculator Class Reference

Class in order to circulate over the edges connected to a Triangle's vertex. More...

#include <Mesh.h>

Public Member Functions

 VertexEdgeCirculator ()
 A newly created and unassigned VertexEdgeCirculator will be invalid.
 
bool atEnd () const
 
agx::Vec3 getEdgeEndVertex () const
 
agx::Vec3 getEdgeStartVertex () const
 
uint_fast8_t getLocalEdgeIndex () const
 
const MeshgetMesh () const
 
const Triangle getTriangle () const
 
size_t getTriangleIndex () const
 
bool hasJustJumpedOverHole () const
 
bool isValid () const
 
VertexEdgeCirculatoroperator++ ()
 Move circulator one step clockwise.
 
void operator++ (int)
 Move circulator one step clockwise.
 

Protected Member Functions

 VertexEdgeCirculator (const Mesh *mesh, size_t triangleIndex, uint_fast8_t localVertexIndex)
 This hidden constructor can only be called from the Mesh class.
 

Protected Attributes

bool m_hasJustJumpedOverHole
 
bool m_hasMoved
 
uint_fast8_t m_localEdgeIndex
 
uint_fast8_t m_localEdgeStartIndex
 
MeshConstRef m_mesh
 
size_t m_triangleIndex
 
size_t m_triangleStartIndex
 
bool m_valid
 

Detailed Description

Class in order to circulate over the edges connected to a Triangle's vertex.

Involves a small overhead compared to using the more low-level access to the raw data by using getMeshData().

Definition at line 202 of file Mesh.h.

Constructor & Destructor Documentation

◆ VertexEdgeCirculator() [1/2]

agxCollide::Mesh::VertexEdgeCirculator::VertexEdgeCirculator ( )

A newly created and unassigned VertexEdgeCirculator will be invalid.

◆ VertexEdgeCirculator() [2/2]

agxCollide::Mesh::VertexEdgeCirculator::VertexEdgeCirculator ( const Mesh mesh,
size_t  triangleIndex,
uint_fast8_t  localVertexIndex 
)
protected

This hidden constructor can only be called from the Mesh class.

Parameters
mesh- Pointer to a mesh
triangleIndexWithin the meshData, the index of the Triangle the circulator points to when constructed.
localVertexIndexThe local index of the Triangle's vertex that the circulator points to when constructed.

Member Function Documentation

◆ atEnd()

bool agxCollide::Mesh::VertexEdgeCirculator::atEnd ( ) const
Returns
True if circulator is valid, at start position and has been increased. Watch out in while loops: will return false for non-valid circulators.

Definition at line 940 of file Mesh.h.

Referenced by agxSDK::findMostParallelEdgeAmongNeighboringTriangles().

◆ getEdgeEndVertex()

agx::Vec3 agxCollide::Mesh::VertexEdgeCirculator::getEdgeEndVertex ( ) const
Returns
Ending vertex of the edge the circulator is pointing to.

Definition at line 957 of file Mesh.h.

◆ getEdgeStartVertex()

agx::Vec3 agxCollide::Mesh::VertexEdgeCirculator::getEdgeStartVertex ( ) const
Returns
Starting vertex of the edge the circulator is pointing to.

Definition at line 948 of file Mesh.h.

◆ getLocalEdgeIndex()

uint_fast8_t agxCollide::Mesh::VertexEdgeCirculator::getLocalEdgeIndex ( ) const
Returns
The local edge index of the edge the circulator is pointing to.

Definition at line 978 of file Mesh.h.

Referenced by agxSDK::findMostParallelEdgeAmongNeighboringTriangles().

◆ getMesh()

const Mesh * agxCollide::Mesh::VertexEdgeCirculator::getMesh ( ) const
Returns
A pointer to the Mesh this triangle is based on.

Definition at line 990 of file Mesh.h.

◆ getTriangle()

const Mesh::Triangle agxCollide::Mesh::VertexEdgeCirculator::getTriangle ( ) const
inline
Returns
The triangle the circulator is pointing to.

Definition at line 971 of file Mesh.h.

Referenced by agxSDK::findMostParallelEdgeAmongNeighboringTriangles().

◆ getTriangleIndex()

size_t agxCollide::Mesh::VertexEdgeCirculator::getTriangleIndex ( ) const
Returns
Global index of triangle the circulator is pointing at right now.

Definition at line 984 of file Mesh.h.

◆ hasJustJumpedOverHole()

bool agxCollide::Mesh::VertexEdgeCirculator::hasJustJumpedOverHole ( ) const
Returns
Has the iterator just jumped over a hole (and is on its other side).

Definition at line 965 of file Mesh.h.

◆ isValid()

bool agxCollide::Mesh::VertexEdgeCirculator::isValid ( ) const
Returns
True if the circulator is valid. Circulators become invalid if constructed from or assigned with invalid data.

Definition at line 933 of file Mesh.h.

Referenced by agxSDK::findMostParallelEdgeAmongNeighboringTriangles().

◆ operator++() [1/2]

Mesh::VertexEdgeCirculator & agxCollide::Mesh::VertexEdgeCirculator::operator++ ( )

Move circulator one step clockwise.

Moves to next triangle bordering to the vertex and this triangle's edge starting from the vertex. If no half-edge information is available for the bordering edge (a hole), the circulator will go counterclockwise backwards around the vertex until a hole is found there.

Definition at line 925 of file Mesh.h.

◆ operator++() [2/2]

void agxCollide::Mesh::VertexEdgeCirculator::operator++ ( int  )

Move circulator one step clockwise.

Moves to next triangle bordering to the vertex and this triangle's edge starting from the vertex. If no half-edge information is available for the bordering edge (a hole), the circulator will go counterclockwise backwards around the vertex until a hole is found there.

Definition at line 892 of file Mesh.h.

Member Data Documentation

◆ m_hasJustJumpedOverHole

bool agxCollide::Mesh::VertexEdgeCirculator::m_hasJustJumpedOverHole
protected

Definition at line 280 of file Mesh.h.

◆ m_hasMoved

bool agxCollide::Mesh::VertexEdgeCirculator::m_hasMoved
protected

Definition at line 279 of file Mesh.h.

◆ m_localEdgeIndex

uint_fast8_t agxCollide::Mesh::VertexEdgeCirculator::m_localEdgeIndex
protected

Definition at line 278 of file Mesh.h.

◆ m_localEdgeStartIndex

uint_fast8_t agxCollide::Mesh::VertexEdgeCirculator::m_localEdgeStartIndex
protected

Definition at line 277 of file Mesh.h.

◆ m_mesh

MeshConstRef agxCollide::Mesh::VertexEdgeCirculator::m_mesh
protected

Definition at line 274 of file Mesh.h.

◆ m_triangleIndex

size_t agxCollide::Mesh::VertexEdgeCirculator::m_triangleIndex
protected

Definition at line 276 of file Mesh.h.

◆ m_triangleStartIndex

size_t agxCollide::Mesh::VertexEdgeCirculator::m_triangleStartIndex
protected

Definition at line 275 of file Mesh.h.

◆ m_valid

bool agxCollide::Mesh::VertexEdgeCirculator::m_valid
protected

Definition at line 281 of file Mesh.h.


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