Go to the documentation of this file.
16 #ifndef SURGSIM_GRAPHICS_REPRESENTATION_H
17 #define SURGSIM_GRAPHICS_REPRESENTATION_H
23 #include <unordered_set>
56 virtual bool setMaterial(std::shared_ptr<SurgSim::Framework::Component> material) = 0;
60 virtual std::shared_ptr<Material>
getMaterial()
const = 0;
82 virtual void update(
double dt) = 0;
129 #endif // SURGSIM_GRAPHICS_REPRESENTATION_H
virtual bool setMaterial(std::shared_ptr< SurgSim::Framework::Component > material)=0
Sets the material that defines the visual appearance of the representation.
virtual ~Representation()
Destructor.
Definition: Representation.cpp:120
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
Definition: CompoundShapeToGraphics.cpp:29
static const std::string DefaultGroupName
Definition: Representation.h:43
virtual bool getDrawAsWireFrame() const =0
Return if the representation is rendered as a wire frame.
Representation(const std::string &name)
Constructor.
Definition: Representation.cpp:30
virtual void clearMaterial()=0
Removes the material from the representation.
Representations are manifestations of a SceneElement.
Definition: Representation.h:33
void clearGroupReferences()
Clear all the Group references.
Definition: Representation.cpp:82
virtual void setDrawAsWireFrame(bool val)=0
Sets the representation to render as a wire frame.
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
std::vector< std::string > getGroupReferences() const
Gets group references.
Definition: Representation.cpp:77
virtual bool isGeneratingTangents() const =0
bool checkAwake(const std::string &functionName)
Check if the representation is awake and print a warning message if it is.
Definition: Representation.cpp:109
std::unordered_set< std::string > m_groups
List of groups that this representation would like to be added.
Definition: Representation.h:118
Base graphics representation class, which defines the interface that all graphics representations mus...
Definition: Representation.h:39
string(TOUPPER ${DEVICE} DEVICE_UPPER_CASE) option(BUILD_DEVICE_$
Definition: CMakeLists.txt:38
static const std::string DefaultHudGroupName
Definition: Representation.h:44
bool removeGroupReference(const std::string &group)
Function to remove an unwanted reference.
Definition: Representation.cpp:90
void setGroupReferences(const std::vector< std::string > &groups)
Sets the list of group references.
Definition: Representation.cpp:65
void addGroupReferences(const std::vector< std::string > &groups)
Adds a list of group references.
Definition: Representation.cpp:54
virtual std::shared_ptr< Material > getMaterial() const =0
Gets the material that defines the visual appearance of the representation.
virtual void setGenerateTangents(bool value)=0
Enable or disable the generation of tangents.