Simox  2.3.49
VirtualRobot::CoinVisualization Class Reference
Inheritance diagram for VirtualRobot::CoinVisualization:
VirtualRobot::Visualization

Public Member Functions

 CoinVisualization (const VisualizationNodePtr visualizationNode)
 
 CoinVisualization (const std::vector< VisualizationNodePtr > &visualizationNodes)
 
virtual ~CoinVisualization ()
 
virtual bool highlight (VisualizationNodePtr visualizationNode, bool enable)
 
virtual bool highlight (unsigned int which, bool enable)
 
virtual bool highlight (bool enable)
 
virtual bool highlight (SoNode *visu, bool enable)
 
virtual void colorize (VisualizationFactory::Color c)
 
virtual void setTransparency (float transparency)
 
virtual VisualizationPtr clone ()
 
SoNode * getCoinVisualization (bool selectable=true)
 
void exportToVRML2 (std::string filename, bool useRotation=true)
 
- Public Member Functions inherited from VirtualRobot::Visualization
 Visualization (const VisualizationNodePtr visualizationNode)
 
 Visualization (const std::vector< VisualizationNodePtr > &visualizationNodes)
 
virtual ~Visualization ()
 
virtual bool isVisualizationNodeRegistered (VisualizationNodePtr visualizationNode)
 
virtual int getNumFaces ()
 get total number of faces (i.e. triangles) of all visualizations that are stored in this object More...
 
std::vector< VisualizationNodePtrgetVisualizationNodes ()
 

Static Public Member Functions

static std::string getFactoryName ()
 
- Static Public Member Functions inherited from VirtualRobot::Visualization
static std::string getFactoryName ()
 

Protected Member Functions

bool buildVisualization ()
 

Protected Attributes

bool isSelectable
 
SoSelection * selection
 
SoSeparator * visuRoot
 
SoMaterial * color
 
- Protected Attributes inherited from VirtualRobot::Visualization
std::vector< VisualizationNodePtrvisualizationNodes
 

Detailed Description

A Coin3D based implementation of a visualization.

Constructor & Destructor Documentation

VirtualRobot::CoinVisualization::CoinVisualization ( const VisualizationNodePtr  visualizationNode)
VirtualRobot::CoinVisualization::CoinVisualization ( const std::vector< VisualizationNodePtr > &  visualizationNodes)
VirtualRobot::CoinVisualization::~CoinVisualization ( )
virtual

Member Function Documentation

bool VirtualRobot::CoinVisualization::buildVisualization ( )
protected
VirtualRobot::VisualizationPtr VirtualRobot::CoinVisualization::clone ( )
virtual
Returns
new instance of VirtualRobot::CoinVisualization with the same set of robot nodes.

Reimplemented from VirtualRobot::Visualization.

void VirtualRobot::CoinVisualization::colorize ( VisualizationFactory::Color  c)
virtual

Colorize this visualization.

Parameters
cThe color to apply. To disable the colorization apply Color::None()

Reimplemented from VirtualRobot::Visualization.

void VirtualRobot::CoinVisualization::exportToVRML2 ( std::string  filename,
bool  useRotation = true 
)
SoNode * VirtualRobot::CoinVisualization::getCoinVisualization ( bool  selectable = true)

This method iterates over the entries in member CoinVisualization::visualizationNodes and stores the return value of CoinVisualizationNode::getCoinVisualization() in an SoSeparator if the processed node is of type CoinVisualizationNode. Afterwards the SoSeparator is returned.

static std::string VirtualRobot::CoinVisualization::getFactoryName ( )
inlinestatic
bool VirtualRobot::CoinVisualization::highlight ( VisualizationNodePtr  visualizationNode,
bool  enable 
)
virtual

To see the visualizations in an SoExaminerViewer enable an highlight render action e.g. viewer->setGLRenderAction(new SoLineHighlightRenderAction);

Reimplemented from VirtualRobot::Visualization.

bool VirtualRobot::CoinVisualization::highlight ( unsigned int  which,
bool  enable 
)
virtual

Highlight a visualization node.

Parameters
whichThe index of the visualionNodes, passed to the constructor.
enableDo/Undo highlighting.

Reimplemented from VirtualRobot::Visualization.

bool VirtualRobot::CoinVisualization::highlight ( bool  enable)
virtual
bool VirtualRobot::CoinVisualization::highlight ( SoNode *  visu,
bool  enable 
)
virtual
void VirtualRobot::CoinVisualization::setTransparency ( float  transparency)
virtual

Colorize this visualization, but just set the transparency flag (no additional colorization is performed).

Parameters
transparencyThe transparent value in [0..1].

Reimplemented from VirtualRobot::Visualization.

Field Documentation

SoMaterial* VirtualRobot::CoinVisualization::color
protected
bool VirtualRobot::CoinVisualization::isSelectable
protected
SoSelection* VirtualRobot::CoinVisualization::selection
protected
SoSeparator* VirtualRobot::CoinVisualization::visuRoot
protected