MeshKit
1.0
|
00001 /* 00002 * AF2PntTrnsfmLnrV.hpp 00003 * 00004 * \brief A point transformation that moves the point by some linear 00005 * transformation of the difference between the points that specified 00006 * reference vertices are bound to and the locations of the reference 00007 * vertices themselves. 00008 * 00009 * This implementation does not make use of a linear transformation matrix. 00010 * Instead it performs the low-level calculations of multiplying coefficients 00011 * by the vertex binding differences and summing the result. 00012 */ 00013 00014 #ifndef AF2PNTTRNSFRMLNRV_HPP 00015 #define AF2PNTTRNSFRMLNRV_HPP 00016 00017 // C++ 00018 #include <list> 00019 #include <vector> 00020 00021 // MeshKit 00022 #include "meshkit/AF2PointTransform.hpp" 00023 #include "meshkit/AF2RuleExistVertex.hpp" 00024 00025 class AF2PntTrnsfrmLnrV : public AF2PointTransform 00026 { 00027 private: 00028 00029 std::vector<const AF2RuleExistVertex*> refVertices; 00030 std::vector<double> xCoeff; 00031 std::vector<double> yCoeff; 00032 00033 public: 00034 00077 AF2PntTrnsfrmLnrV(std::list<const AF2RuleExistVertex*> vertices, 00078 std::list<double> xDiffCoeff, std::list<double> yDiffCoeff); 00079 00095 AF2PntTrnsfrmLnrV(std::vector<const AF2RuleExistVertex*> vertices, 00096 std::vector<double> xDiffCoeff, std::vector<double> yDiffCoeff); 00097 00105 virtual AF2PntTrnsfrmLnrV* clone() const; 00106 00129 virtual AF2Point2D transformPoint(AF2Point2D const & point, 00130 AF2Binding const & vBinding) const; 00131 }; 00132 00133 #endif