The MeshPlaneVisitor collects all facets the are co-planar to the plane defined by the start triangle. More...
#include <Visitor.h>
Public Member Functions | |
bool | AllowVisit (const MeshFacet &face, const MeshFacet &, unsigned long, unsigned long, unsigned short neighbourIndex) |
Test before a facet will be flagged as VISIT, return false means: go on with visiting the facets but not this one and set not the VISIT flag. | |
MeshPlaneVisitor (const MeshKernel &mesh, unsigned long index, float deviation, std::vector< unsigned long > &indices) | |
bool | Visit (const MeshFacet &face, const MeshFacet &, unsigned long ulFInd, unsigned long) |
Needs to be implemented in sub-classes. | |
virtual | ~MeshPlaneVisitor () |
Protected Attributes | |
Base::Vector3f | basepoint |
PlaneFit * | fitter |
std::vector< unsigned long > & | indices |
float | max_deviation |
const MeshKernel & | mesh |
Base::Vector3f | normal |
The MeshPlaneVisitor collects all facets the are co-planar to the plane defined by the start triangle.
Definition at line 135 of file Visitor.h.
MeshPlaneVisitor::MeshPlaneVisitor | ( | const MeshKernel & | mesh, | |
unsigned long | index, | |||
float | deviation, | |||
std::vector< unsigned long > & | indices | |||
) |
Definition at line 180 of file Visitor.cpp.
References MeshCore::MeshGeomFacet::_aclPoints, MeshCore::Approximation::AddPoint(), basepoint, fitter, MeshCore::MeshKernel::GetFacet(), MeshCore::MeshGeomFacet::GetGravityPoint(), MeshCore::MeshGeomFacet::GetNormal(), and normal.
MeshPlaneVisitor::~MeshPlaneVisitor | ( | ) | [virtual] |
Definition at line 192 of file Visitor.cpp.
References fitter.
bool MeshPlaneVisitor::AllowVisit | ( | const MeshFacet & | rclFacet, | |
const MeshFacet & | rclFrom, | |||
unsigned long | ulFInd, | |||
unsigned long | ulLevel, | |||
unsigned short | neighbourIndex | |||
) | [virtual] |
Test before a facet will be flagged as VISIT, return false means: go on with visiting the facets but not this one and set not the VISIT flag.
Reimplemented from MeshCore::MeshFacetVisitor.
Definition at line 197 of file Visitor.cpp.
References MeshCore::MeshGeomFacet::_aclPoints, MeshCore::Approximation::Done(), MeshCore::PlaneFit::Fit(), fitter, MeshCore::PlaneFit::GetDistanceToPlane(), MeshCore::MeshKernel::GetFacet(), max_deviation, and mesh.
bool MeshPlaneVisitor::Visit | ( | const MeshFacet & | rclFacet, | |
const MeshFacet & | rclFrom, | |||
unsigned long | ulFInd, | |||
unsigned | ulLevel | |||
) | [virtual] |
Needs to be implemented in sub-classes.
rclFacet is the currently visited facet with the index ulFInd, rclFrom is the last visited facet and ulLevel indicates the ring number around the start facet. If true is returned the next iteration is done if there are still facets to visit. If false is returned the calling method stops immediately visiting further facets.
Implements MeshCore::MeshFacetVisitor.
Definition at line 210 of file Visitor.cpp.
References MeshCore::Approximation::AddPoint(), fitter, MeshCore::MeshKernel::GetFacet(), MeshCore::MeshGeomFacet::GetGravityPoint(), indices, and mesh.
Base::Vector3f MeshCore::MeshPlaneVisitor::basepoint [protected] |
Definition at line 151 of file Visitor.h.
Referenced by MeshPlaneVisitor().
PlaneFit* MeshCore::MeshPlaneVisitor::fitter [protected] |
Definition at line 154 of file Visitor.h.
Referenced by AllowVisit(), MeshPlaneVisitor(), Visit(), and ~MeshPlaneVisitor().
std::vector<unsigned long>& MeshCore::MeshPlaneVisitor::indices [protected] |
float MeshCore::MeshPlaneVisitor::max_deviation [protected] |
Definition at line 153 of file Visitor.h.
Referenced by AllowVisit().
const MeshKernel& MeshCore::MeshPlaneVisitor::mesh [protected] |
Definition at line 149 of file Visitor.h.
Referenced by AllowVisit(), and Visit().
Base::Vector3f MeshCore::MeshPlaneVisitor::normal [protected] |
Definition at line 152 of file Visitor.h.
Referenced by MeshPlaneVisitor().