16 #ifndef SURGSIM_GRAPHICS_OSGREPRESENTATION_H
17 #define SURGSIM_GRAPHICS_OSGREPRESENTATION_H
21 #include <osg/ref_ptr>
28 class PositionAttitudeTransform;
56 virtual void setVisible(
bool visible)
override;
66 virtual bool setMaterial(std::shared_ptr<Material> material)
override;
70 virtual std::shared_ptr<Material>
getMaterial()
const override;
80 virtual void update(
double dt)
override;
100 #endif // SURGSIM_GRAPHICS_OSGREPRESENTATION_H
bool m_drawAsWireFrame
Indicates if the representation is rendered as a wireframe.
Definition: OsgRepresentation.h:94
Definition: DriveElementFromInputBehavior.cpp:27
virtual void clearMaterial() override
Removes the material from the representation.
Definition: OsgRepresentation.cpp:96
virtual ~OsgRepresentation()
Destructor.
Definition: OsgRepresentation.cpp:53
osg::ref_ptr< osg::Switch > m_switch
Switch used to toggle the visibility of the representation.
Definition: OsgRepresentation.h:86
osg::ref_ptr< osg::PositionAttitudeTransform > m_transform
Transform used to pose the representation.
Definition: OsgRepresentation.h:88
virtual void setVisible(bool visible) override
Sets whether the representation is currently visible.
Definition: OsgRepresentation.cpp:58
virtual void setDrawAsWireFrame(bool val) override
Sets the representation to render as a wire frame.
Definition: OsgRepresentation.cpp:112
Base graphics representation class, which defines the interface that all graphics representations mus...
Definition: Representation.h:39
osg::ref_ptr< osg::Node > getOsgNode() const
Returns the root OSG Node for this representations portion of the scene graph.
Definition: OsgRepresentation.cpp:102
virtual bool getDrawAsWireFrame() const override
Return if the representation is rendered as a wire frame.
Definition: OsgRepresentation.cpp:130
virtual bool setMaterial(std::shared_ptr< Material > material) override
Sets the material that defines the visual appearance of the representation.
Definition: OsgRepresentation.cpp:77
Definition: OsgLight.h:33
std::shared_ptr< OsgMaterial > m_material
Material defining the visual appearance of the representation.
Definition: OsgRepresentation.h:91
virtual void update(double dt) override
Updates the representation.
Definition: OsgRepresentation.cpp:69
Base OSG implementation of a graphics representation.
Definition: OsgRepresentation.h:42
virtual void doUpdate(double dt)
Definition: OsgRepresentation.cpp:107
OsgRepresentation(const std::string &name)
Constructor.
Definition: OsgRepresentation.cpp:37
virtual std::shared_ptr< Material > getMaterial() const override
Gets the material that defines the visual appearance of the representation.
Definition: OsgRepresentation.cpp:91
virtual bool isVisible() const override
Gets whether the representation is currently visible.
Definition: OsgRepresentation.cpp:64