MeshCore::MeshFacetGrid Class Reference

Special grid class that stores facet indices of the mesh object in its grids. More...

#include <Grid.h>

Inheritance diagram for MeshCore::MeshFacetGrid:
MeshCore::MeshGrid

List of all members.

Public Member Functions

virtual void Validate (void)
 Validates the grid structure and rebuilds it if needed.
virtual void Validate (const MeshKernel &rclM)
 Validates the grid structure and rebuilds it if needed.
virtual bool Verify () const
 Verifies the grid structure and returns false if inconsistencies are found.
Construction



 MeshFacetGrid (const MeshKernel &rclM, float fGridLen)
 Construction.
 MeshFacetGrid (const MeshKernel &rclM, int iCtGridPerAxis)
 Construction.
 MeshFacetGrid (const MeshKernel &rclM, unsigned long ulX, unsigned long ulY, unsigned long ulZ)
 Construction.
 MeshFacetGrid (void)
 Construction.
 MeshFacetGrid (const MeshKernel &rclM)
 Construction.
virtual ~MeshFacetGrid (void)
 Destruction.
Search



void SearchNearestFacetInGrid (unsigned long ulX, unsigned long ulY, unsigned long ulZ, const Base::Vector3f &rclPt, float &rfMinDist, unsigned long &rulFacetInd) const
 Searches for the nearest facet in a given grid element and returns the facet index and the actual distance.
void SearchNearestFacetInHull (unsigned long ulX, unsigned long ulY, unsigned long ulZ, unsigned long ulDistance, const Base::Vector3f &rclPt, unsigned long &rulFacetInd, float &rfMinDist) const
 Does basically the same as the method above unless that grid neighbours upto the order of ulDistance are introduced into the search.
unsigned long SearchNearestFromPoint (const Base::Vector3f &rclPt, float fMaxSearchArea) const
 Searches for the nearest facet from a point with the maximum search area.
unsigned long SearchNearestFromPoint (const Base::Vector3f &rclPt) const
 Searches for the nearest facet from a point.

Protected Member Functions

void AddFacet (const MeshGeomFacet &rclFacet, unsigned long ulFacetIndex, float fEpsilon=0.0f)
 Adds a new facet element to the grid structure.
unsigned long HasElements (void) const
 Returns the number of stored elements.
void Pos (const Base::Vector3f &rclPoint, unsigned long &rulX, unsigned long &rulY, unsigned long &rulZ) const
 Returns the grid numbers to the given point rclPoint.
void PosWithCheck (const Base::Vector3f &rclPoint, unsigned long &rulX, unsigned long &rulY, unsigned long &rulZ) const
 Returns the grid numbers to the given point rclPoint.
virtual void RebuildGrid (void)
 Rebuilds the grid structure.

Detailed Description

Special grid class that stores facet indices of the mesh object in its grids.

Definition at line 181 of file Grid.h.


Constructor & Destructor Documentation

MeshFacetGrid::MeshFacetGrid ( const MeshKernel rclM  ) 

Construction.

Definition at line 637 of file Grid.cpp.

References RebuildGrid().

MeshCore::MeshFacetGrid::MeshFacetGrid ( void   )  [inline]

Construction.

Definition at line 189 of file Grid.h.

MeshFacetGrid::MeshFacetGrid ( const MeshKernel rclM,
unsigned long  ulX,
unsigned long  ulY,
unsigned long  ulZ 
)

Construction.

Definition at line 649 of file Grid.cpp.

References MeshCore::MeshGrid::Rebuild().

MeshFacetGrid::MeshFacetGrid ( const MeshKernel rclM,
int  iCtGridPerAxis 
)

Construction.

Definition at line 643 of file Grid.cpp.

References MeshCore::MeshGrid::Rebuild().

MeshFacetGrid::MeshFacetGrid ( const MeshKernel rclM,
float  fGridLen 
)
virtual MeshCore::MeshFacetGrid::~MeshFacetGrid ( void   )  [inline, virtual]

Destruction.

Definition at line 197 of file Grid.h.


Member Function Documentation

void MeshCore::MeshFacetGrid::AddFacet ( const MeshGeomFacet rclFacet,
unsigned long  ulFacetIndex,
float  fEpsilon = 0.0f 
) [inline, protected]

Adds a new facet element to the grid structure.

rclFacet is the geometric facet and ulFacetIndex the corresponding index in the mesh kernel. The facet is added to each grid element that intersects the facet.

