16 #ifndef SURGSIM_GRAPHICS_LIGHT_H 17 #define SURGSIM_GRAPHICS_LIGHT_H 19 #include "SurgSim/Graphics/Representation.h" 59 SURGSIM_ADD_SERIALIZABLE_PROPERTY(
Light,
double, ConstantAttenuation,
61 SURGSIM_ADD_SERIALIZABLE_PROPERTY(
Light,
double, LinearAttenuation,
63 SURGSIM_ADD_SERIALIZABLE_PROPERTY(
Light,
double, QuadraticAttenuation,
65 SURGSIM_ADD_SERIALIZABLE_PROPERTY(
Light, std::string, LightGroupReference,
76 virtual bool setGroup(std::shared_ptr<SurgSim::Graphics::Group> group) = 0;
80 virtual std::shared_ptr<SurgSim::Graphics::Group>
getGroup() = 0;
virtual SurgSim::Math::Vector4d getDiffuseColor()=0
Gets diffuse color.
Wraps glewInit() to separate the glew opengl definitions from the osg opengl definitions only imgui n...
Definition: AddRandomSphereBehavior.cpp:36
Eigen::Matrix< double, 4, 1 > Vector4d
A 4D vector of doubles.
Definition: Vector.h:61
virtual void setQuadraticAttenuation(double val)=0
Sets quadratic attenuation.
virtual double getQuadraticAttenuation()=0
Gets quadratic attenuation.
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:48
virtual void setSpecularColor(const SurgSim::Math::Vector4d &color)=0
Sets specular color of this light.
This contains a series of functions to encode and decode Eigen data structures to and from YAML nodes...
virtual void setLinearAttenuation(double val)=0
Sets linear attenuation.
virtual void setConstantAttenuation(double val)=0
Sets constant attenuation.
virtual bool setGroup(std::shared_ptr< SurgSim::Graphics::Group > group)=0
Sets the group for this light, setting nullptr here will remove the light from its current group...
virtual SurgSim::Math::Vector4d getSpecularColor()=0
Gets specular color.
virtual double getConstantAttenuation()=0
Gets constant attenuation.
Base graphics representation class, which defines the interface that all graphics representations mus...
Definition: Representation.h:40
virtual void setDiffuseColor(const SurgSim::Math::Vector4d &color)=0
Sets diffuse color of this light.
Light(const std::string &name)
Constructor.
Definition: Light.h:53
Definitions of small fixed-size vector types.
virtual double getLinearAttenuation()=0
Gets linear attenuation.
virtual std::string getLightGroupReference()=0
Gets the name of the group this light should operate on.
virtual std::shared_ptr< SurgSim::Graphics::Group > getGroup()=0
Gets the group that this light has been assigned to.
virtual void setLightGroupReference(const std::string &name)=0
Sets the name of the group that this light should work on.