MeshKit  1.0
AF2RuleExistEdge.hpp
Go to the documentation of this file.
00001 /*
00002  * AF2RuleExistEdge.hpp
00003  *
00004  * A specification of an edge that must exist in order for a rule to
00005  * be applied.
00006  *
00007  * Note that the vector difference referred to in this class is the
00008  * second endpoint minus the first endpoint.  The order of the points
00009  * also matters when testing whether an actual edge matches this
00010  * specification.  The points should be ordered so that the region that
00011  * still needs to be meshed is to the left, i.e., ordered in a
00012  * counterclockwise traversal of the boundary of the unmeshed region.
00013  */
00014 #ifndef AF2RULEEXISTEDGE_HPP
00015 #define AF2RULEEXISTEDGE_HPP
00016 
00017 // MeshKit
00018 #include "meshkit/AF2Point2D.hpp"
00019 #include "meshkit/AF2RuleExistVertex.hpp"
00020 
00021 class AF2RuleExistEdge
00022 {
00023   private:
00024 
00025     const AF2RuleExistVertex* firstVertexPtr;
00026     const AF2RuleExistVertex* secondVertexPtr;
00027     double vecDiffX, vecDiffY;
00028     double a, b, c;
00029 
00030   public:
00031 
00061     AF2RuleExistEdge(const AF2RuleExistVertex* firstVtx,
00062         const AF2RuleExistVertex* secondVtx, double coeffAlpha = 0.0,
00063         double coeffBravo = 0.0, double coeffCharlie = 0.0);
00064 
00069     const AF2RuleExistVertex* getStart() const;
00070 
00075     const AF2RuleExistVertex* getEnd() const;
00076 
00097     bool isMatching(AF2Point2D const & startPnt,
00098         AF2Point2D const & endPnt, double maxDeviation) const;
00099 };
00100 
00101 #endif
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines