aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/src/others/irrlicht-1.8.1/include/ILightSceneNode.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/others/irrlicht-1.8.1/include/ILightSceneNode.h')
-rw-r--r--src/others/irrlicht-1.8.1/include/ILightSceneNode.h86
1 files changed, 86 insertions, 0 deletions
diff --git a/src/others/irrlicht-1.8.1/include/ILightSceneNode.h b/src/others/irrlicht-1.8.1/include/ILightSceneNode.h
new file mode 100644
index 0000000..445ee2d
--- /dev/null
+++ b/src/others/irrlicht-1.8.1/include/ILightSceneNode.h
@@ -0,0 +1,86 @@
1// Copyright (C) 2002-2012 Nikolaus Gebhardt
2// This file is part of the "Irrlicht Engine".
3// For conditions of distribution and use, see copyright notice in irrlicht.h
4
5#ifndef __I_LIGHT_SCENE_NODE_H_INCLUDED__
6#define __I_LIGHT_SCENE_NODE_H_INCLUDED__
7
8#include "ISceneNode.h"
9#include "SLight.h"
10
11namespace irr
12{
13namespace scene
14{
15
16//! Scene node which is a dynamic light.
17/** You can switch the light on and off by making it visible or not. It can be
18animated by ordinary scene node animators. If the light type is directional or
19spot, the direction of the light source is defined by the rotation of the scene
20node (assuming (0,0,1) as the local direction of the light).
21*/
22class ILightSceneNode : public ISceneNode
23{
24public:
25
26 //! constructor
27 ILightSceneNode(ISceneNode* parent, ISceneManager* mgr, s32 id,
28 const core::vector3df& position = core::vector3df(0,0,0))
29 : ISceneNode(parent, mgr, id, position) {}
30
31 //! Sets the light data associated with this ILightSceneNode
32 /** \param light The new light data. */
33 virtual void setLightData(const video::SLight& light) = 0;
34
35 //! Gets the light data associated with this ILightSceneNode
36 /** \return The light data. */
37 virtual const video::SLight& getLightData() const = 0;
38
39 //! Gets the light data associated with this ILightSceneNode
40 /** \return The light data. */
41 virtual video::SLight& getLightData() = 0;
42
43 //! Sets if the node should be visible or not.
44 /** All children of this node won't be visible either, when set
45 to true.
46 \param isVisible If the node shall be visible. */
47 virtual void setVisible(bool isVisible) = 0;
48
49 //! Sets the light's radius of influence.
50 /** Outside this radius the light won't lighten geometry and cast no
51 shadows. Setting the radius will also influence the attenuation, setting
52 it to (0,1/radius,0). If you want to override this behavior, set the
53 attenuation after the radius.
54 \param radius The new radius. */
55 virtual void setRadius(f32 radius) = 0;
56
57 //! Gets the light's radius of influence.
58 /** \return The current radius. */
59 virtual f32 getRadius() const = 0;
60
61 //! Sets the light type.
62 /** \param type The new type. */
63 virtual void setLightType(video::E_LIGHT_TYPE type) = 0;
64
65 //! Gets the light type.
66 /** \return The current light type. */
67 virtual video::E_LIGHT_TYPE getLightType() const = 0;
68
69 //! Sets whether this light casts shadows.
70 /** Enabling this flag won't automatically cast shadows, the meshes
71 will still need shadow scene nodes attached. But one can enable or
72 disable distinct lights for shadow casting for performance reasons.
73 \param shadow True if this light shall cast shadows. */
74 virtual void enableCastShadow(bool shadow=true) = 0;
75
76 //! Check whether this light casts shadows.
77 /** \return True if light would cast shadows, else false. */
78 virtual bool getCastShadow() const = 0;
79};
80
81} // end namespace scene
82} // end namespace irr
83
84
85#endif
86