Points::PointsGridIterator Class Reference

The PointsGridIterator class provides an interface to walk through all grid elements of a point grid. More...

#include <PointsGrid.h>

List of all members.

Classes

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

Public Member Functions

Base::BoundBox3d GetBoundBox (void) const
 Returns the bounding box of the current grid element.
void GetElements (std::vector< unsigned long > &raulElements) const
 Returns indices of the elements in the current grid.
void GetGridPos (unsigned long &rulX, unsigned long &rulY, unsigned long &rulZ) const
 Returns the grid number of the current position.
 PointsGridIterator (const PointsGrid &rclG)
 Construction.
Iteration



void Init (void)
 Sets the iterator to the first element.
bool More (void) const
 Checks if the iterator has not yet reached the end position.
void Next (void)
 Go to the next grid.
Tests with rays



bool InitOnRay (const Base::Vector3d &rclPt, const Base::Vector3d &rclDir, float fMaxSearchArea, std::vector< unsigned long > &raulElements)
 Searches for facets around the ray.
bool InitOnRay (const Base::Vector3d &rclPt, const Base::Vector3d &rclDir, std::vector< unsigned long > &raulElements)
 Searches for facets around the ray.
bool NextOnRay (std::vector< unsigned long > &raulElements)
 Searches for facets around the ray.

Protected Attributes

bool _bValidRay
 Search ray ok?
Base::Vector3d _clDir
 Direction of search ray.
Base::Vector3d _clPt
 Base point of search ray.
std::set< GridElement_cSearchPositions
float _fMaxSearchArea
const PointsGrid_rclGrid
 The point grid.
unsigned long _ulX
 Number of grids in x.
unsigned long _ulY
 Number of grids in y.
unsigned long _ulZ
 Number of grids in z.

Detailed Description

The PointsGridIterator class provides an interface to walk through all grid elements of a point grid.

Definition at line 174 of file PointsGrid.h.


Constructor & Destructor Documentation

PointsGridIterator::PointsGridIterator ( const PointsGrid rclG  ) 

Construction.

Definition at line 710 of file PointsGrid.cpp.


Member Function Documentation

Base::BoundBox3d Points::PointsGridIterator::GetBoundBox ( void   )  const [inline]

Returns the bounding box of the current grid element.

Definition at line 180 of file PointsGrid.h.

Referenced by Points::PointsGrid::Verify().

void Points::PointsGridIterator::GetElements ( std::vector< unsigned long > &  raulElements  )  const [inline]

Returns indices of the elements in the current grid.

Definition at line 183 of file PointsGrid.h.

Referenced by Points::PointsGrid::Verify().

void Points::PointsGridIterator::GetGridPos ( unsigned long &  rulX,
unsigned long &  rulY,
unsigned long &  rulZ 
) const [inline]

Returns the grid number of the current position.

Definition at line 214 of file PointsGrid.h.

void Points::PointsGridIterator::Init ( void   )  [inline]

Sets the iterator to the first element.

Definition at line 190 of file PointsGrid.h.

Referenced by Points::PointsGrid::Verify().

bool PointsGridIterator::InitOnRay ( const Base::Vector3d rclPt,
const Base::Vector3d rclDir,
float  fMaxSearchArea,
std::vector< unsigned long > &  raulElements 
)

Searches for facets around the ray.

Definition at line 720 of file PointsGrid.cpp.

References _fMaxSearchArea, and InitOnRay().

bool PointsGridIterator::InitOnRay ( const Base::Vector3d rclPt,
const Base::Vector3d rclDir,
std::vector< unsigned long > &  raulElements 
)
bool Points::PointsGridIterator::More ( void   )  const [inline]

Checks if the iterator has not yet reached the end position.

Definition at line 193 of file PointsGrid.h.

Referenced by Points::PointsGrid::Verify().

void Points::PointsGridIterator::Next ( void   )  [inline]

Go to the next grid.

Definition at line 196 of file PointsGrid.h.

Referenced by Points::PointsGrid::Verify().

bool PointsGridIterator::NextOnRay ( std::vector< unsigned long > &  raulElements  ) 

Member Data Documentation

Search ray ok?

Definition at line 224 of file PointsGrid.h.

Referenced by InitOnRay(), and NextOnRay().

Direction of search ray.

Definition at line 223 of file PointsGrid.h.

Referenced by InitOnRay(), and NextOnRay().

Base point of search ray.

Definition at line 222 of file PointsGrid.h.

Referenced by InitOnRay(), and NextOnRay().

Definition at line 241 of file PointsGrid.h.

Referenced by InitOnRay(), and NextOnRay().

Definition at line 225 of file PointsGrid.h.

Referenced by InitOnRay(), and NextOnRay().

The point grid.

Definition at line 218 of file PointsGrid.h.

Referenced by InitOnRay(), and NextOnRay().

unsigned long Points::PointsGridIterator::_ulX [protected]

Number of grids in x.

Definition at line 219 of file PointsGrid.h.

Referenced by InitOnRay(), and NextOnRay().

unsigned long Points::PointsGridIterator::_ulY [protected]

Number of grids in y.

Definition at line 220 of file PointsGrid.h.

Referenced by InitOnRay(), and NextOnRay().

unsigned long Points::PointsGridIterator::_ulZ [protected]

Number of grids in z.

Definition at line 221 of file PointsGrid.h.

Referenced by InitOnRay(), and NextOnRay().


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

Generated on Wed Nov 23 19:02:42 2011 for FreeCAD by  doxygen 1.6.1