16 #ifndef SURGSIM_GRAPHICS_OSGREPRESENTATION_H 17 #define SURGSIM_GRAPHICS_OSGREPRESENTATION_H 21 #include <osg/ref_ptr> 30 class PositionAttitudeTransform;
40 class TangentSpaceGenerator;
45 static const int TANGENT_VERTEX_ATTRIBUTE_ID = 6;
46 static const int BITANGENT_VERTEX_ATTRIBUTE_ID = 7;
47 static const int DIFFUSE_TEXTURE_UNIT = 0;
48 static const int NORMAL_TEXTURE_UNIT = 1;
49 static const int SHADOW_TEXTURE_UNIT = 8;
64 osg::ref_ptr<osg::Node> getOsgNode()
const;
70 bool setMaterial(std::shared_ptr<SurgSim::Framework::Component> material)
override;
74 std::shared_ptr<Material> getMaterial()
const override;
77 void clearMaterial()
override;
79 void setDrawAsWireFrame(
bool val)
override;
81 bool getDrawAsWireFrame()
const override;
91 void setGenerateTangents(
bool value)
override;
93 bool isGeneratingTangents()
const override;
97 void update(
double dt)
override;
101 void addUniform(std::shared_ptr<SurgSim::Graphics::UniformBase> uniform);
107 void addUniform(
const std::string& type,
const std::string& name,
const boost::any& value);
110 virtual void doUpdate(
double dt);
114 void setVisible(
bool val);
118 void updateTangents();
145 #endif // SURGSIM_GRAPHICS_OSGREPRESENTATION_H bool m_drawAsWireFrame
Indicates if the representation is rendered as a wireframe.
Definition: OsgRepresentation.h:136
Definition: CompoundShapeToGraphics.cpp:29
osg::ref_ptr< osg::Group > m_materialProxy
Holder for attributes coming from OsgMaterial.
Definition: OsgRepresentation.h:127
osg::ref_ptr< osg::Switch > m_switch
Switch used to toggle the visibility of the representation.
Definition: OsgRepresentation.h:121
osg::ref_ptr< osg::PositionAttitudeTransform > m_transform
Transform used to pose the representation.
Definition: OsgRepresentation.h:124
std::shared_ptr< OsgUniform< SurgSim::Math::Matrix44f > > m_modelMatrixUniform
Definition: OsgRepresentation.h:138
osg::ref_ptr< TangentSpaceGenerator > m_tangentGenerator
Visitor to generate tangents.
Definition: OsgRepresentation.h:133
Base graphics representation class, which defines the interface that all graphics representations mus...
Definition: Representation.h:39
Definition: OculusView.h:25
std::shared_ptr< OsgMaterial > m_material
Material defining the visual appearance of the representation.
Definition: OsgRepresentation.h:130
Base OSG implementation of a graphics representation.
Definition: OsgRepresentation.h:55