Computer Assited Medical Intervention Tool Kit  version 4.0
Public Member Functions | Private Attributes | List of all members
AtomDecoration Class Reference

This class allows you to display a geometric object (arrow, sphere, ...) positionned on an atom. More...

#include <AtomDecoration.h>

Inherits Decoration.

Public Member Functions

 AtomDecoration (AtomDC *, camitk::GeometricObject::Geometry)
 this constructor set the current atom to follow More...
 
camitk::GeometricObject::Geometry getType () const
 
void setColor (const double, const double, const double)
 change the color of the geometric object More...
 
void setDirection (const double, const double, const double)
 set the direction of the of the object without updating the position More...
 
void setDirection (const double[3])
 set the direction of the object, without updating the position More...
 
void setPosition (const double, const double, const double)
 change the position of the geometric object (even if different from the atom's position) More...
 
void setSize (const double)
 change the size of the geometric object More...
 
void show (const bool)
 show the geometric object in 3D or not depending on the paramater More...
 
void update (const double, const double, const double)
 update the 3D representation More...
 
void update (const double[3])
 update the 3D representation More...
 
void update ()
 update the position of the geometric object (using the atom's position) More...
 
 ~AtomDecoration ()
 
- Public Member Functions inherited from Decoration
 Decoration (camitk::Component *theDC)
 
virtual ~Decoration ()
 virtual destructor More...
 

Private Attributes

AtommyAtom
 
camitk::GeometricObjectmyObject
 

Additional Inherited Members

- Protected Attributes inherited from Decoration
camitk::Componentdc
 the data component where the decoration is attached to More...
 

Detailed Description

This class allows you to display a geometric object (arrow, sphere, ...) positionned on an atom.

For example an arrow can represent a vector associated to the atom (e.g. a force, its velocity...)

Constructor & Destructor Documentation

◆ AtomDecoration()

AtomDecoration::AtomDecoration ( AtomDC adc,
camitk::GeometricObject::Geometry  t 
)

this constructor set the current atom to follow

References AtomDC::getAtom(), myAtom, myObject, and update().

◆ ~AtomDecoration()

AtomDecoration::~AtomDecoration ( )

Member Function Documentation

◆ getType()

camitk::GeometricObject::Geometry AtomDecoration::getType ( ) const
inline

◆ setColor()

void AtomDecoration::setColor ( const double  r,
const double  g,
const double  b 
)
virtual

change the color of the geometric object

Implements Decoration.

References myObject, and camitk::GeometricObject::setColor().

Referenced by LoadsManager::addDecoration().

◆ setDirection() [1/2]

void AtomDecoration::setDirection ( const double  x,
const double  y,
const double  z 
)

set the direction of the of the object without updating the position

References myObject, camitk::GeometricObject::setDirection(), and camitk::GeometricObject::setSize().

Referenced by setDirection(), and update().

◆ setDirection() [2/2]

void AtomDecoration::setDirection ( const double  v[3])

set the direction of the object, without updating the position

References setDirection().

◆ setPosition()

void AtomDecoration::setPosition ( const double  x,
const double  y,
const double  z 
)

change the position of the geometric object (even if different from the atom's position)

References myObject, and camitk::GeometricObject::setPosition().

Referenced by update().

◆ setSize()

void AtomDecoration::setSize ( const double  s)

change the size of the geometric object

References myObject, and camitk::GeometricObject::setSize().

Referenced by LoadsManager::addDecoration(), and LoadsManager::updateLoadsDisplay().

◆ show()

void AtomDecoration::show ( const bool  d)
virtual

◆ update() [1/3]

void AtomDecoration::update ( const double  x,
const double  y,
const double  z 
)

update the 3D representation

  • if the geometry is an arrow : update position of the geometric object using the atom's position and the three parameters as the new direction
  • if the geometry is a sphere: use the parameters as the new position (do not take into account the position of the atom.

References camitk::GeometricObject::getType(), myObject, setDirection(), setPosition(), and update().

Referenced by LoadsManager::addDecoration().

◆ update() [2/3]

void AtomDecoration::update ( const double  v[3])

update the 3D representation

  • if the geometry is an arrow : update position of the geometric object using the atom's position and and the new vector given in parameter as the new direction
  • if the geometry is a sphere: use the parameters as the new position (do not take into account the position of the atom.

References update().

◆ update() [3/3]

void AtomDecoration::update ( )
virtual

update the position of the geometric object (using the atom's position)

Implements Decoration.

References Atom::getPosition(), myAtom, myObject, and camitk::GeometricObject::setPosition().

Referenced by AtomDecoration(), and update().

Member Data Documentation

◆ myAtom

Atom* AtomDecoration::myAtom
private

Referenced by AtomDecoration(), and update().

◆ myObject

camitk::GeometricObject* AtomDecoration::myObject
private

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