Spinning Topp Logo BlackTopp Studios
inc
Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
Mezzanine::Graphics::LightProxy Class Reference

This is the proxy class for placing and manipulating lighting in the scene. More...

#include <lightproxy.h>

+ Inheritance diagram for Mezzanine::Graphics::LightProxy:
+ Collaboration diagram for Mezzanine::Graphics::LightProxy:

Public Member Functions

 LightProxy (const UInt32 ID, SceneManager *Creator)
 Blank constructor. More...
 
 LightProxy (const UInt32 ID, const Graphics::LightType Type, SceneManager *Creator)
 Type constructor. More...
 
 LightProxy (const XML::Node &SelfRoot, SceneManager *Creator)
 XML constructor. More...
 
virtual ~LightProxy ()
 Class destructor.
 
virtual Ogre::MovableObject * _GetBaseGraphicsObject () const
 Accessor for the internal graphics object. More...
 
virtual Ogre::Light * _GetGraphicsObject () const
 Accessor for the internal light. More...
 
virtual Real GetAttenuationConstant () const
 Gets the constant factor of the attenuation. More...
 
virtual Real GetAttenuationLinear () const
 Gets the linear factor of the attentuation. More...
 
virtual Real GetAttenuationQuadratic () const
 Gets the quadric factor of the attenuation. More...
 
virtual Real GetAttenuationRange () const
 Gets the absolute range of attenuation in world units. More...
 
virtual String GetDerivedSerializableName () const
 Gets the most derived serializable name of this WorldProxy. More...
 
virtual ColourValue GetDiffuseColour () const
 Gets the current colour of Diffuse light being emitted by this proxy. More...
 
virtual Vector3 GetDirection () const
 Gets the direction the light from this source is being emitted. More...
 
virtual Real GetPowerScale () const
 Gets the power scale of this light, which indicates it's relative power. More...
 
virtual Mezzanine::ProxyType GetProxyType () const
 Accessor for the type of proxy. More...
 
virtual ColourValue GetSpecularColour () const
 Gets the current colour of Specular light being emitted by this proxy. More...
 
virtual Real GetSpotlightFalloff () const
 Gets the rate of falloff of the cone of light emitted by this spotlight. More...
 
virtual Real GetSpotlightInnerAngle () const
 Gets the Inner angle of the cone of light emitted by this spotlight. More...
 
virtual Real GetSpotlightNearClipDistance () const
 Gets the near clip plane distance to be used by spotlights that use light clipping. More...
 
virtual Real GetSpotlightOuterAngle () const
 Gets the Outer angle of the cone of light emitted by this spotlight. More...
 
virtual Graphics::LightType GetType () const
 Gets the type of light that this light is. More...
 
virtual void ProtoDeSerializeProperties (const XML::Node &SelfRoot)
 Take the data stored in an XML Node and overwrite the properties of this object with it. More...
 
virtual void ProtoSerializeProperties (XML::Node &SelfRoot) const
 Convert the properties of this class to an XML::Node ready for serialization. More...
 
virtual void SetAttenuation (const Real Range, const Real Constant, const Real Linear, const Real Quadratic)
 Sets the factors for the attenuation formula applied to this light. More...
 
virtual void SetDiffuseColour (const ColourValue &Diffuse)
 Sets the colour for the Diffuse light from this source. More...
 
virtual void SetDirection (const Vector3 &Dir)
 Sets the direction the light will be emitted from this source. More...
 
virtual void SetPowerScale (const Real Scale)
 Sets the power scale of this light, which indicates it's relative power. More...
 
virtual void SetSpecularColour (const ColourValue &Specular)
 Sets the colour for the Specular light from this source. More...
 
virtual void SetSpotlightFalloff (const Real Falloff)
 Sets the rate of falloff of the cone of light emitted by a spotlight. More...
 
virtual void SetSpotlightInnerAngle (const Real Angle)
 Sets the Inner angle of the cone of light emitted by a spotlight. More...
 
virtual void SetSpotlightNearClipDistance (const Real NearClip)
 Sets the near clip plane distance to be used by spotlights that use light clipping. More...
 
