Fawkes API  Fawkes Development Version
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
fawkes::Transformable Class Reference

Interface class for all transformable objects. More...

#include <>>

Inheritance diagram for fawkes::Transformable:

List of all members.

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

Detailed Description

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).

Author:
Daniel Beck

Definition at line 34 of file transformable.h.


Constructor & Destructor Documentation

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.


Member Function Documentation

void fawkes::Transformable::add_primitive ( HomCoord c)
protected

Add a primitive to the list of primitives that is transformed.

Parameters:
ca 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().

void fawkes::Transformable::clear_primitives ( )
protected
void fawkes::Transformable::post_transform ( )
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().

void fawkes::Transformable::register_primitives ( )
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.

void fawkes::Transformable::transform ( const HomTransform t)
protected

Apply the transform to all registered primitives and call the post_transform() method.

Parameters:
ta transform

Definition at line 79 of file transformable.cpp.

References post_transform(), and fawkes::HomCoord::transform().


The documentation for this class was generated from the following files: