MeshKit
1.0
|
#include <AF2RuleExistEdge.hpp>
Public Member Functions | |
AF2RuleExistEdge (const AF2RuleExistVertex *firstVtx, const AF2RuleExistVertex *secondVtx, double coeffAlpha=0.0, double coeffBravo=0.0, double coeffCharlie=0.0) | |
Constructor. | |
const AF2RuleExistVertex * | getStart () const |
Get a constant pointer to the AF2RuleExistVertex that the starting endpoint of this edge must match. | |
const AF2RuleExistVertex * | getEnd () const |
Get a constant pointer to the AF2RuleExistVertex that the ending endpoint of this edge must match. | |
bool | isMatching (AF2Point2D const &startPnt, AF2Point2D const &endPnt, double maxDeviation) const |
Check whether a pair of points is a match for this edge, assuming that the first point of the pair matches the start endpoint of the edge and the second point of the pair matches the end endpoint of the edge. | |
Private Attributes | |
const AF2RuleExistVertex * | firstVertexPtr |
const AF2RuleExistVertex * | secondVertexPtr |
double | vecDiffX |
double | vecDiffY |
double | a |
double | b |
double | c |
Definition at line 21 of file AF2RuleExistEdge.hpp.
AF2RuleExistEdge | ( | const AF2RuleExistVertex * | firstVtx, |
const AF2RuleExistVertex * | secondVtx, | ||
double | coeffAlpha = 0.0 , |
||
double | coeffBravo = 0.0 , |
||
double | coeffCharlie = 0.0 |
||
) |
Constructor.
The constructor requires pointers to the two endpoints of the edge that must exist in order for the local neighborhood to match the rule. The context that calls this constructor is responsible for ensuring that the pointers are valid at the time the constructor is called and remain valid until this object is destructed.
The constructor also requires quadratic coefficients to use in checking whether the vector difference between the two points that match the endpoints of the edge (assuming such points exist) is an acceptable match for the vector difference between points at the ideal coordinates.
The default values for the quadratic coefficients have the effect that any vector difference is acceptable as long as the endpoints of the edge match.
firstVtx | a pointer to the starting endpoint of the edge |
secondVtx | a pointer to the ending endpoint of the edge |
coeffAlpha | the coefficient of dx*dx to use when measuring deviation from the vector difference between the ideal coordinates |
coeffBravo | the coefficient of dx*dy to use when measuring deviation from the vector difference between the ideal coordinates |
coeffCharlie | the coefficient of dy*dy to use when measuring deviation from the vector difference between the ideal coordinates |
Definition at line 3 of file AF2RuleExistEdge.cpp.
const AF2RuleExistVertex * getEnd | ( | ) | const |
Get a constant pointer to the AF2RuleExistVertex that the ending endpoint of this edge must match.
Definition at line 21 of file AF2RuleExistEdge.cpp.
const AF2RuleExistVertex * getStart | ( | ) | const |
Get a constant pointer to the AF2RuleExistVertex that the starting endpoint of this edge must match.
Definition at line 16 of file AF2RuleExistEdge.cpp.
bool isMatching | ( | AF2Point2D const & | startPnt, |
AF2Point2D const & | endPnt, | ||
double | maxDeviation | ||
) | const |
Check whether a pair of points is a match for this edge, assuming that the first point of the pair matches the start endpoint of the edge and the second point of the pair matches the end endpoint of the edge.
startPnt | a point that is a potential match for the start endpoint of the edge and the first of a pair of points that is to be checked as a potential match for the edge |
endPnt | a point that is a potential match for the end endpoint of the edge and the second of a pair of points that is to be checked as a potential match for the edge |
maxDeviation | the maximum deviation that the vector difference between the points passed in may have from the vector difference between the reference coordinates (when measured with the quadratic coefficients) and still be counted as a match |
Definition at line 26 of file AF2RuleExistEdge.cpp.
double a [private] |
Definition at line 28 of file AF2RuleExistEdge.hpp.
double b [private] |
Definition at line 28 of file AF2RuleExistEdge.hpp.
double c [private] |
Definition at line 28 of file AF2RuleExistEdge.hpp.
const AF2RuleExistVertex* firstVertexPtr [private] |
Definition at line 25 of file AF2RuleExistEdge.hpp.
const AF2RuleExistVertex* secondVertexPtr [private] |
Definition at line 26 of file AF2RuleExistEdge.hpp.
double vecDiffX [private] |
Definition at line 27 of file AF2RuleExistEdge.hpp.
double vecDiffY [private] |
Definition at line 27 of file AF2RuleExistEdge.hpp.