opensurgsim
Public Member Functions | List of all members
SurgSim::Graphics::OsgGroup Class Reference

OSG implementation of a graphics group. More...

#include <OsgGroup.h>

Inheritance diagram for SurgSim::Graphics::OsgGroup:
SurgSim::Graphics::Group

Public Member Functions

 OsgGroup (const std::string &name)
 Constructor. More...
 
void setVisible (bool visible) override
 Sets whether this group is currently visible. More...
 
bool isVisible () const override
 Gets whether this group is currently visible. More...
 
bool add (std::shared_ptr< Representation > representation) override
 Adds an representation. More...
 
bool append (std::shared_ptr< Group > group) override
 Adds all representations in another group to this group. More...
 
bool remove (std::shared_ptr< Representation > representation) override
 Removes an representation. More...
 
void clear () override
 Removes all representations.
 
osg::ref_ptr< osg::Group > getOsgGroup () const
 Returns the root OSG group node.
 
- Public Member Functions inherited from SurgSim::Graphics::Group
 Group (const std::string &name)
 Constructor. More...
 
virtual ~Group ()
 Destructor.
 
const std::vector< std::shared_ptr< Representation > > & getMembers () const
 
std::string getName () const
 

Detailed Description

OSG implementation of a graphics group.

A Graphics::OsgGroup wraps a osg::Switch to provide group functionality.

Constructor & Destructor Documentation

§ OsgGroup()

OsgGroup::OsgGroup ( const std::string &  name)
explicit

Constructor.

Parameters
nameName of the group

Member Function Documentation

§ add()

bool OsgGroup::add ( std::shared_ptr< Representation representation)
overridevirtual

Adds an representation.

Parameters
representationRepresentation to add to this group
Returns
True if the representation is added successfully, false if failure Only subclasses of OsgRepresentation will be added successfully.

Reimplemented from SurgSim::Graphics::Group.

§ append()

bool OsgGroup::append ( std::shared_ptr< Group group)
overridevirtual

Adds all representations in another group to this group.

Parameters
groupGroup of representations to add
Returns
True if all representations are added successfully, false if failure Only subclasses of OsgGroup will be appended successfully.

Reimplemented from SurgSim::Graphics::Group.

§ isVisible()

bool OsgGroup::isVisible ( ) const
overridevirtual

Gets whether this group is currently visible.

Returns
True for visible, false for invisible

Implements SurgSim::Graphics::Group.

§ remove()

bool OsgGroup::remove ( std::shared_ptr< Representation representation)
overridevirtual

Removes an representation.

Parameters
representationRepresentation to remove from this group
Returns
True if the representation is removed successfully, false if representation is not in this group or other failure

Reimplemented from SurgSim::Graphics::Group.

§ setVisible()

void OsgGroup::setVisible ( bool  visible)
overridevirtual

Sets whether this group is currently visible.

Parameters
visibleTrue for visible, false for invisible

Implements SurgSim::Graphics::Group.


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