virtual void SetSpotlightOuterAngle (const Real Angle)
 Sets the Outer angle of the cone of light emitted by a spotlight. More...
 
virtual void SetSpotlightRange (const Real InnerAngle, const Real OuterAngle, const Real Falloff=1.0)
 Defines the cone of light emitted by a spotlight. More...
 
virtual void SetType (const Graphics::LightType Type)
 Sets the type of light this light is. More...
 
- Public Member Functions inherited from Mezzanine::Graphics::RenderableProxy
 RenderableProxy (SceneManager *Creator)
 XML-assist Constructor. More...
 
 RenderableProxy (const UInt32 ID, SceneManager *Creator)
 Normal Constructor. More...
 
virtual ~RenderableProxy ()
 Class destructor.
 
virtual Ogre::SceneNode * _GetGraphicsNode () const
 Accessor for the internal node in the scenegraph for this proxy. More...
 
virtual void AddToWorld ()
 Performs all the necessary task to ensure this object is connected to it's respective world and ready for use. More...
 
virtual AxisAlignedBox GetAABB () const
 Gets this proxies AABB. More...
 
virtual Boole GetCastShadows () const
 Gets whether or not this proxy can cast a shadow. More...
 
virtual WorldManagerGetCreator () const
 Gets a pointer to this proxies creator. More...
 
virtual UInt32 GetLightMask () const
 Gets which types of lights will affect this proxy. More...
 
virtual Vector3 GetLocation () const
 Gets this objects current location. More...
 
virtual Quaternion GetOrientation () const
 Gets this objects current orientation. More...
 
virtual UInt32 GetQueryMask () const
 Gets the bitmask that will be used to determine if this object should be counted in scene queries. More...
 
virtual Boole GetReceiveShadows () const
 Gets whether or not this proxy can be rendered with a shadow casted on it. More...
 
virtual Real GetRenderDistance () const
 Gets the distance at which the proxy will stop rendering. More...
 
virtual Vector3 GetScale () const
 Gets the scaling currently being applied to this object. More...
 
virtual UInt32 GetVisibilityMask () const
 Gets the bitmask that will be used to determine if this object should be visible when rendering. More...
 
virtual Boole GetVisible () const
 Gets whether or not this proxy is visible. More...
 
virtual Boole IsInWorld () const
 Gets whether or not this object is inside of it's world. More...
 
virtual void Pitch (const Real Angle)
 Rotate the object around the X axis. More...
 
virtual void RemoveFromWorld ()
 Unhooks this proxy from it's respective world. More...
 
virtual void Roll (const Real Angle)
 Rotate the object around the Z axis. More...
 
virtual void Rotate (const Vector3 &Axis, const Real Angle)
 Rotates the object from it's existing rotation. More...
 
virtual void Rotate (const Quaternion &Rotation)
 Rotates the object from it's existing rotation. More...
 
virtual void Scale (const Vector3 &Scale)
 Scales the object from it's current size. More...
 
virtual void Scale (const Real X, const Real Y, const Real Z)
 Scales the object from it's current size. More...
 
virtual void SetCastShadows (const Boole CastShadows)
 Sets whether or not this proxy can cast a shadow. More...
 
virtual void SetLightMask (const UInt32 Mask)
 Sets which types of lights will affect this proxy. More...
 
virtual void SetLocation (const Vector3 &Loc)
 Sets the location of this object in parent space. More...
 
virtual void SetLocation (const Real X, const Real Y, const Real Z)
 Sets the location of this object in parent space via Reals. More...
 
virtual void SetOrientation (const Quaternion &Ori)
 Sets the orientation of this object in parent space. More...
 
virtual void SetOrientation (const Real X, const Real Y, const Real Z, const Real W)
 Sets the orientation of this object in parent space via Reals. More...
 
virtual void SetQueryMask (const UInt32 Mask)
 Sets the bitmesk that will be used to determine if this object should be counted in scene queries. More...
 
virtual void SetRenderDistance (const Real Distance)
 Sets the distance at which the proxy will stop rendering. More...
 
virtual void SetScale (const Vector3 &Sc)
 Sets the scaling to be applied to this object. More...
 
virtual void SetScale (const Real X, const Real Y, const Real Z)
 Sets the scaling to be applied to this object via Reals. More...
 
