Interface class for all transformable objects. More...
#include <>>

Public Member Functions | |
| Transformable () | |
| Constructor. | |
| virtual | ~Transformable () |
| Destructor. | |
Protected Member Functions | |
| void | transform (const HomTransform &t) |
| Apply the transform to all registered primitives and call the post_transform() method. | |
| void | add_primitive (HomCoord *c) |
| Add a primitive to the list of primitives that is transformed. | |
| void | clear_primitives () |
| Clear the list of primitives. | |
| virtual void | register_primitives ()=0 |
| Here, a derived class should register its primitives (HomPoints and HomVectors) by calling add_primitive for each of those. | |
| virtual void | post_transform ()=0 |
| This method is called after the primitives are transformed. | |
Friends | |
| class | HomTransform |
Interface class for all transformable objects.
In order to be tranformable by multiplying the geometric object with a fawkes::HomTransform it should be derived from this class (although it doesn't have to).
Definition at line 34 of file transformable.h.
| fawkes::Transformable::Transformable | ( | ) |
Constructor.
Definition at line 48 of file transformable.cpp.
| fawkes::Transformable::~Transformable | ( | ) | [virtual] |
Destructor.
Definition at line 54 of file transformable.cpp.
| void fawkes::Transformable::add_primitive | ( | HomCoord * | c | ) | [protected] |
Add a primitive to the list of primitives that is transformed.
| c | a primitive (a HomCoord or an object of a derived class) |
Definition at line 62 of file transformable.cpp.
Referenced by fawkes::Spline::register_primitives(), fawkes::HomPose2d::register_primitives(), and fawkes::Bezier::register_primitives().
| void fawkes::Transformable::clear_primitives | ( | ) | [protected] |
Clear the list of primitives.
Definition at line 69 of file transformable.cpp.
Referenced by fawkes::Bezier::Bezier(), fawkes::LineSegment::LineSegment(), fawkes::Spline::set_control_point(), fawkes::Bezier::set_control_point(), fawkes::Spline::set_control_points(), and fawkes::Bezier::set_control_points().
| void fawkes::Transformable::post_transform | ( | ) | [protected, pure virtual] |
This method is called after the primitives are transformed.
Any additional updates that need to be done should be done here.
Implemented in fawkes::Bezier, fawkes::HomPose2d, and fawkes::Spline.
Referenced by transform().
| void fawkes::Transformable::register_primitives | ( | ) | [protected, pure virtual] |
Here, a derived class should register its primitives (HomPoints and HomVectors) by calling add_primitive for each of those.
Implemented in fawkes::Bezier, fawkes::HomPose2d, and fawkes::Spline.
| void fawkes::Transformable::transform | ( | const HomTransform & | t | ) | [protected] |
Apply the transform to all registered primitives and call the post_transform() method.
| t | a transform |
Definition at line 79 of file transformable.cpp.
References post_transform(), and fawkes::HomCoord::transform().
1.7.1