16 #ifndef SURGSIM_GRAPHICS_OSGSCREENSPACEQUADREPRESENTATION_H 17 #define SURGSIM_GRAPHICS_OSGSCREENSPACEQUADREPRESENTATION_H 19 #include "SurgSim/DataStructures/OptionalValue.h" 20 #include "SurgSim/Graphics/OsgRepresentation.h" 21 #include "SurgSim/Graphics/OsgUniform.h" 22 #include "SurgSim/Graphics/Representation.h" 23 #include "SurgSim/Graphics/ScreenSpaceQuadRepresentation.h" 30 #pragma warning(disable:4250) 48 class OsgTextureRectangle;
63 virtual void setLocation(
double x,
double y);
67 virtual void getLocation(
double* x,
double* y);
72 void setSize(
double width,
double height)
override;
77 void getSize(
double* width,
double* height)
const override;
84 bool setTexture(std::shared_ptr<Texture> texture)
override;
91 bool setTexture(std::shared_ptr<OsgTexture2d> texture);
98 bool setTexture(std::shared_ptr<OsgTextureRectangle> texture);
102 void setTransparent(
bool value);
106 bool isTransparent();
109 void doUpdate(
double dt)
override;
111 bool doInitialize()
override;
116 osg::ref_ptr<osg::Geode> m_geode;
119 osg::ref_ptr<osg::Geometry> m_geometry;
122 osg::ref_ptr<osg::Projection> m_projection;
129 void setTextureCoordinates(
float left,
float bottom,
float right,
float top);
135 bool replaceUniform(
const std::string& name, std::shared_ptr<SurgSim::Graphics::UniformBase> newUniform);
138 std::shared_ptr<OsgUniform<std::shared_ptr<OsgTexture2d>>> m_textureUniform;
141 std::shared_ptr<OsgUniform<std::shared_ptr<OsgTextureRectangle>>> m_rectangleTextureUniform;
150 #if defined(_MSC_VER) Wraps glewInit() to separate the glew opengl definitions from the osg opengl definitions only imgui n...
Definition: AddRandomSphereBehavior.cpp:36
A quad to display on the screen in screen space coordinates, use setPose() to set the position but x...
Definition: ScreenSpaceQuadRepresentation.h:36
Definition: OsgImGuiHandler.h:8
Base OSG implementation of a graphics representation.
Definition: OsgRepresentation.h:55
Implements the ScreenSpaceQuadRepresentation, provides the uniform 'texture' for the texture that it ...
Definition: OsgScreenSpaceQuadRepresentation.h:53