22#include <gz/math/Pose3.hh>
23#include <gz/math/Angle.hh>
24#include <gz/utils/ImplPtr.hh>
29#include "sdf/config.hh"
39 struct PoseRelativeToGraph;
86 public: std::string
Name()
const;
90 public:
void SetName(
const std::string &_name);
97 public:
const gz::math::Pose3d &
RawPose()
const;
272 private:
void CopyFrom(
const Light &_light);
278 private:
void SetXmlParentName(
const std::string &_xmlParentName);
284 private:
void SetPoseRelativeToGraph(
310 GZ_UTILS_IMPL_PTR(dataPtr)
Provides a description of a light source.
Definition Light.hh:64
void SetAttenuationRange(const double _range)
Set the range of the light source in meters.
Light()
Default constructor.
Errors Load(ElementPtr _sdf)
Load the light based on a element pointer.
friend class Link
Allow Link::SetPoseRelativeToGraph or World::Load to call SetXmlParentName and SetPoseRelativeToGraph...
Definition Light.hh:306
void SetCastShadows(const bool _cast)
Set whether the light casts shadows.
bool LightOn() const
Get if the light is on.
bool CastShadows() const
Get whether the light casts shadows.
sdf::ElementPtr Element() const
Get a pointer to the SDF element that was used during load.
void SetSpotOuterAngle(const gz::math::Angle &_angle)
Set the angle covered by the outer cone.
double Intensity() const
Get the light intensity.
void SetSpotFalloff(const double _falloff)
Set the rate of falloff between the inner and outer cones.
void SetIntensity(const double _intensity)
Set the light intensity.
void SetType(const LightType _type)
Set the light type.
std::string Name() const
Get the name of the light.
void SetName(const std::string &_name)
Set the name of the light.
LightType Type() const
Get the light type.
sdf::ElementPtr ToElement() const
Create and return an SDF element filled with data from this light object.
void SetLightOn(const bool _isLightOn)
Set if the light is ON/OFF.
gz::math::Angle SpotOuterAngle() const
Get the angle covered by the outer cone.
gz::math::Vector3d Direction() const
Get the direction of the light source.
double ConstantAttenuationFactor() const
Get the constant attenuation factor.
sdf::SemanticPose SemanticPose() const
Get SemanticPose object of this object to aid in resolving poses.
friend class World
Definition Light.hh:307
double SpotFalloff() const
Get the rate of falloff between the inner and outer cones.
void SetConstantAttenuationFactor(const double _factor)
Set the constant attenuation factor.
double QuadraticAttenuationFactor() const
Get the quadratic attenuation factor which adds a curvature to the attenuation.
sdf::ElementPtr ToElement(sdf::Errors &_errors) const
Create and return an SDF element filled with data from this light object.
gz::math::Angle SpotInnerAngle() const
Get the angle covered by the bright inner cone.
double AttenuationRange() const
Get the range of the light source in meters.
void SetRawPose(const gz::math::Pose3d &_pose)
Set the pose of the light.
const gz::math::Pose3d & RawPose() const
Get the pose of the light.
void SetSpecular(const gz::math::Color &_color)
Set the specular color.
bool Visualize() const
Whether light visualization in the GUI is enabled.
void SetLinearAttenuationFactor(const double _factor)
Set the linear attenuation factor.
void SetDiffuse(const gz::math::Color &_color)
Set the diffuse color.
void SetQuadraticAttenuationFactor(const double _factor)
Set the quadratic attenuation factor which adds a curvature to the attenuation.
gz::math::Color Diffuse() const
Get the diffuse color.
gz::math::Color Specular() const
Get the specular color.
void SetSpotInnerAngle(const gz::math::Angle &_angle)
Set the angle covered by the bright inner cone.
const std::string & PoseRelativeTo() const
Get the name of the coordinate frame relative to which this object's pose is expressed.
void SetPoseRelativeTo(const std::string &_frame)
Set the name of the coordinate frame relative to which this object's pose is expressed.
void SetVisualize(const bool _visualize)
Set whether light visualization in the GUI is enabled.
double LinearAttenuationFactor() const
Get the linear attenuation factor.
void SetDirection(const gz::math::Vector3d &_dir)
Set the direction of the light source.
Definition Collision.hh:44
SemanticPose is a data structure that can be used by different DOM objects to resolve poses on a Pose...
Definition SemanticPose.hh:55
LightType
The set of light types.
Definition Light.hh:46
@ SPOT
A spot light source.
Definition Light.hh:55
@ POINT
A point light source.
Definition Light.hh:52
@ DIRECTIONAL
A directional light source.
Definition Light.hh:58
std::vector< Error > Errors
A vector of Error.
Definition Types.hh:80
@ INVALID
Invalid frame.
Definition ForceTorque.hh:36
std::shared_ptr< Element > ElementPtr
Definition Element.hh:55
namespace for Simulation Description Format parser
Definition Actor.hh:35
#define SDFORMAT_VISIBLE
Use to represent "symbol visible" if supported.
Definition system_util.hh:25