16 #ifndef SURGSIM_GRAPHICS_OSGLIGHT_H 17 #define SURGSIM_GRAPHICS_OSGLIGHT_H 21 #include <unordered_map> 26 #include <osg/ref_ptr> 30 #pragma warning(disable:4250) 57 friend class OsgLightTests;
63 virtual bool setGroup(std::shared_ptr<SurgSim::Graphics::Group> group)
override;
65 virtual void setLightGroupReference(
const std::string& name)
override;
67 virtual std::string getLightGroupReference()
override;
69 virtual std::shared_ptr<SurgSim::Graphics::Group> getGroup()
override;
79 virtual void setConstantAttenuation(
double val)
override;
81 virtual double getConstantAttenuation()
override;
83 virtual void setLinearAttenuation(
double val)
override;
85 virtual double getLinearAttenuation()
override;
87 virtual void setQuadraticAttenuation(
double val)
override;
89 virtual double getQuadraticAttenuation()
override;
93 virtual void doUpdate(
double dt)
override;
96 void apply(osg::ref_ptr<osg::StateSet> stateSet);
99 void remove(osg::ref_ptr<osg::StateSet> stateSet);
109 QUADRATIC_ATTENUATION
116 std::unordered_map<int, osg::ref_ptr<osg::Uniform>>
m_uniforms;
134 #if defined(_MSC_VER) Definition: DriveElementFromInputBehavior.cpp:27
SurgSim::Math::Vector4d m_specularColor
The actual specular color that was set.
Definition: OsgLight.h:119
Abstract interface for a light, a light needs to be assigned to a group to be active, only the members of this group will be considered to be lit by this light.
Definition: Light.h:47
OpenScenegraph implementation for the Light interface.
Definition: OsgLight.h:51
std::string m_groupReference
Name of the group that this light should shine on...
Definition: OsgLight.h:131
std::shared_ptr< OsgGroup > m_group
The group for this light.
Definition: OsgLight.h:113
string(TOUPPER ${DEVICE}DEVICE_UPPER_CASE) option(BUILD_DEVICE_ $
Definition: CMakeLists.txt:35
double m_constantAttenuation
The actual constant attenuation value that was set.
Definition: OsgLight.h:121
UniformType
Internal for managing uniforms.
Definition: OsgLight.h:102
double m_quadraticAttenuation
The actual quadratic attenuation value that was set.
Definition: OsgLight.h:123
double m_linearAttenuation
The actual linear attenuation value that was set.
Definition: OsgLight.h:122
osg::ref_ptr< osg::LightSource > m_lightSource
Definition: OsgLight.h:128
Definition: OsgLight.h:107
Definition: OsgLight.h:33
std::unordered_map< int, osg::ref_ptr< osg::Uniform > > m_uniforms
Map for managing all uniforms that this object owns.
Definition: OsgLight.h:116
Definition: OsgLight.h:108
Eigen::Matrix< double, 4, 1 > Vector4d
A 4D vector of doubles.
Definition: Vector.h:60
Base OSG implementation of a graphics representation.
Definition: OsgRepresentation.h:42
Definition: OsgLight.h:106
osg::ref_ptr< osg::Light > m_light
Definition: OsgLight.h:127
SurgSim::Math::Vector4d m_diffuseColor
The actual diffuse color that was set.
Definition: OsgLight.h:118
Definition: OsgLight.h:105