Changes in src/Shapes/ShapeOps_impl.hpp [c6f395:5e588b5]
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/Shapes/ShapeOps_impl.hpp
rc6f395 r5e588b5 13 13 #include "Matrix.hpp" 14 14 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 15 class Resize_impl : public Shape_impl 33 16 { 34 17 public: 35 18 Resize_impl(const Shape::impl_ptr&,double); 36 19 virtual ~Resize_impl(); 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(); 20 virtual bool isInside(const Vector& point); 42 21 private: 22 Shape::impl_ptr arg; 43 23 double size; 44 24 }; 45 25 46 class Translate_impl : public Shape OpsBase_impl26 class Translate_impl : public Shape_impl 47 27 { 48 28 public: 49 29 Translate_impl(const Shape::impl_ptr&, const Vector&); 50 30 virtual ~Translate_impl(); 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(); 31 virtual bool isInside(const Vector& point); 56 32 private: 33 Shape::impl_ptr arg; 57 34 Vector offset; 58 35 }; 59 36 60 class Stretch_impl : public Shape OpsBase_impl37 class Stretch_impl : public Shape_impl 61 38 { 62 39 public: 63 40 Stretch_impl(const Shape::impl_ptr&, const Vector&); 64 41 virtual ~Stretch_impl(); 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(); 42 virtual bool isInside(const Vector& point); 70 43 private: 44 Shape::impl_ptr arg; 71 45 Vector factors; 72 46 Vector reciFactors; 73 47 }; 74 48 75 class Transform_impl : public Shape OpsBase_impl49 class Transform_impl : public Shape_impl 76 50 { 77 51 public: 78 52 Transform_impl(const Shape::impl_ptr&, const Matrix&); 79 53 virtual ~Transform_impl(); 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(); 54 virtual bool isInside(const Vector& point); 85 55 private: 56 Shape::impl_ptr arg; 86 57 Matrix transformation; 87 58 Matrix transformationInv;
Note:
See TracChangeset
for help on using the changeset viewer.