19 #ifndef HEADER_LIGHT_HPP
20 #define HEADER_LIGHT_HPP
22 #include <ISceneNode.h>
23 #include <utils/cpp2011.hpp>
31 namespace scene {
class IMesh; }
36 irr::f32 m_outer_cone;
37 irr::f32 m_inner_cone;
46 #ifdef __LIGHT_NODE_VISUALISATION__
51 LightNode(scene::ISceneManager* mgr, scene::ISceneNode* parent,
float energy,
float d,
float r,
float g,
float b);
54 virtual void render() OVERRIDE;
56 virtual const core::aabbox3d<f32>& getBoundingBox()
const OVERRIDE
61 virtual void OnRegisterSceneNode() OVERRIDE;
63 virtual u32 getMaterialCount()
const OVERRIDE {
return 1; }
64 virtual bool isPointLight() {
return true; }
66 float getRadius()
const {
return m_radius; }
67 float getEnergy()
const {
return m_energy; }
68 float getEffectiveEnergy()
const {
return m_energy_multiplier * m_energy; }
69 core::vector3df getColor()
const {
return core::vector3df(m_color[0], m_color[1], m_color[2]); }
70 void setColor(
float r,
float g,
float b) { m_color[0] = r; m_color[1] = g; m_color[2] = b; }
72 float getEnergyMultiplier()
const {
return m_energy_multiplier; }
73 void setEnergyMultiplier(
float newval) { m_energy_multiplier = newval; }
76 void setEnergy(
float energy) { m_energy = energy; }
77 void setRadius(
float radius) { m_radius = radius; }
78 Spotlight& getSpotlightData() {
return m_spotlight; }
81 static core::aabbox3df box;
float m_energy_multiplier
The energy multiplier is in range [0, 1] and is used to fade in lights when they come in range.
Definition: light.hpp:88