virtual void SetVisibilityMask (const UInt32 Mask)
 Sets the bitmask that will be used to determine if this object should be visible when rendering. More...
 
virtual void SetVisible (const Boole Visible)
 Sets whether or not this proxy is visible. More...
 
virtual void Translate (const Vector3 &Trans)
 Moves this object from it's current location. More...
 
virtual void Translate (const Real X, const Real Y, const Real Z)
 Moves this object from it's current location. More...
 
virtual void Yaw (const Real Angle)
 Rotate the object around the Y axis. More...
 
- Public Member Functions inherited from Mezzanine::WorldProxy
 WorldProxy ()
 Blank constructor.
 
 WorldProxy (const UInt32 ID)
 Normal/ID constructor. More...
 
virtual ~WorldProxy ()
 Class destructor.
 
void _Bind (WorldObject *NewParent)
 Binds this proxy to a WorldObject. More...
 
virtual WorldObjectGetParentObject () const
 Gets a pointer to the parent object controlling this proxy. More...
 
virtual UInt32 GetProxyID () const
 Gets the unique ID of this proxy. More...
 
virtual void ProtoDeSerialize (const XML::Node &SelfRoot)
 Take the data stored in an XML Node and overwrite this object with it. More...
 
virtual void ProtoSerialize (XML::Node &ParentNode) const
 Convert this class to an XML::Node ready for serialization. More...
 
- Public Member Functions inherited from Mezzanine::TransformableObject
virtual ~TransformableObject ()
 Class Destructor.
 
virtual Vector3 ConvertGlobalToLocal (const Vector3 &Location) const
 Converts a point in global space to the same point in local space. More...
 
virtual Quaternion ConvertGlobalToLocal (const Quaternion &Orientation) const
 Converts a rotation in global space to the same rotation in local space. More...
 
virtual Vector3 ConvertLocalToGlobal (const Vector3 &Location) const
 Converts a point in local space to the same point in global space. More...
 
virtual Quaternion ConvertLocalToGlobal (const Quaternion &Orientation) const
 Converts a rotation in local space to the same rotation in global space. More...
 

Static Public Member Functions

static String GetSerializableName ()
 Get the name of the the XML tag the proxy class will leave behind as its instances are serialized. More...
 
- Static Public Member Functions inherited from Mezzanine::Graphics::RenderableProxy
static String GetSerializableName ()
 Get the name of the the XML tag the proxy class will leave behind as its instances are serialized. More...
 
- Static Public Member Functions inherited from Mezzanine::WorldProxy
static String GetSerializableName ()
 Get the name of the the XML tag the proxy class will leave behind as its instances are serialized. More...
 

Protected Member Functions

virtual void CreateLight ()
 Creates an internal light to be used by the calling instance. More...
 
virtual void DestroyLight ()
 Destroys the internal light in use by this proxy. More...
 
- Protected Member Functions inherited from Mezzanine::WorldProxy
virtual void ProtoDeSerializeImpl (const XML::Node &SelfRoot)
 Implementation method for deseriailizing additional sets of data. More...
 
virtual void ProtoSerializeImpl (XML::Node &SelfRoot) const
 Implementation method for serializing additional sets of data. More...
 

Protected Attributes

Ogre::Light * GraphicsLight
 A pointer to the internal Light this proxy is based on. More...
 
- Protected Attributes inherited from Mezzanine::Graphics::RenderableProxy
Ogre::SceneNode * GraphicsNode
 A pointer to the internal object storing the proxy transform. More...
 
Boole InWorld
 This stores whether the proxy is currently in the graphics world or not. More...
 
SceneManagerManager
 This is a pointer to the scene manager that created and owns this proxy. More...
 
UInt32 QueryMask
 This is a bitmask identifying this objects type when being queried. Used for advanced query configuration. More...
 
UInt32 VisibilityMask
 This is a bitmask identifying this objects type when being rendered. Used for advanced visibility configuration. More...
 
- Protected Attributes inherited from Mezzanine::WorldProxy
WorldObjectParentObject
 Pointer to the Object this proxy belongs to. More...
 
UInt32 ProxyID
 The unique ID assigned to the type of proxy an instance is. More...
 

Detailed Description

This is the proxy class for placing and manipulating lighting in the scene.

Definition at line 63 of file lightproxy.h.

Constructor & Destructor Documentation

Mezzanine::Graphics::LightProxy::LightProxy ( const UInt32  ID,
SceneManager Creator 
)

Blank constructor.

Parameters
IDThe unique ID assigned to this LightProxy.
CreatorA pointer to the manager that created this proxy.

Definition at line 92 of file lightproxy.cpp.

Mezzanine::Graphics::LightProxy::LightProxy ( const UInt32  ID,
const Graphics::LightType  Type,
SceneManager Creator 
)

Type constructor.

Remarks
The type provided here can be changed later.
Parameters
IDThe unique ID assigned to this LightProxy.
TypeThe type of light this light is to be constructed as.
CreatorA pointer to the manager that created this proxy.

Definition at line 97 of file lightproxy.cpp.

Mezzanine::Graphics::LightProxy::LightProxy ( const XML::Node SelfRoot,
SceneManager Creator 
)

XML constructor.

Parameters
SelfRootAn XML::Node containing the data to populate this class with.
CreatorA pointer to the manager that created this proxy.

Definition at line 102 of file lightproxy.cpp.

Member Function Documentation

Ogre::MovableObject * Mezzanine::Graphics::LightProxy::_GetBaseGraphicsObject ( ) const
virtual

Accessor for the internal graphics object.

Returns
Returns a pointer to the internal object of this proxy.

Implements Mezzanine::Graphics::RenderableProxy.

Definition at line 327 of file lightproxy.cpp.

Ogre::Light * Mezzanine::Graphics::LightProxy::_GetGraphicsObject ( ) const
virtual

Accessor for the internal light.

Returns
Returns a pointer to the internal light this proxy is based on.

Definition at line 324 of file lightproxy.cpp.

void Mezzanine::Graphics::LightProxy::CreateLight ( )
protectedvirtual

Creates an internal light to be used by the calling instance.

Definition at line 113 of file lightproxy.cpp.

void Mezzanine::Graphics::LightProxy::DestroyLight ( )
protectedvirtual

Destroys the internal light in use by this proxy.

Definition at line 122 of file lightproxy.cpp.

Real Mezzanine::Graphics::LightProxy::GetAttenuationConstant ( ) const
virtual

Gets the constant factor of the attenuation.

Returns
Returns a real representing the constant factor of attenuation.

Definition at line 169 of file lightproxy.cpp.

Real Mezzanine::Graphics::LightProxy::GetAttenuationLinear ( ) const
virtual

Gets the linear factor of the attentuation.

Returns
Returns a real representing the linear factor of attenuation.

Definition at line 172 of file lightproxy.cpp.

Real Mezzanine::Graphics::LightProxy::GetAttenuationQuadratic ( ) const
virtual

Gets the quadric factor of the attenuation.

Returns
Returns a real representing the quadric factor of attenuation.

Definition at line 175 of file lightproxy.cpp.

Real Mezzanine::Graphics::LightProxy::GetAttenuationRange ( ) const
virtual

Gets the absolute range of attenuation in world units.

Returns
Returns a real representing the absolute range of attenuation.

Definition at line 166 of file lightproxy.cpp.

String Mezzanine::Graphics::LightProxy::GetDerivedSerializableName ( ) const
virtual

Gets the most derived serializable name of this WorldProxy.

Note
When creating a new WorldProxy class verify this method has a valid return for it in order for serialization to work properly.
Returns
Returns the name of the XML tag from the most derived class of "this".

Reimplemented from Mezzanine::Graphics::RenderableProxy.

Definition at line 315 of file lightproxy.cpp.

ColourValue Mezzanine::Graphics::LightProxy::GetDiffuseColour ( ) const
virtual

Gets the current colour of Diffuse light being emitted by this proxy.

Returns
Returns a colourvalue representing the currently set Diffuse light colour.

Definition at line 148 of file lightproxy.cpp.

Vector3 Mezzanine::Graphics::LightProxy::GetDirection ( ) const
virtual

Gets the direction the light from this source is being emitted.

Note
The direction is not used if this is a point light.
Returns
Returns a Vector3 representing the direction this proxy is emitting light.

Definition at line 139 of file lightproxy.cpp.

Real Mezzanine::Graphics::LightProxy::GetPowerScale ( ) const
virtual

Gets the power scale of this light, which indicates it's relative power.

Note
The power scale is useful when accessed by shaders in HDR rendering.
Returns
Returns a Real representing this lights current power scale.

Definition at line 181 of file lightproxy.cpp.

Mezzanine::ProxyType Mezzanine::Graphics::LightProxy::GetProxyType ( ) const
virtual

Accessor for the type of proxy.

Returns
Returns enum value for the type of proxy this object is.

Implements Mezzanine::WorldProxy.

Definition at line 133 of file lightproxy.cpp.

String Mezzanine::Graphics::LightProxy::GetSerializableName ( )
static

Get the name of the the XML tag the proxy class will leave behind as its instances are serialized.

Returns
A string containing the name of this class.

Definition at line 318 of file lightproxy.cpp.

ColourValue Mezzanine::Graphics::LightProxy::GetSpecularColour ( ) const
virtual

Gets the current colour of Specular light being emitted by this proxy.

Returns
Returns a colourvalue representing the currently set Specular light colour.

Definition at line 154 of file lightproxy.cpp.

Real Mezzanine::Graphics::LightProxy::GetSpotlightFalloff ( ) const
virtual

Gets the rate of falloff of the cone of light emitted by this spotlight.

Note
These values are only used if this lights type is set to "Spotlight".
Returns
Returns a real representing the falloff of the cone of light.

Definition at line 202 of file lightproxy.cpp.

Real Mezzanine::Graphics::LightProxy::GetSpotlightInnerAngle ( ) const
virtual

Gets the Inner angle of the cone of light emitted by this spotlight.

Note
These values are only used if this lights type is set to "Spotlight".
Returns
Returns a real representing the inner angle of this spotlight, in radians.

Definition at line 190 of file lightproxy.cpp.

Real Mezzanine::Graphics::LightProxy::GetSpotlightNearClipDistance ( ) const
virtual

Gets the near clip plane distance to be used by spotlights that use light clipping.

Returns
Returns the near clip distance used by spotlights.

Definition at line 208 of file lightproxy.cpp.

Real Mezzanine::Graphics::LightProxy::GetSpotlightOuterAngle ( ) const
virtual

Gets the Outer angle of the cone of light emitted by this spotlight.

Note
These values are only used if this lights type is set to "Spotlight".
Returns
Returns a real representing the outer angle of this spotlight, in radians.

Definition at line 196 of file lightproxy.cpp.

Graphics::LightType Mezzanine::Graphics::LightProxy::GetType ( ) const
virtual

Gets the type of light that this light is.

Returns
Returns an enum value representing this lights type.

Definition at line 160 of file lightproxy.cpp.

void Mezzanine::Graphics::LightProxy::ProtoDeSerializeProperties ( const XML::Node SelfRoot)
virtual

Take the data stored in an XML Node and overwrite the properties of this object with it.

Parameters
SelfRootAn XML::Node containing the data to populate this class with.

Reimplemented from Mezzanine::Graphics::RenderableProxy.

Definition at line 243 of file lightproxy.cpp.

void Mezzanine::Graphics::LightProxy::ProtoSerializeProperties ( XML::Node SelfRoot) const
virtual

Convert the properties of this class to an XML::Node ready for serialization.

Parameters
SelfRootThe root node containing all the serialized data for this instance.

Reimplemented from Mezzanine::Graphics::RenderableProxy.

Definition at line 214 of file lightproxy.cpp.

void Mezzanine::Graphics::LightProxy::SetAttenuation ( const Real  Range,
const Real  Constant,
const Real  Linear,
const Real  Quadratic 
)
virtual

Sets the factors for the attenuation formula applied to this light.

Parameters
RangeThe absolute range of the light in world units. Objects beyond this range will not be influenced by this light.
ConstantThe constant of the attenuation, ranging from 0.0 to 1.0. 1.0 means never attenuate, 0.0 is complete attenuation.
LinearThe linear factor of the attentuation, ranging from 0.0 to 1.0. 1.0 means attenuate evenly over the distance.
QuadraticThe Quadratic factor of the attenuation. This value adds curvature to the attenuation.

Definition at line 163 of file lightproxy.cpp.

void Mezzanine::Graphics::LightProxy::SetDiffuseColour ( const ColourValue Diffuse)
virtual

Sets the colour for the Diffuse light from this source.

Parameters
DiffuseColourValue representing the color of the Diffuse light to be set.

Definition at line 145 of file lightproxy.cpp.

void Mezzanine::Graphics::LightProxy::SetDirection ( const Vector3 Dir)
virtual

Sets the direction the light will be emitted from this source.

Note
The direction is not used if this is a point light.
Parameters
DirA Vector3 representing the direction the light will travel from this source.

Definition at line 136 of file lightproxy.cpp.

void Mezzanine::Graphics::LightProxy::SetPowerScale ( const Real  Scale)
virtual

Sets the power scale of this light, which indicates it's relative power.

Note
The power scale is useful when accessed by shaders in HDR rendering.
Parameters
ScaleThe power scale to set for this light.

Definition at line 178 of file lightproxy.cpp.

void Mezzanine::Graphics::LightProxy::SetSpecularColour ( const ColourValue Specular)
virtual

Sets the colour for the Specular light from this source.

Parameters
SpecularColourValue representing the color of the Specular light to be set.

Definition at line 151 of file lightproxy.cpp.

void Mezzanine::Graphics::LightProxy::SetSpotlightFalloff ( const Real  Falloff)
virtual

Sets the rate of falloff of the cone of light emitted by a spotlight.

Note
These values are only used if this lights type is set to "Spotlight".
Parameters
FalloffThe rate of falloff between the inner and outer cones. 1.0 means linear falloff. Less means slower falloff and higher means faster falloff.

Definition at line 199 of file lightproxy.cpp.

void Mezzanine::Graphics::LightProxy::SetSpotlightInnerAngle ( const Real  Angle)
virtual

Sets the Inner angle of the cone of light emitted by a spotlight.

Note
These values are only used if this lights type is set to "Spotlight".
Parameters
AngleThe angle of the inner cone in radians.

Definition at line 187 of file lightproxy.cpp.

void Mezzanine::Graphics::LightProxy::SetSpotlightNearClipDistance ( const Real  NearClip)
virtual

Sets the near clip plane distance to be used by spotlights that use light clipping.

Parameters
NearClipA Real representing the near clip distance used by spotlights.

Definition at line 205 of file lightproxy.cpp.

void Mezzanine::Graphics::LightProxy::SetSpotlightOuterAngle ( const Real  Angle)
virtual

Sets the Outer angle of the cone of light emitted by a spotlight.

Note
These values are only used if this lights type is set to "Spotlight".
Parameters
AngleThe angle of the outer cone in radians.

Definition at line 193 of file lightproxy.cpp.

void Mezzanine::Graphics::LightProxy::SetSpotlightRange ( const Real  InnerAngle,
const Real  OuterAngle,
const Real  Falloff = 1.0 
)
virtual

Defines the cone of light emitted by a spotlight.

Note
These values are only used if this lights type is set to "Spotlight".
Remarks
InnerAngle and OuterAngle should be input as Radians.
Parameters
InnerAngleAngle of the inner cone in radians.
OuterAngleAngle of the outer cone in radions.
FalloffThe rate of falloff between the inner and outer cones. 1.0 means linear falloff. Less means slower falloff and higher means faster falloff.

Definition at line 184 of file lightproxy.cpp.

void Mezzanine::Graphics::LightProxy::SetType ( const Graphics::LightType  Type)
virtual

Sets the type of light this light is.

Parameters
TypeThe enum value representing the type of light this will become.

Definition at line 157 of file lightproxy.cpp.

Member Data Documentation

Ogre::Light* Mezzanine::Graphics::LightProxy::GraphicsLight
protected

A pointer to the internal Light this proxy is based on.

Definition at line 68 of file lightproxy.h.


The documentation for this class was generated from the following files: