Main Page | Modules | Namespace List | Class Hierarchy | Class List | Namespace Members | Class Members

TranslationProcessor Class Reference
[Geometric property processors.]

Translation processor. More...

#include <geometricTransformations.h>

Inheritance diagram for TranslationProcessor:

UnaryProcessor< Atom > UnaryFunctor< Atom, Processor::Result > List of all members.

Public Member Functions

 TranslationProcessor ()
 Default constructor.
 TranslationProcessor (const Vector3 &translation)
 Constructor.
void setTranslation (const Vector3 &translation)
 Sets a new translation.
const Vector3getTranslation () const
 Returns the translation vector.
virtual Processor::Result operator() (Atom &atom)
 Applicator method.

Detailed Description

Translation processor.

This processor executes a translation on each atom of a given Composite object. The translation may be given in the constructor, or by calling setTranslation. Applying the processor to a given Composite object will add the given translation vector to the coordinates of each Atom object (and derived classes).


Constructor & Destructor Documentation

TranslationProcessor::TranslationProcessor  ) 
 

Default constructor.

The translation applicator object is initialized and the transformation is set to (0, 0, 0).

TranslationProcessor::TranslationProcessor const Vector3 translation  ) 
 

Constructor.

Creates a new instance of a TranslationProcessor and sets the translation vector.

Parameters:
translation the new translation vector


Member Function Documentation

const Vector3& TranslationProcessor::getTranslation  )  const
 

Returns the translation vector.

Returns:
the current translation vector

void TranslationProcessor::setTranslation const Vector3 translation  ) 
 

Sets a new translation.

Parameters:
translation the new translation vector