diff options
author | David Walter Seikel | 2013-01-13 18:54:10 +1000 |
---|---|---|
committer | David Walter Seikel | 2013-01-13 18:54:10 +1000 |
commit | 959831f4ef5a3e797f576c3de08cd65032c997ad (patch) | |
tree | e7351908be5995f0b325b2ebeaa02d5a34b82583 /libraries/irrlicht-1.8/source/Irrlicht/CLightSceneNode.h | |
parent | Add info about changes to Irrlicht. (diff) | |
download | SledjHamr-959831f4ef5a3e797f576c3de08cd65032c997ad.zip SledjHamr-959831f4ef5a3e797f576c3de08cd65032c997ad.tar.gz SledjHamr-959831f4ef5a3e797f576c3de08cd65032c997ad.tar.bz2 SledjHamr-959831f4ef5a3e797f576c3de08cd65032c997ad.tar.xz |
Remove damned ancient DOS line endings from Irrlicht. Hopefully I did not go overboard.
Diffstat (limited to 'libraries/irrlicht-1.8/source/Irrlicht/CLightSceneNode.h')
-rw-r--r-- | libraries/irrlicht-1.8/source/Irrlicht/CLightSceneNode.h | 216 |
1 files changed, 108 insertions, 108 deletions
diff --git a/libraries/irrlicht-1.8/source/Irrlicht/CLightSceneNode.h b/libraries/irrlicht-1.8/source/Irrlicht/CLightSceneNode.h index b2940ea..f12f9f6 100644 --- a/libraries/irrlicht-1.8/source/Irrlicht/CLightSceneNode.h +++ b/libraries/irrlicht-1.8/source/Irrlicht/CLightSceneNode.h | |||
@@ -1,108 +1,108 @@ | |||
1 | // Copyright (C) 2002-2012 Nikolaus Gebhardt | 1 | // Copyright (C) 2002-2012 Nikolaus Gebhardt |
2 | // This file is part of the "Irrlicht Engine". | 2 | // This file is part of the "Irrlicht Engine". |
3 | // For conditions of distribution and use, see copyright notice in irrlicht.h | 3 | // For conditions of distribution and use, see copyright notice in irrlicht.h |
4 | 4 | ||
5 | #ifndef __C_LIGHT_SCENE_NODE_H_INCLUDED__ | 5 | #ifndef __C_LIGHT_SCENE_NODE_H_INCLUDED__ |
6 | #define __C_LIGHT_SCENE_NODE_H_INCLUDED__ | 6 | #define __C_LIGHT_SCENE_NODE_H_INCLUDED__ |
7 | 7 | ||
8 | #include "ILightSceneNode.h" | 8 | #include "ILightSceneNode.h" |
9 | 9 | ||
10 | namespace irr | 10 | namespace irr |
11 | { | 11 | { |
12 | namespace scene | 12 | namespace scene |
13 | { | 13 | { |
14 | 14 | ||
15 | //! Scene node which is a dynamic light. You can switch the light on and off by | 15 | //! Scene node which is a dynamic light. You can switch the light on and off by |
16 | //! making it visible or not, and let it be animated by ordinary scene node animators. | 16 | //! making it visible or not, and let it be animated by ordinary scene node animators. |
17 | class CLightSceneNode : public ILightSceneNode | 17 | class CLightSceneNode : public ILightSceneNode |
18 | { | 18 | { |
19 | public: | 19 | public: |
20 | 20 | ||
21 | //! constructor | 21 | //! constructor |
22 | CLightSceneNode(ISceneNode* parent, ISceneManager* mgr, s32 id, | 22 | CLightSceneNode(ISceneNode* parent, ISceneManager* mgr, s32 id, |
23 | const core::vector3df& position, video::SColorf color, f32 range); | 23 | const core::vector3df& position, video::SColorf color, f32 range); |
24 | 24 | ||
25 | virtual ~CLightSceneNode() { } | 25 | virtual ~CLightSceneNode() { } |
26 | 26 | ||
27 | //! pre render event | 27 | //! pre render event |
28 | virtual void OnRegisterSceneNode(); | 28 | virtual void OnRegisterSceneNode(); |
29 | 29 | ||
30 | //! render | 30 | //! render |
31 | virtual void render(); | 31 | virtual void render(); |
32 | 32 | ||
33 | //! set node light data from light info | 33 | //! set node light data from light info |
34 | virtual void setLightData(const video::SLight& light); | 34 | virtual void setLightData(const video::SLight& light); |
35 | 35 | ||
36 | //! \return Returns the light data. | 36 | //! \return Returns the light data. |
37 | virtual const video::SLight& getLightData() const; | 37 | virtual const video::SLight& getLightData() const; |
38 | 38 | ||
39 | //! \return Returns the light data. | 39 | //! \return Returns the light data. |
40 | virtual video::SLight& getLightData(); | 40 | virtual video::SLight& getLightData(); |
41 | 41 | ||
42 | //! Sets if the node should be visible or not. | 42 | //! Sets if the node should be visible or not. |
43 | /** All children of this node won't be visible either, when set | 43 | /** All children of this node won't be visible either, when set |
44 | to true. | 44 | to true. |
45 | \param isVisible If the node shall be visible. */ | 45 | \param isVisible If the node shall be visible. */ |
46 | virtual void setVisible(bool isVisible); | 46 | virtual void setVisible(bool isVisible); |
47 | 47 | ||
48 | //! returns the axis aligned bounding box of this node | 48 | //! returns the axis aligned bounding box of this node |
49 | virtual const core::aabbox3d<f32>& getBoundingBox() const; | 49 | virtual const core::aabbox3d<f32>& getBoundingBox() const; |
50 | 50 | ||
51 | //! Returns type of the scene node | 51 | //! Returns type of the scene node |
52 | virtual ESCENE_NODE_TYPE getType() const { return ESNT_LIGHT; } | 52 | virtual ESCENE_NODE_TYPE getType() const { return ESNT_LIGHT; } |
53 | 53 | ||
54 | //! Writes attributes of the scene node. | 54 | //! Writes attributes of the scene node. |
55 | virtual void serializeAttributes(io::IAttributes* out, io::SAttributeReadWriteOptions* options=0) const; | 55 | virtual void serializeAttributes(io::IAttributes* out, io::SAttributeReadWriteOptions* options=0) const; |
56 | 56 | ||
57 | //! Reads attributes of the scene node. | 57 | //! Reads attributes of the scene node. |
58 | virtual void deserializeAttributes(io::IAttributes* in, io::SAttributeReadWriteOptions* options=0); | 58 | virtual void deserializeAttributes(io::IAttributes* in, io::SAttributeReadWriteOptions* options=0); |
59 | 59 | ||
60 | //! Creates a clone of this scene node and its children. | 60 | //! Creates a clone of this scene node and its children. |
61 | virtual ISceneNode* clone(ISceneNode* newParent=0, ISceneManager* newManager=0); | 61 | virtual ISceneNode* clone(ISceneNode* newParent=0, ISceneManager* newManager=0); |
62 | 62 | ||
63 | 63 | ||
64 | //! Sets the light's radius of influence. | 64 | //! Sets the light's radius of influence. |
65 | /** Outside this radius the light won't lighten geometry and cast no | 65 | /** Outside this radius the light won't lighten geometry and cast no |
66 | shadows. Setting the radius will also influence the attenuation, setting | 66 | shadows. Setting the radius will also influence the attenuation, setting |
67 | it to (0,1/radius,0). If you want to override this behavior, set the | 67 | it to (0,1/radius,0). If you want to override this behavior, set the |
68 | attenuation after the radius. | 68 | attenuation after the radius. |
69 | \param radius The new radius. */ | 69 | \param radius The new radius. */ |
70 | virtual void setRadius(f32 radius); | 70 | virtual void setRadius(f32 radius); |
71 | 71 | ||
72 | //! Gets the light's radius of influence. | 72 | //! Gets the light's radius of influence. |
73 | /** \return The current radius. */ | 73 | /** \return The current radius. */ |
74 | virtual f32 getRadius() const; | 74 | virtual f32 getRadius() const; |
75 | 75 | ||
76 | //! Sets the light type. | 76 | //! Sets the light type. |
77 | /** \param type The new type. */ | 77 | /** \param type The new type. */ |
78 | virtual void setLightType(video::E_LIGHT_TYPE type); | 78 | virtual void setLightType(video::E_LIGHT_TYPE type); |
79 | 79 | ||
80 | //! Gets the light type. | 80 | //! Gets the light type. |
81 | /** \return The current light type. */ | 81 | /** \return The current light type. */ |
82 | virtual video::E_LIGHT_TYPE getLightType() const; | 82 | virtual video::E_LIGHT_TYPE getLightType() const; |
83 | 83 | ||
84 | //! Sets whether this light casts shadows. | 84 | //! Sets whether this light casts shadows. |
85 | /** Enabling this flag won't automatically cast shadows, the meshes | 85 | /** Enabling this flag won't automatically cast shadows, the meshes |
86 | will still need shadow scene nodes attached. But one can enable or | 86 | will still need shadow scene nodes attached. But one can enable or |
87 | disable distinct lights for shadow casting for performance reasons. | 87 | disable distinct lights for shadow casting for performance reasons. |
88 | \param shadow True if this light shall cast shadows. */ | 88 | \param shadow True if this light shall cast shadows. */ |
89 | virtual void enableCastShadow(bool shadow=true); | 89 | virtual void enableCastShadow(bool shadow=true); |
90 | 90 | ||
91 | //! Check whether this light casts shadows. | 91 | //! Check whether this light casts shadows. |
92 | /** \return True if light would cast shadows, else false. */ | 92 | /** \return True if light would cast shadows, else false. */ |
93 | virtual bool getCastShadow() const; | 93 | virtual bool getCastShadow() const; |
94 | private: | 94 | private: |
95 | 95 | ||
96 | video::SLight LightData; | 96 | video::SLight LightData; |
97 | core::aabbox3d<f32> BBox; | 97 | core::aabbox3d<f32> BBox; |
98 | s32 DriverLightIndex; | 98 | s32 DriverLightIndex; |
99 | bool LightIsOn; | 99 | bool LightIsOn; |
100 | void doLightRecalc(); | 100 | void doLightRecalc(); |
101 | }; | 101 | }; |
102 | 102 | ||
103 | 103 | ||
104 | } // end namespace scene | 104 | } // end namespace scene |
105 | } // end namespace irr | 105 | } // end namespace irr |
106 | 106 | ||
107 | #endif | 107 | #endif |
108 | 108 | ||