Carna Registration API Version 1.16.0
Signals | Public Member Functions
CRA::Registration Class Reference

Represents a registration. More...

#include <Registration.h>

Collaboration diagram for CRA::Registration:

List of all members.

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

Detailed Description

Represents a registration.

Attention:
The transformation must be performed to the scene space in millimeters, not in model units.
Author:
Leonid Kostrykin
Date:
23.3.12 - 17.8.12

Definition at line 42 of file Registration.h.


Member Function Documentation

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.

Precondition:
hasCustomTranslation() == true
See also:
setCustomTranslation, removeCustomTranslation, hasCustomTranslation
Since:
1.7
bool CRA::Registration::hasCustomTranslation ( ) const

Tells whether a custom translation vector is being used or the original one.

See also:
setCustomTranslation, removeCustomTranslation, getCustomTranslation
void CRA::Registration::removeCustomTranslation ( )

Resets this registration's transformation to the originally supplied translation vector.

Postcondition:
hasCustomTranslation() == false

Emits the transformationChanged signal.

See also:
setCustomTranslation, hasCustomTranslation, getCustomTranslation
void CRA::Registration::setCustomTranslation ( const Vector &  )

Overwrites the translation vector of the previously supplied transformation matrix.

The translation vector must be given in millimeters.

Postcondition:
hasCustomTranslation() == true

Emits the transformationChanged signal.

See also:
removeCustomTranslation, hasCustomTranslation, getCustomTranslation
Since:
1.7
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.


The documentation for this class was generated from the following file:
 All Classes Functions Variables Enumerations Enumerator