Changes in src/Shapes/ShapeOps_impl.hpp [5e588b5:c6f395]
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/Shapes/ShapeOps_impl.hpp
r5e588b5 rc6f395 13 13 #include "Matrix.hpp" 14 14 15 class Resize_impl : public Shape_impl 15 class ShapeOpsBase_impl : public Shape_impl{ 16 public: 17 ShapeOpsBase_impl(const Shape::impl_ptr&); 18 virtual ~ShapeOpsBase_impl(); 19 virtual bool isInside(const Vector &point); 20 virtual bool isOnSurface(const Vector &point); 21 virtual Vector getNormal(const Vector &point) throw (NotOnSurfaceException); 22 virtual LineSegmentSet getLineIntersections(const Line&); 23 protected: 24 virtual Vector translateIn(const Vector &point)=0; 25 virtual Vector translateOutPos(const Vector &point)=0; 26 virtual Vector translateOutNormal(const Vector &point)=0; 27 Shape::impl_ptr getArg(); 28 private: 29 Shape::impl_ptr arg; 30 }; 31 32 class Resize_impl : public ShapeOpsBase_impl 16 33 { 17 34 public: 18 35 Resize_impl(const Shape::impl_ptr&,double); 19 36 virtual ~Resize_impl(); 20 virtual bool isInside(const Vector& point); 37 protected: 38 virtual Vector translateIn(const Vector &point); 39 virtual Vector translateOutPos(const Vector &point); 40 virtual Vector translateOutNormal(const Vector &point); 41 virtual std::string toString(); 21 42 private: 22 Shape::impl_ptr arg;23 43 double size; 24 44 }; 25 45 26 class Translate_impl : public Shape _impl46 class Translate_impl : public ShapeOpsBase_impl 27 47 { 28 48 public: 29 49 Translate_impl(const Shape::impl_ptr&, const Vector&); 30 50 virtual ~Translate_impl(); 31 virtual bool isInside(const Vector& point); 51 protected: 52 virtual Vector translateIn(const Vector &point); 53 virtual Vector translateOutPos(const Vector &point); 54 virtual Vector translateOutNormal(const Vector &point); 55 virtual std::string toString(); 32 56 private: 33 Shape::impl_ptr arg;34 57 Vector offset; 35 58 }; 36 59 37 class Stretch_impl : public Shape _impl60 class Stretch_impl : public ShapeOpsBase_impl 38 61 { 39 62 public: 40 63 Stretch_impl(const Shape::impl_ptr&, const Vector&); 41 64 virtual ~Stretch_impl(); 42 virtual bool isInside(const Vector& point); 65 protected: 66 virtual Vector translateIn(const Vector &point); 67 virtual Vector translateOutPos(const Vector &point); 68 virtual Vector translateOutNormal(const Vector &point); 69 virtual std::string toString(); 43 70 private: 44 Shape::impl_ptr arg;45 71 Vector factors; 46 72 Vector reciFactors; 47 73 }; 48 74 49 class Transform_impl : public Shape _impl75 class Transform_impl : public ShapeOpsBase_impl 50 76 { 51 77 public: 52 78 Transform_impl(const Shape::impl_ptr&, const Matrix&); 53 79 virtual ~Transform_impl(); 54 virtual bool isInside(const Vector& point); 80 protected: 81 virtual Vector translateIn(const Vector &point); 82 virtual Vector translateOutPos(const Vector &point); 83 virtual Vector translateOutNormal(const Vector &point); 84 virtual std::string toString(); 55 85 private: 56 Shape::impl_ptr arg;57 86 Matrix transformation; 58 87 Matrix transformationInv;
Note:
See TracChangeset
for help on using the changeset viewer.