19#ifndef HEADER_LIGHT_HPP
20#define HEADER_LIGHT_HPP
22#include <ISceneNode.h>
23#include <utils/cpp2011.hpp>
30 namespace scene {
class IMesh; }
38#ifdef __LIGHT_NODE_VISUALISATION__
43 LightNode(scene::ISceneManager* mgr, scene::ISceneNode* parent,
float energy,
float d,
float r,
float g,
float b);
46 virtual void render() OVERRIDE;
48 virtual const core::aabbox3d<f32>& getBoundingBox()
const OVERRIDE
53 virtual void OnRegisterSceneNode() OVERRIDE;
55 virtual u32 getMaterialCount()
const OVERRIDE {
return 1; }
56 virtual bool isPointLight() {
return true; }
58 float getRadius()
const {
return m_radius; }
59 float getEnergy()
const {
return m_energy; }
61 core::vector3df getColor()
const {
return core::vector3df(m_color[0], m_color[1], m_color[2]); }
62 void setColor(
float r,
float g,
float b) { m_color[0] = r; m_color[1] = g; m_color[2] = b; }
68 void setEnergy(
float energy) { m_energy = energy; }
69 void setRadius(
float radius) { m_radius = radius; }
72 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:79