Fawkes API
Fawkes Development Version
|
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.
|
virtual |
Destructor.
Definition at line 54 of file transformable.cpp.
|
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::LineSegment::register_primitives(), fawkes::Spline::register_primitives(), fawkes::Bezier::register_primitives(), and fawkes::HomPose2d::register_primitives().
|
protected |
Clear the list of primitives.
Definition at line 69 of file transformable.cpp.
Referenced by fawkes::Bezier::Bezier(), fawkes::LineSegment::LineSegment(), fawkes::Bezier::set_control_point(), fawkes::Spline::set_control_point(), fawkes::Bezier::set_control_points(), and fawkes::Spline::set_control_points().
|
protectedpure 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, fawkes::Spline, and fawkes::LineSegment.
Referenced by transform().
|
protectedpure 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, fawkes::Spline, and fawkes::LineSegment.
|
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().