00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023 #ifndef __PLSCENE_LIGHT_H__
00024 #define __PLSCENE_LIGHT_H__
00025 #pragma once
00026
00027
00028
00029
00030
00031 #include <PLGraphics/Color/Color3.h>
00032 #include "PLScene/Scene/SceneNode.h"
00033
00034
00035
00036
00037
00038 namespace PLScene {
00039
00040
00041
00042
00043
00044
00045
00046
00047
00048
00049
00050
00051 class SNLight : public SceneNode {
00052
00053
00054
00055
00056
00057 public:
00058
00059
00060
00061
00062 enum EFlags {
00063 Flares = 1<<10,
00064 Corona = 1<<11,
00065 Blend = 1<<12
00066 };
00067 pl_enum(EFlags)
00068 pl_enum_base(SceneNode::EFlags)
00069 pl_enum_value(Flares, "Lens flares")
00070 pl_enum_value(Corona, "Corona around the light")
00071 pl_enum_value(Blend, "Brighten the screen (blend effect)")
00072 pl_enum_end
00073
00074
00075
00076
00077
00078 pl_class(PLS_RTTI_EXPORT, SNLight, "PLScene", PLScene::SceneNode, "Abstract light scene node base class")
00079
00080 pl_properties
00081 pl_property("Icon", "Data/Textures/IconLight.dds")
00082 pl_properties_end
00083
00084 pl_attribute(Color, PLGraphics::Color3, PLGraphics::Color3(1.0f, 1.0f, 1.0f), ReadWrite, DirectValue, "Light color (r/g/b)", "")
00085 pl_attribute(CoronaSize, float, 0.2f, ReadWrite, DirectValue, "Corona size", "")
00086 pl_attribute(FlareSize, float, 0.1f, ReadWrite, DirectValue, "Lens flare size", "")
00087 pl_attribute(ScreenBrighten, float, 0.3f, ReadWrite, DirectValue, "Screen brighten", "")
00088
00089 pl_attribute(Flags, pl_flag_type(EFlags), 0, ReadWrite, GetSet, "Flags", "")
00090 #ifdef PLSCENE_EXPORTS // The following is only required when compiling PLScene
00091
00092 pl_method_0(IsRenderLight, pl_ret_type(bool), "Returns whether this is a render light or not. Returns 'true' if this is a render light, else 'false'.", "")
00093 pl_method_0(IsEffectLight, pl_ret_type(bool), "Returns whether this scene node is a effect light (SNEffectLight) or not. Returns 'true' if this scene node is a effect light, else 'false'.", "")
00094 pl_method_0(IsPointLight, pl_ret_type(bool), "Returns whether this scene node is a point light (SNPointLight) or not. Returns 'true' if this scene node is a point light, else 'false'.", "")
00095 pl_method_0(IsProjectivePointLight, pl_ret_type(bool), "Returns whether this scene node is a projective point light (SNProjectivePointLight) or not. Returns 'true' if this scene node is a projective point light, else 'false'.", "")
00096 pl_method_0(IsSpotLight, pl_ret_type(bool), "Returns whether this scene node is a spot light (SNSpotLight) or not. Returns 'true' if this scene node is a spot light, else 'false'.", "")
00097 pl_method_0(IsProjectiveSpotLight, pl_ret_type(bool), "Returns whether this scene node is a projective spot light (SNProjectiveSpotLight) or not. Returns 'true' if this scene node is a projective spot light, else 'false'.", "")
00098 pl_method_0(IsDirectionalLight, pl_ret_type(bool), "Returns whether this scene node is a directional light (SNDirectionalLight) or not. Returns 'true' if this scene node is a directional light, else 'false'.", "")
00099 #endif
00100 pl_class_end
00101
00102
00103
00104
00105
00106 public:
00107
00108
00109
00110
00111
00112
00113
00114 PLS_API virtual bool IsRenderLight() const;
00115
00116
00117
00118
00119
00120
00121
00122
00123
00124
00125
00126 PLS_API virtual bool IsEffectLight() const;
00127
00128
00129
00130
00131
00132
00133
00134
00135
00136
00137
00138 PLS_API virtual bool IsPointLight() const;
00139
00140
00141
00142
00143
00144
00145
00146
00147
00148
00149
00150 PLS_API virtual bool IsProjectivePointLight() const;
00151
00152
00153
00154
00155
00156
00157
00158
00159
00160
00161
00162 PLS_API virtual bool IsSpotLight() const;
00163
00164
00165
00166
00167
00168
00169
00170
00171
00172
00173
00174 PLS_API virtual bool IsProjectiveSpotLight() const;
00175
00176
00177
00178
00179
00180
00181
00182
00183
00184
00185
00186 PLS_API virtual bool IsDirectionalLight() const;
00187
00188
00189
00190
00191
00192 protected:
00193
00194
00195
00196
00197 PLS_API SNLight();
00198
00199
00200
00201
00202
00203 PLS_API virtual ~SNLight();
00204
00205
00206 };
00207
00208
00209
00210
00211
00212 }
00213
00214
00215 #endif // __PLSCENE_LIGHT_H__