MeshKit
1.0
|
00001 /* 00002 * AF2RuleApplication.hpp 00003 * 00004 * An AF2RuleApplication is a representation of what is involved in applying 00005 * a particular AF2Rule is applied with a particular AF2Binding to points 00006 * and edges in some AF2Neighborhood. The representation is independent 00007 * of the particular AF2Rule and AF2Binding so that it can be easily 00008 * compared with other AF2RuleApplications that involve other rules 00009 * or bind to other points and edges in the AF2Neighborhood. 00010 * 00011 * The AF2RuleApplication tells which new points and new faces are to 00012 * be added by applying the particular rule with the particular binding. 00013 * The AF2Point2D objects referenced by the AF2Polygon2D faces are 00014 * either from the AF2Neighborhood or from the list of new points. Since 00015 * the points are copied when the AF2RuleApplication is copied, a reference 00016 * to a point from a polygon from a AF2RuleApplication will not match 00017 * any AF2Point2D reference returned by the getNewPoint method of 00018 * a copy of the AF2RuleApplication. 00019 */ 00020 #ifndef AF2RULEAPPLICATION_HPP 00021 #define AF2RULEAPPLICATION_HPP 00022 00023 // C++ 00024 #include <list> 00025 #include <map> 00026 00027 // MeshKit 00028 #include "meshkit/AF2Point2D.hpp" 00029 #include "meshkit/AF2Polygon2D.hpp" 00030 00031 class AF2RuleApplication 00032 { 00033 private: 00034 00035 unsigned int numNewPoints; 00036 const AF2Point2D** newPoints; 00037 unsigned int numNewFaces; 00038 const AF2Polygon2D** newFaces; 00039 00053 void mapCopyPolygon(const AF2Polygon2D & sourcePolygon, 00054 const AF2Polygon2D* & targetPolygon, 00055 const std::map<const AF2Point2D*, const AF2Point2D*> & vertexMap); 00056 00057 public: 00058 00084 AF2RuleApplication(std::list<const AF2Point2D*> const & newPointsList, 00085 std::list<const AF2Polygon2D*> const & newFacesList); 00086 00090 ~AF2RuleApplication(); 00091 00100 AF2RuleApplication(const AF2RuleApplication & toCopy); 00101 00111 AF2RuleApplication& operator=(const AF2RuleApplication & rhs); 00112 00119 unsigned int getNumNewFaces() const; 00120 00133 const AF2Polygon2D* getNewFace(unsigned int newFaceIndex) const; 00134 00141 unsigned int getNumNewPoints() const; 00142 00155 const AF2Point2D* getNewPoint(unsigned int newPointIndex) const; 00156 }; 00157 00158 #endif