MeshKit  1.0
AF2FreeZone Class Reference

#include <AF2FreeZone.hpp>

List of all members.

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< AF2Point2Dvertices
double minX
double maxX
double minY
double maxY
double scale

Detailed Description

Definition at line 25 of file AF2FreeZone.hpp.


Constructor & Destructor Documentation

AF2FreeZone ( std::list< AF2Point2D > const &  bndryPoints)

Constructor.

Definition at line 5 of file AF2FreeZone.cpp.


Member Function Documentation

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.

Returns:
true if the free zone is convex, false otherwise

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.

Parameters:
pointthe point to check
containsBndryif 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
Returns:
true if the free zone contains the point or nearly contains the point, false otherwise

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.

Parameters:
pointAlphaone of the two points to test
pointBravothe other of the two points to test
Returns:
true if the points are equal or nearly equal, false otherwise

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.

Parameters:
startPointone endpoint of the line segment
endPointthe other endpoint of the line segment
containsBndryif 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.
Returns:
true if the free zone intersects or nearly intersects the line segment, false otherwise

Definition at line 115 of file AF2FreeZone.cpp.


Member Data Documentation

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.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines