40 #ifndef _graphicslightproxy_cpp
41 #define _graphicslightproxy_cpp
47 #include "Graphics/scenemanager.h"
49 #include "exception.h"
51 #include "stringtool.h"
84 return Ogre::Light::LT_POINT;
117 this->
GraphicsLight->setUserAny( Ogre::Any( static_cast<RenderableProxy*>(
this ) ) );
134 {
return Mezzanine::PT_Graphics_LightProxy; }
161 {
return ConvertLightType( this->
GraphicsLight->getType() ); }
164 { this->
GraphicsLight->setAttenuation(Range,Constant,Linear,Quadratic); }
185 { this->
GraphicsLight->setSpotlightRange(Ogre::Radian(InnerAngle),Ogre::Radian(OuterAngle),Falloff); }
188 { this->
GraphicsLight->setSpotlightInnerAngle(Ogre::Radian(Angle)); }
191 {
return this->
GraphicsLight->getSpotlightInnerAngle().valueRadians(); }
194 { this->
GraphicsLight->setSpotlightOuterAngle(Ogre::Radian(Angle)); }
197 {
return this->
GraphicsLight->getSpotlightOuterAngle().valueRadians(); }
206 { this->
GraphicsLight->setSpotlightNearClipDistance(NearClip); }
209 {
return this->
GraphicsLight->getSpotlightNearClipDistance(); }
250 if( !PropertiesNode.
Empty() ) {
252 Real AttenRange = 100000.0, AttenConstant = 1.0, AttenLinear = 0.0, AttenQuadratic = 0.0;
255 if( !CurrAttrib.
Empty() )
256 this->
SetType( static_cast<Graphics::LightType>( CurrAttrib.
AsWhole() ) );
259 if( !CurrAttrib.
Empty() )
260 AttenRange = CurrAttrib.
AsReal();
262 CurrAttrib = PropertiesNode.
GetAttribute(
"AttenConstant");
263 if( !CurrAttrib.
Empty() )
264 AttenConstant = CurrAttrib.
AsReal();
266 CurrAttrib = PropertiesNode.
GetAttribute(
"AttenLinear");
267 if( !CurrAttrib.
Empty() )
268 AttenLinear = CurrAttrib.
AsReal();
270 CurrAttrib = PropertiesNode.
GetAttribute(
"AttenQuadratic");
271 if( !CurrAttrib.
Empty() )
272 AttenQuadratic = CurrAttrib.
AsReal();
275 if( !CurrAttrib.
Empty() )
278 CurrAttrib = PropertiesNode.
GetAttribute(
"SpotlightInnerAngle");
279 if( !CurrAttrib.
Empty() )
282 CurrAttrib = PropertiesNode.
GetAttribute(
"SpotlightOuterAngle");
283 if( !CurrAttrib.
Empty() )
286 CurrAttrib = PropertiesNode.
GetAttribute(
"SpotlightFalloff");
287 if( !CurrAttrib.
Empty() )
290 CurrAttrib = PropertiesNode.
GetAttribute(
"SpotlightNearClipDistance");
291 if( !CurrAttrib.
Empty() )
294 this->
SetAttenuation(AttenRange,AttenConstant,AttenLinear,AttenQuadratic);
297 if( !DiffuseColourNode.
Empty() ) {
303 if( !SpecularColourNode.
Empty() ) {
319 {
return "LightProxy"; }