Carna Registration API Version 1.16.0
|
Represents a registration. More...
#include <Registration.h>
Signals | |
void | transformationChanged () |
Emitted whenever the transformation matrix changes. | |
void | transformationChanged (const Transformation &) |
Emitted whenever the transformation matrix changes. | |
Public Member Functions | |
Registration (Tool &referenceBase) | |
Creates new registration for given reference base. | |
~Registration () | |
Releases acquired resources. | |
void | setReferenceBase (Tool &) |
Associates another reference base. | |
Tool & | getReferenceBase () const |
References the associated reference base. | |
void | setTransformation (const Transformation &) |
Sets the matrix which transforms from the reference base's space to scene space. | |
const Transformation & | getTransformation () const |
Tells the current transformation matrix of this registration. | |
void | setCustomTranslation (const Vector &) |
Overwrites the translation vector of the previously supplied transformation matrix. | |
void | removeCustomTranslation () |
Resets this registration's transformation to the originally supplied translation vector. | |
const Vector & | getCustomTranslation () const |
Tells the currently set custom translation vector. | |
bool | hasCustomTranslation () const |
Tells whether a custom translation vector is being used or the original one. | |
void | add (const Link &) |
Links a tool with a virtual scene element. | |
void | remove (const Link &) |
Releases the link of a tool and a virtual scene element. | |
const std::set< Link > & | getLinks () const |
Tells all existing links. | |
void | updateVirtualElements () |
Updates the linked virtual scene elements. |
Represents a registration.
Definition at line 42 of file Registration.h.
void CRA::Registration::add | ( | const Link & | ) |
Links a tool with a virtual scene element.
The linked virtual scene element gets moved when it's physical representation's position changes.
const Vector& CRA::Registration::getCustomTranslation | ( | ) | const |
Tells the currently set custom translation vector.
hasCustomTranslation() == true
bool CRA::Registration::hasCustomTranslation | ( | ) | const |
Tells whether a custom translation vector is being used or the original one.
void CRA::Registration::removeCustomTranslation | ( | ) |
Resets this registration's transformation to the originally supplied translation vector.
hasCustomTranslation() == false
Emits the transformationChanged signal.
void CRA::Registration::setCustomTranslation | ( | const Vector & | ) |
Overwrites the translation vector of the previously supplied transformation matrix.
The translation vector must be given in millimeters.
hasCustomTranslation() == true
Emits the transformationChanged signal.
void CRA::Registration::setTransformation | ( | const Transformation & | ) |
Sets the matrix which transforms from the reference base's space to scene space.
The supplied transformation is expected to map coordinates from reference base's local space to the scene space in millimeters, not in model units.
Emits the transformationChanged signal.
void CRA::Registration::updateVirtualElements | ( | ) |
Updates the linked virtual scene elements.
For each linked virtual scene element, it's \( T \)-transformed bearing to the reference base is passed to it's VirtualElement::update method. \( T \) is the current transformation matrix, which is returned by getTransformation.
Documentation generated by Doxygen