Definition at line 437 of file Grid.h.

References MeshCore::MeshGeomFacet::_aclPoints, MeshCore::MeshGrid::_aulGrid, MeshCore::MeshGrid::GetBoundBox(), insert(), MeshCore::MeshGeomFacet::IntersectBoundingBox(), Base::BoundBox3< _Precision >::MaxX, Base::BoundBox3< _Precision >::MaxY, Base::BoundBox3< _Precision >::MaxZ, Base::BoundBox3< _Precision >::MinX, Base::BoundBox3< _Precision >::MinY, Base::BoundBox3< _Precision >::MinZ, and Pos().

Referenced by RebuildGrid().

unsigned long MeshCore::MeshFacetGrid::HasElements ( void   )  const [inline, protected, virtual]

Returns the number of stored elements.

Implements MeshCore::MeshGrid.

Definition at line 232 of file Grid.h.

void MeshCore::MeshFacetGrid::Pos ( const Base::Vector3f rclPoint,
unsigned long &  rulX,
unsigned long &  rulY,
unsigned long &  rulZ 
) const [inline, protected]
void MeshCore::MeshFacetGrid::PosWithCheck ( const Base::Vector3f rclPoint,
unsigned long &  rulX,
unsigned long &  rulY,
unsigned long &  rulZ 
) const [inline, protected]
void MeshFacetGrid::RebuildGrid ( void   )  [protected, virtual]
void MeshFacetGrid::SearchNearestFacetInGrid ( unsigned long  ulX,
unsigned long  ulY,
unsigned long  ulZ,
const Base::Vector3f rclPt,
float &  rfMinDist,
unsigned long &  rulFacetInd 
) const

Searches for the nearest facet in a given grid element and returns the facet index and the actual distance.

Definition at line 917 of file Grid.cpp.

References MeshCore::MeshGrid::_aulGrid, MeshCore::MeshGrid::_pclMesh, MeshCore::MeshGeomFacet::DistanceToPoint(), and MeshCore::MeshKernel::GetFacet().

Referenced by SearchNearestFacetInHull(), and SearchNearestFromPoint().

void MeshFacetGrid::SearchNearestFacetInHull ( unsigned long  ulX,
unsigned long  ulY,
unsigned long  ulZ,
unsigned long  ulDistance,
const Base::Vector3f rclPt,
unsigned long &  rulFacetInd,
float &  rfMinDist 
) const

Does basically the same as the method above unless that grid neighbours upto the order of ulDistance are introduced into the search.

Definition at line 866 of file Grid.cpp.

References MeshCore::MeshGrid::_ulCtGridsX, MeshCore::MeshGrid::_ulCtGridsY, MeshCore::MeshGrid::_ulCtGridsZ, Py::int, and SearchNearestFacetInGrid().

Referenced by SearchNearestFromPoint().

unsigned long MeshFacetGrid::SearchNearestFromPoint ( const Base::Vector3f rclPt,
float  fMaxSearchArea 
) const

Searches for the nearest facet from a point with the maximum search area.

Definition at line 839 of file Grid.cpp.

References MeshCore::MeshGrid::_pclMesh, MeshCore::MeshAlgorithm::Distance(), MeshCore::MeshGrid::Inside(), Base::Vector3< _Precision >::x, Base::Vector3< _Precision >::y, and Base::Vector3< _Precision >::z.

unsigned long MeshFacetGrid::SearchNearestFromPoint ( const Base::Vector3f rclPt  )  const
void MeshFacetGrid::Validate ( void   )  [virtual]

Validates the grid structure and rebuilds it if needed.

Definition at line 672 of file Grid.cpp.

References MeshCore::MeshGrid::_pclMesh, MeshCore::MeshGrid::_ulCtElements, MeshCore::MeshKernel::CountFacets(), and RebuildGrid().

void MeshFacetGrid::Validate ( const MeshKernel rclM  )  [virtual]

Validates the grid structure and rebuilds it if needed.

Implements MeshCore::MeshGrid.

Definition at line 664 of file Grid.cpp.

References MeshCore::MeshGrid::_pclMesh, MeshCore::MeshGrid::_ulCtElements, MeshCore::MeshGrid::Attach(), MeshCore::MeshKernel::CountFacets(), and RebuildGrid().

bool MeshFacetGrid::Verify (  )  const [virtual]

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

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