Base graphics group class, which defines the interface that all graphics groups must implement.
More...
#include <SurgSim/Graphics/Group.h>
Base graphics group class, which defines the interface that all graphics groups must implement.
Graphics::Group allows the organization of Graphics::Representation objects so that different algorithms can operate on specific sub-sets rather than the entire scene.
◆ Group()
SurgSim::Graphics::Group::Group |
( |
const std::string & |
name | ) |
|
|
explicit |
Constructor.
The group is initially empty.
- Parameters
-
name | Name of the group, this has to be unique over the whole system, otherwise adding the group will fail |
◆ ~Group()
SurgSim::Graphics::Group::~Group |
( |
| ) |
|
|
virtual |
◆ add()
bool SurgSim::Graphics::Group::add |
( |
std::shared_ptr< Representation > |
representation | ) |
|
|
virtual |
Adds an representation.
- Parameters
-
- Returns
- True if the representation is added successfully, false if failure
Reimplemented in SurgSim::Graphics::OsgGroup.
◆ append()
bool SurgSim::Graphics::Group::append |
( |
std::shared_ptr< Group > |
group | ) |
|
|
virtual |
Adds all representations in another group to this group.
- Parameters
-
group | Group of representations to add |
- Returns
- True if all representations are added successfully, false if failure
Reimplemented in SurgSim::Graphics::OsgGroup.
◆ clear()
void SurgSim::Graphics::Group::clear |
( |
| ) |
|
|
virtual |
◆ getMembers()
const std::vector< std::shared_ptr< Representation > > & SurgSim::Graphics::Group::getMembers |
( |
| ) |
const |
- Returns
- a container with all the representations in this group.
◆ getName()
std::string SurgSim::Graphics::Group::getName |
( |
| ) |
const |
- Returns
- The name of this group.
◆ isVisible()
virtual bool SurgSim::Graphics::Group::isVisible |
( |
| ) |
const |
|
pure virtual |
Gets whether the group is currently visible.
- Returns
- visible True for visible, false for invisible
Implemented in SurgSim::Graphics::OsgGroup.
◆ remove()
bool SurgSim::Graphics::Group::remove |
( |
std::shared_ptr< Representation > |
representation | ) |
|
|
virtual |
Removes an representation.
- Parameters
-
- Returns
- True if the representation is removed successfully, false if representation is not in this group or other failure.
Reimplemented in SurgSim::Graphics::OsgGroup.
◆ setVisible()
virtual void SurgSim::Graphics::Group::setVisible |
( |
bool |
visible | ) |
|
|
pure virtual |
Sets whether the group is currently visible.
- Parameters
-
visible | True for visible, false for invisible |
Implemented in SurgSim::Graphics::OsgGroup.
◆ m_name
std::string SurgSim::Graphics::Group::m_name |
|
private |
◆ m_representations
std::vector<std::shared_ptr<Representation> > SurgSim::Graphics::Group::m_representations |
|
private |
Representations in this group.
The documentation for this class was generated from the following files: