MeshKit
1.0
|
#include <AF2FreeZone.hpp>
Public Member Functions | |
AF2FreeZone (std::list< AF2Point2D > const &bndryPoints) | |
Constructor. | |
bool | nearContains (AF2Point2D const &testPnt, bool const &containsBndry=false) const |
Check whether the free zone contains (or nearly contains) a specified point. | |
bool | nearIntersects (AF2Point2D const &startPoint, AF2Point2D const &endPoint, bool const &containsBndry=false) const |
Check whether the free zone intersects (or nearly intersects) a line segment given the two endpoints of the line segment. | |
bool | isConvex () const |
Verify that the free zone is convex, and that the boundary points are given in a counter-clockwise ordering. | |
Private Member Functions | |
bool | nearEqual (AF2Point2D const &pointAlpha, AF2Point2D const &pointBravo) const |
Check whether two points are equal or nearly equal. | |
Private Attributes | |
std::list< AF2Point2D > | vertices |
double | minX |
double | maxX |
double | minY |
double | maxY |
double | scale |
Definition at line 25 of file AF2FreeZone.hpp.
AF2FreeZone | ( | std::list< AF2Point2D > const & | bndryPoints | ) |
Constructor.
Definition at line 5 of file AF2FreeZone.cpp.
bool isConvex | ( | ) | const |
Verify that the free zone is convex, and that the boundary points are given in a counter-clockwise ordering.
If the free zone is not actually convex or the boundary points were not given in a counter-clockwise ordering, the behavior of other methods in this class is not defined.
Definition at line 278 of file AF2FreeZone.cpp.
bool nearContains | ( | AF2Point2D const & | testPnt, |
bool const & | containsBndry = false |
||
) | const |
Check whether the free zone contains (or nearly contains) a specified point.
point | the point to check |
containsBndry | if false, the method treats query points that are nearly equal to a free zone boundary point as not contained, even if they are actually mathematically on or in the free zone |
Definition at line 44 of file AF2FreeZone.cpp.
bool nearEqual | ( | AF2Point2D const & | pointAlpha, |
AF2Point2D const & | pointBravo | ||
) | const [private] |
Check whether two points are equal or nearly equal.
Near equality is measured relative to the scale of the free zone.
pointAlpha | one of the two points to test |
pointBravo | the other of the two points to test |
Definition at line 107 of file AF2FreeZone.cpp.
bool nearIntersects | ( | AF2Point2D const & | startPoint, |
AF2Point2D const & | endPoint, | ||
bool const & | containsBndry = false |
||
) | const |
Check whether the free zone intersects (or nearly intersects) a line segment given the two endpoints of the line segment.
startPoint | one endpoint of the line segment |
endPoint | the other endpoint of the line segment |
containsBndry | if false, the method treats query line segments that are nearly equal to free zone boundary line segments as not intersecting, even if they actually mathematically do intersect the free zone or lie on its boundary. This applies only if the query line segment is nearly equal to the full boundary line segment, i.e., if each endpoint of the query line segment is nearly equal to one of a pair of consective free zone boundary points. Also, if false, a query line segment that has one endpoint that is nearly equal to a free zone boundary point will be treated as nonintersecting if the only intersection or near intersection is in the neighborhood of that free zone boundary point. |
Definition at line 115 of file AF2FreeZone.cpp.
double maxX [private] |
Definition at line 35 of file AF2FreeZone.hpp.
double maxY [private] |
Definition at line 37 of file AF2FreeZone.hpp.
double minX [private] |
Definition at line 34 of file AF2FreeZone.hpp.
double minY [private] |
Definition at line 36 of file AF2FreeZone.hpp.
double scale [private] |
Definition at line 40 of file AF2FreeZone.hpp.
std::list<AF2Point2D> vertices [private] |
Definition at line 31 of file AF2FreeZone.hpp.