Moby
Public Member Functions | Static Public Member Functions | Protected Attributes | List of all members
Moby::Visualizable Class Reference

Class that allows for visualizing simulation data. More...

#include <Visualizable.h>

Inheritance diagram for Moby::Visualizable:
Moby::Base Moby::ControlledBody Moby::Joint Moby::ArticulatedBody Moby::RigidBody Moby::FixedJoint Moby::Gears Moby::PlanarJoint Moby::PrismaticJoint Moby::RevoluteJoint Moby::ScrewJoint Moby::SphericalJoint Moby::UniversalJoint

Public Member Functions

 Visualizable (const Visualizable *v)
 
virtual void update_visualization ()
 Updates the visualization using the appropriate transform. More...
 
void set_visualization_relative_pose (const Ravelin::Pose3d &P)
 Sets the visualization relative pose.
 
virtual void set_visualization_data (osg::Node *vdata)
 Sets the visualization data from a node.
 
virtual void set_visualization_data (OSGGroupWrapperPtr vdata)
 Sets the visualization data from a OSGGroupWrapper.
 
osg::Group * get_visualization_data () const
 Gets the visualization data for this object.
 
virtual void save_to_xml (XMLTreePtr node, std::list< boost::shared_ptr< const Base > > &shared_objects) const
 Implements Base::save_to_xml()
 
virtual void load_from_xml (boost::shared_ptr< const XMLTree > node, std::map< std::string, BasePtr > &id_map)
 Implements Base::load_from_xml()
 
boost::shared_ptr< const
Ravelin::Pose3d > 
get_visualization_pose ()
 Gets the pose for this visualizable object.
 
- Public Member Functions inherited from Moby::Base
 Base (const Base *b)
 

Static Public Member Functions

static osg::Group * construct_from_node (boost::shared_ptr< const XMLTree > node, const std::map< std::string, BasePtr > &id_map)
 Utility method for load_from_xml() More...
 
- Static Public Member Functions inherited from Moby::Base
template<class T >
static boost::shared_ptr< T > clone (boost::shared_ptr< T > x)
 Static method for cloning a shared pointer.
 

Protected Attributes

boost::shared_ptr
< Ravelin::Pose3d > 
_vF
 The relative pose.
 
OSGGroupWrapperPtr _vizdata
 The underlying visualization data.
 

Additional Inherited Members

- Public Attributes inherited from Moby::Base
boost::shared_ptr< void > userdata
 Any relevant userdata.
 
std::string id
 The unique ID for this object.
 

Detailed Description

Class that allows for visualizing simulation data.

This class uses the OSGGroupWrapper class to permit sharing and serialization of visualization data.

Member Function Documentation

osg::Group * Visualizable::construct_from_node ( boost::shared_ptr< const XMLTree node,
const std::map< std::string, BasePtr > &  id_map 
)
static

Utility method for load_from_xml()

This method searches for visualization-filename, visualization-id attributes for a given node and creates a separator based on the attribute found.

void Visualizable::update_visualization ( )
virtual

Updates the visualization using the appropriate transform.

Note
in contrast to set_visualization_transform(), this method actually sets the transform in the scenegraph, thereby updating the display.
derived classes may override this method to set the transform right before it is updated, if desired
See Also
set_visualization_transform()

Reimplemented in Moby::ArticulatedBody.


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