3 #ifndef SCENEVIEW_LIGHT_NODE_HPP__
4 #define SCENEVIEW_LIGHT_NODE_HPP__
9 #include <sceneview/scene_node.hpp>
37 return SceneNodeType::kLightNode; }
44 LightType GetLightType()
const {
return light_type_; }
46 void SetDirection(
const QVector3D& dir) { direction_ = dir; }
53 const QVector3D&
Direction()
const {
return direction_; }
55 float Ambient()
const {
return ambient_; }
60 void SetAmbient(
const float ambient) { ambient_ = ambient; }
62 float Specular()
const {
return specular_; }
67 void SetSpecular(
const float specular) { specular_ = specular;}
69 const QVector3D& Color()
const {
return color_; }
71 void SetColor(
const QVector3D& color) { color_ = color; }
80 float Attenuation()
const {
return attenuation_; }
88 cone_angle_deg_ = cone_angle_deg;
99 void SetScale(
const QVector3D& vec)
override;
111 QVector3D direction_;
116 float cone_angle_deg_;
121 #endif // SCENEVIEW_LIGHT_NODE_HPP__
Pure virtual class that all scene graph nodes inherit.
Definition: scene_node.hpp:41
void SetConeAngle(float cone_angle_deg)
Sets the light cone angle (in degrees).
Definition: light_node.hpp:87
void SetAmbient(const float ambient)
Sets the ambient coefficient for this light.
Definition: light_node.hpp:60
void SetAttenuation(const float val)
Sets the attenuation factor.
Definition: light_node.hpp:78
An axis-aligned box typically used for bounding box and intersection calculations.
Definition: axis_aligned_box.hpp:17
void SetScale(const QVector3D &vec) override
Disabled for this class.
LightType
Specifies a light type.
Definition: light_node.hpp:18
float ConeAngle() const
Retrieve the cone angle, in degrees.
Definition: light_node.hpp:94
A scene graph.
Definition: scene.hpp:36
const AxisAlignedBox & WorldBoundingBox() override
Retrieve the world-space bounding box of the node and all of its children (if applicable).
const QVector3D & Direction() const
Sets the light direction.
Definition: light_node.hpp:53
void SetSpecular(const float specular)
Sets the specular coefficient for this light.
Definition: light_node.hpp:67
A light in a scene graph used by some shaders to calculate lighting effects.
Definition: light_node.hpp:32
void SetLightType(LightType light_type)
Sets the light type.
Definition: light_node.hpp:42
SceneNodeType
Specifies a scene node type.
Definition: scene_node.hpp:19
SceneNodeType NodeType() const override
Retrieve the node type.
Definition: light_node.hpp:36