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