16 #ifndef SURGSIM_GRAPHICS_MANAGER_H 17 #define SURGSIM_GRAPHICS_MANAGER_H 19 #include "SurgSim/Framework/ComponentManager.h" 48 return m_representations;
52 const std::unordered_map<std::string, std::shared_ptr<Group>>&
getGroups()
const 58 const std::vector<std::shared_ptr<View>>&
getViews()
const 72 virtual bool executeAdditions(
const std::shared_ptr<SurgSim::Framework::Component>& component);
77 virtual bool executeRemovals(
const std::shared_ptr<SurgSim::Framework::Component>& component);
88 virtual bool addView(std::shared_ptr<View> view);
98 virtual bool removeView(std::shared_ptr<View> view);
110 virtual std::shared_ptr<Group>
getOrCreateGroup(
const std::string& name) = 0;
115 virtual void addGroup(std::shared_ptr<Group> group);
125 virtual bool doInitialize();
129 virtual bool doStartUp();
132 std::vector<std::shared_ptr<Representation>> m_representations;
134 std::unordered_map<std::string, std::shared_ptr<Group>> m_groups;
136 std::vector<std::shared_ptr<View>> m_views;
143 #endif // SURGSIM_GRAPHICS_MANAGER_H Wraps glewInit() to separate the glew opengl definitions from the osg opengl definitions only imgui n...
Definition: AddRandomSphereBehavior.cpp:36
virtual bool addRepresentation(std::shared_ptr< Representation > representation)
Adds an representation to the manager.
Definition: Manager.cpp:74
virtual std::shared_ptr< Group > getOrCreateGroup(const std::string &name)=0
Fetch a group with a given name, if the group does not exist, create it.
virtual ~Manager()
Destructor.
Definition: Manager.cpp:36
Base Component Manager class.
Definition: ComponentManager.h:49
const std::vector< std::shared_ptr< Representation > > & getRepresentations() const
Returns the representations assigned to the manager.
Definition: Manager.h:46
virtual void dumpDebugInfo() const =0
Generic unspecified debug handle, there are no requirements on this interface the manager implementat...
virtual bool removeRepresentation(std::shared_ptr< Representation > representation)
Removes an representation from the manager.
Definition: Manager.cpp:134
const std::vector< std::shared_ptr< View > > & getViews() const
Returns the views assigned to the manager.
Definition: Manager.h:58
virtual bool executeRemovals(const std::shared_ptr< SurgSim::Framework::Component > &component)
Removes a component.
Definition: Manager.cpp:40
Manager()
Constructor.
Definition: Manager.cpp:31
virtual bool removeView(std::shared_ptr< View > view)
Removes a view from the manager.
Definition: Manager.cpp:158
Basic graphics manager class which manages graphics components to provide a visualization of the scen...
Definition: Manager.h:37
virtual void addGroup(std::shared_ptr< Group > group)
Adds a group to the manager, override for manager specific behavior when adding.
Definition: Manager.cpp:209
virtual bool doUpdate(double dt)
Performs an update for a single timestep.
Definition: Manager.cpp:185
virtual bool addView(std::shared_ptr< View > view)
Adds a view to the manager.
Definition: Manager.cpp:118
void doBeforeStop() override
Prepares the thread for its execution to be stopped.
Definition: Manager.cpp:218
virtual bool executeAdditions(const std::shared_ptr< SurgSim::Framework::Component > &component)
Adds a component.
Definition: Manager.cpp:57
const std::unordered_map< std::string, std::shared_ptr< Group > > & getGroups() const
Returns the groups assigned to the manager.
Definition: Manager.h:52
int getType() const override
Overrides ComponentManager::getType()
Definition: Manager.cpp:204