MeshCore::MeshGridIterator Class Reference

The MeshGridIterator class provides an interface to walk through all grid elements of a mesh grid. More...

#include <Grid.h>

Classes

struct  GridElement
 Checks if a grid position is already visited by NextOnRay(). More...
 

Public Member Functions

Base::BoundBox3f GetBoundBox () const
 Returns the bounding box of the current grid element. More...
 
unsigned long GetCtElements () const
 Returns the number of elements in the current grid. More...
 
void GetElements (std::vector< ElementIndex > &raulElements) const
 Returns indices of the elements in the current grid. More...
 
 MeshGridIterator (const MeshGrid &rclG)
 Construction. More...
 
Iteration
void Init ()
 Sets the iterator to the first element. More...
 
bool More () const
 Checks if the iterator has not yet reached the end position. More...
 
void Next ()
 Go to the next grid. More...
 
Tests with rays
bool InitOnRay (const Base::Vector3f &rclPt, const Base::Vector3f &rclDir, std::vector< ElementIndex > &raulElements)
 Searches for facets around the ray. More...
 
bool InitOnRay (const Base::Vector3f &rclPt, const Base::Vector3f &rclDir, float fMaxSearchArea, std::vector< ElementIndex > &raulElements)
 Searches for facets around the ray. More...
 
bool NextOnRay (std::vector< ElementIndex > &raulElements)
 Searches for facets around the ray. More...
 
void GetGridPos (unsigned long &rulX, unsigned long &rulY, unsigned long &rulZ) const
 Returns the grid number of the current position. More...
 

Detailed Description

The MeshGridIterator class provides an interface to walk through all grid elements of a mesh grid.

Constructor & Destructor Documentation

◆ MeshGridIterator()

MeshGridIterator::MeshGridIterator ( const MeshGrid rclG)

Construction.

Member Function Documentation

◆ GetBoundBox()

◆ GetCtElements()

unsigned long MeshCore::MeshGridIterator::GetCtElements ( ) const

Returns the number of elements in the current grid.

◆ GetElements()

◆ GetGridPos()

void MeshCore::MeshGridIterator::GetGridPos ( unsigned long &  rulX,
unsigned long &  rulY,
unsigned long &  rulZ 
) const

Returns the grid number of the current position.

◆ Init()

◆ InitOnRay() [1/2]

bool MeshGridIterator::InitOnRay ( const Base::Vector3f rclPt,
const Base::Vector3f rclDir,
float  fMaxSearchArea,
std::vector< ElementIndex > &  raulElements 
)

Searches for facets around the ray.

References InitOnRay().

◆ InitOnRay() [2/2]

bool MeshGridIterator::InitOnRay ( const Base::Vector3f rclPt,
const Base::Vector3f rclDir,
std::vector< ElementIndex > &  raulElements 
)

Searches for facets around the ray.

Referenced by InitOnRay(), and MeshCore::MeshAlgorithm::NearestFacetOnRay().

◆ More()

◆ Next()

◆ NextOnRay()


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