SOFA plugin: Geomagic  master
Open source framework for multi-physics simuation
geomagic::GeomagicVisualModel Class Reference

#include <GeomagicVisualModel.h>

Detailed Description

Class used by GeomagicDriver to display the Geomagic device position and motion using visual models in the 3D scene.

Classes

struct  VisualComponent
 

Protected Attributes

VisualComponent visualNode [NVISUALNODE]
 
simulation::Node::SPtr m_omniVisualNode
 
component::statecontainer::MechanicalObject< sofa::defaulttype::Rigid3dTypes >::SPtr rigidDOF
 
VecCoord m_posDeviceVisu
 position of the hpatic devices for rendering. first pos is equal to d_posDevice More...
 

Static Protected Attributes

static const char * visualNodeNames [NVISUALNODE]
 
static const char * visualNodeFiles [NVISUALNODE]
 

Public Member Functions

 GeomagicVisualModel ()
 
virtual ~GeomagicVisualModel ()
 
void initDisplay (sofa::simulation::Node::SPtr node, const std::string &_deviceName, double _scale)
 Main Method to init the visual component tree of OGLModels. Called by Geomagic InitDevice() if drawVisual is on. More...
 
void updateDisplay (const GeomagicDriver::Coord &posDevice, GeomagicDriver::SHDdouble angle1[3], GeomagicDriver::SHDdouble angle2[3])
 Method to update the visualNode using the current device position and the angles of the different node of the device. Updated by Geomagic UpdatePosition() More...
 
void drawDevice (bool button1Status=false, bool button2Status=false)
 Method called by Geomagic Draw method to display the geomagic OglModel. More...
 
bool isDisplayActivated () const
 Get status if visualisation is activated. More...
 
void activateDisplay (bool value)
 Activate or not the visualisation. More...
 
bool isDisplayInitiate () const
 Get status if visualisation is init. More...
 

Attribute details

◆ m_omniVisualNode

simulation::Node::SPtr geomagic::GeomagicVisualModel::m_omniVisualNode
protected

◆ m_posDeviceVisu

VecCoord geomagic::GeomagicVisualModel::m_posDeviceVisu
protected

position of the hpatic devices for rendering. first pos is equal to d_posDevice

◆ rigidDOF

component::statecontainer::MechanicalObject<sofa::defaulttype::Rigid3dTypes>::SPtr geomagic::GeomagicVisualModel::rigidDOF
protected

◆ visualNode

VisualComponent geomagic::GeomagicVisualModel::visualNode[NVISUALNODE]
protected

◆ visualNodeFiles

const char * geomagic::GeomagicVisualModel::visualNodeFiles
staticprotected
Initial value:
=
{
"mesh/stylusO.obj",
"mesh/articulation5O.obj",
"mesh/articulation4O.obj",
"mesh/articulation3O.obj",
"mesh/articulation2O.obj",
"mesh/articulation1O.obj",
"mesh/BASEO.obj"
}

◆ visualNodeNames

const char * geomagic::GeomagicVisualModel::visualNodeNames
staticprotected
Initial value:
=
{
"stylus",
"joint_2",
"joint_1",
"arm_2",
"arm_1",
"joint_0",
"base"
}

Constructor details

◆ GeomagicVisualModel()

geomagic::GeomagicVisualModel::GeomagicVisualModel ( )

◆ ~GeomagicVisualModel()

geomagic::GeomagicVisualModel::~GeomagicVisualModel ( )
virtual

Function details

◆ activateDisplay()

void geomagic::GeomagicVisualModel::activateDisplay ( bool  value)

Activate or not the visualisation.

◆ drawDevice()

void geomagic::GeomagicVisualModel::drawDevice ( bool  button1Status = false,
bool  button2Status = false 
)

Method called by Geomagic Draw method to display the geomagic OglModel.

◆ initDisplay()

void geomagic::GeomagicVisualModel::initDisplay ( sofa::simulation::Node::SPtr  node,
const std::string &  _deviceName,
double  _scale 
)

Main Method to init the visual component tree of OGLModels. Called by Geomagic InitDevice() if drawVisual is on.

◆ isDisplayActivated()

bool geomagic::GeomagicVisualModel::isDisplayActivated ( ) const
inline

Get status if visualisation is activated.

◆ isDisplayInitiate()

bool geomagic::GeomagicVisualModel::isDisplayInitiate ( ) const
inline

Get status if visualisation is init.

◆ updateDisplay()

void geomagic::GeomagicVisualModel::updateDisplay ( const GeomagicDriver::Coord posDevice,
GeomagicDriver::SHDdouble  angle1[3],
GeomagicDriver::SHDdouble  angle2[3] 
)

Method to update the visualNode using the current device position and the angles of the different node of the device. Updated by Geomagic UpdatePosition()

Enum details

◆ anonymous enum

anonymous enum
protected

variable pour affichage graphique

Enumerator
VN_stylus 
VN_joint2 
VN_joint1 
VN_arm2 
VN_arm1 
VN_joint0 
VN_base 
NVISUALNODE