BeamAdapter
Loading...
Searching...
No Matches
BeamAdapterActionController< DataTypes > Class Template Reference
Inheritance diagram for BeamAdapterActionController< DataTypes >:

Public Types

using interventionCtrl = InterventionalRadiologyController<DataTypes>
using Real = typename DataTypes::Real

Public Member Functions

 SOFA_CLASS (SOFA_TEMPLATE(BeamAdapterActionController, DataTypes), SOFA_TEMPLATE(sofa::component::controller::MechanicalStateController, DataTypes))
void init () override
 Method to init the component. Will search for a InterventionalRadiologyController using link.
void onBeginAnimationStep (const double dt) override
 Method called at each timestep. Will check if an action has to be read or write.
void onKeyPressedEvent (core::objectmodel::KeypressedEvent *kev) override
 Method to control the Beam using keyboard and save the actions in.
void onKeyReleasedEvent (core::objectmodel::KeyreleasedEvent *kev) override
void onMouseEvent (core::objectmodel::MouseEvent *ev) override
 Unused metho for mouse event.

Public Attributes

Data< bool > d_writeMode
 If true, will accumulate actions in.
Data< type::vector< int > > d_actions
 List of actions to import or export.
Data< type::vector< std::string > > d_actionString
 List of actions to import or export as string.
Data< type::vector< Real > > d_timeSteps
 List of key times corresponding to BeamActions in.
Data< int > d_currentAction
 current action status for read only from outside of the component. Will be updated at each timestep.
SingleLink< BeamAdapterActionController< DataTypes >, InterventionalRadiologyController< DataTypes >, BaseLink::FLAG_STOREPATH|BaseLink::FLAG_STRONGLINK > l_interventionController
 Link to the InterventionalRadiologyController, controlling the Beam, to script.

Member Function Documentation

◆ init()

template<class DataTypes>
void init ( )
override

Method to init the component. Will search for a InterventionalRadiologyController using link.

See also
l_interventionController

◆ onKeyPressedEvent()

template<class DataTypes>
void onKeyPressedEvent ( core::objectmodel::KeypressedEvent * kev)
override

Method to control the Beam using keyboard and save the actions in.

See also
d_actions

Control keys for interventonal Radiology simulations:

Member Data Documentation

◆ d_timeSteps

template<class DataTypes>
Data<type::vector<Real> > d_timeSteps

List of key times corresponding to BeamActions in.

See also
d_actions or
d_actionString

◆ d_writeMode

template<class DataTypes>
Data<bool> d_writeMode

If true, will accumulate actions in.

See also
d_actions for export. Press key E for export.