Branch data Line data Source code
1 : : /*
2 : : * AF2PointTransform.hpp
3 : : *
4 : : * An AF2PointTransform is an object that is able to modify the coordinates
5 : : * of a reference point based on an AF2Binding.
6 : : */
7 : :
8 : : #ifndef AF2POINTTRANSFORM_HPP
9 : : #define AF2POINTTRANSFORM_HPP
10 : :
11 : : // MeshKit
12 : : #include "meshkit/AF2Point2D.hpp"
13 : : #include "meshkit/AF2Binding.hpp"
14 : :
15 : 3547 : class AF2PointTransform
16 : : {
17 : : public:
18 : :
19 [ - + ]: 7094 : virtual ~AF2PointTransform() {}
20 : :
21 : : /**
22 : : * \brief Transform a point based on an AF2Binding
23 : : *
24 : : * Given (the reference coordinates of) a 2-dimensional point and
25 : : * a binding that assigns actual coordinates (AF2Point2D points) to
26 : : * the reference AF2RuleExistingVertex vertices of a rule, transform
27 : : * the point from its reference location to a location that is
28 : : * appropriate to the binding.
29 : : *
30 : : * This method assumes that the binding is complete, i.e.,
31 : : * that every reference AF2RuleExistingVertex on the AF2Binding
32 : : * has been assigned an AF2Point2D.
33 : : *
34 : : * \param point the coordinates of some 2-dimensional point
35 : : * \param vBinding a binding of reference vertices to points with actual
36 : : * coordinates
37 : : * \return a 2-dimensional point transformed from the value of the first
38 : : * argument based on the binding
39 : : */
40 : : virtual AF2Point2D transformPoint(AF2Point2D const & point,
41 : : AF2Binding const & vBinding) const = 0;
42 : :
43 : : /**
44 : : * \brief Make and return an independent copy of yourself.
45 : : *
46 : : * This method supports making copies of the concrete derived class that
47 : : * an AF2PointTransform pointer references.
48 : : *
49 : : * Deletion of the object pointed to by the pointer returned from this
50 : : * method must be managed by the context that calls the method.
51 : : */
52 : : virtual AF2PointTransform* clone() const = 0;
53 : : };
54 : :
55 : : #endif
|