16 #ifndef SURGSIM_GRAPHICS_REPRESENTATION_H
17 #define SURGSIM_GRAPHICS_REPRESENTATION_H
23 #include <unordered_set>
67 virtual bool setMaterial(std::shared_ptr<Material> material) = 0;
71 virtual std::shared_ptr<Material>
getMaterial()
const = 0;
86 virtual void update(
double dt) = 0;
131 bool checkAwake(
const std::string& functionName);
139 #endif // SURGSIM_GRAPHICS_REPRESENTATION_H
virtual ~Representation()
Destructor.
Definition: Representation.cpp:120
Definition: DriveElementFromInputBehavior.cpp:27
Representation(const std::string &name)
Constructor.
Definition: Representation.cpp:30
std::unordered_set< std::string > m_groups
List of groups that this representation would like to be added.
Definition: Representation.h:126
virtual void setLocalActive(bool val) override
Set the component's active state.
Definition: Representation.cpp:125
void setGroupReference(const std::string &group)
Helper functions, this clears all the references and sets, only the reference given in the parameter...
Definition: Representation.cpp:100
void clearGroupReferences()
Clear all the Group references.
Definition: Representation.cpp:82
virtual void setVisible(bool visible)=0
Sets whether the representation is currently visible.
bool checkAwake(const std::string &functionName)
Check if the representation is awake and print a warning message if it is.
Definition: Representation.cpp:109
virtual std::shared_ptr< Material > getMaterial() const =0
Gets the material that defines the visual appearance of the representation.
bool m_isVisible
Definition: Representation.h:121
virtual bool setMaterial(std::shared_ptr< Material > material)=0
Sets the material that defines the visual appearance of the representation.
static const std::string DefaultHudGroupName
Definition: Representation.h:44
std::vector< std::string > getGroupReferences()
Gets group references.
Definition: Representation.cpp:77
virtual bool isVisible() const =0
Gets whether the representation is currently visible.
virtual void setDrawAsWireFrame(bool val)=0
Sets the representation to render as a wire frame.
virtual bool getDrawAsWireFrame() const =0
Return if the representation is rendered as a wire frame.
Base graphics representation class, which defines the interface that all graphics representations mus...
Definition: Representation.h:39
void addGroupReferences(const std::vector< std::string > &groups)
Adds a list of group references.
Definition: Representation.cpp:54
static const std::string DefaultGroupName
Definition: Representation.h:43
virtual void update(double dt)=0
Updates the representation.
virtual bool addGroupReference(const std::string &name)
Add a reference to a group, this will eventual add this representation to the group with the the same...
Definition: Representation.cpp:43
Representations are manifestations of a SceneElement.
Definition: Representation.h:33
virtual void clearMaterial()=0
Removes the material from the representation.
void setGroupReferences(const std::vector< std::string > &groups)
Sets the list of group references.
Definition: Representation.cpp:65
bool removeGroupReference(const std::string &group)
Function to remove an unwanted reference.
Definition: Representation.cpp:90