Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

Ogre::Light Class Reference

Representation of a dynamic light source in the scene. More...

#include <OgreLight.h>

Inheritance diagram for Ogre::Light:

Inheritance graph
[legend]
Collaboration diagram for Ogre::Light:

Collaboration graph
[legend]
List of all members.

Public Types

enum  LightTypes { LT_POINT, LT_DIRECTIONAL, LT_SPOTLIGHT }
 Defines the type of light. More...


Public Methods

 Light ()
 Default constructor (for Python mainly).

 Light (const String &name)
 Normal constructor.

 ~Light ()
 Standard destructor.

const StringgetName (void) const
 Returns the name of this light (cannot be modified).

void setType (LightTypes type)
 Sets the type of light - see LightTypes for more info.

LightTypes getType (void) const
 Returns the light type.

void setDiffuseColour (Real red, Real green, Real blue)
 Sets the colour of the diffuse light given off by this source.

void setDiffuseColour (const ColourValue &colour)
 Sets the colour of the diffuse light given off by this source.

const ColourValuegetDiffuseColour (void) const
 Returns the colour of the diffuse light given off by this light source (see setDiffuseColour for more info).

void setSpecularColour (Real red, Real green, Real blue)
 Sets the colour of the specular light given off by this source.

void setSpecularColour (const ColourValue &colour)
 Sets the colour of the specular light given off by this source.

const ColourValuegetSpecularColour (void) const
 Returns the colour of specular light given off by this light source.

void setAttenuation (Real range, Real constant, Real linear, Real quadratic)
 Sets the attenuation parameters of the light source ie how it diminishes with distance.

Real getAttenuationRange (void) const
 Returns the absolute upper range of the light.

Real getAttenuationConstant (void) const
 Returns the constant factor in the attenuation formula.

Real getAttenuationLinear (void) const
 Returns the linear factor in the attenuation formula.

Real getAttenuationQuadric (void) const
 Returns the quadric factor in the attenuation formula.

void setPosition (Real x, Real y, Real z)
 Sets the position of the light.

void setPosition (const Vector3 &vec)
 Sets the position of the light.

const Vector3getPosition (void) const
 Returns the position of the light.

void setDirection (Real x, Real y, Real z)
 Sets the direction in which a light points.

void setDirection (const Vector3 &vec)
 Sets the direction in which a light points.

const Vector3getDirection (void) const
 Returns the light's direction.

void setSpotlightRange (Real innerAngle, Real outerAngle, Real falloff=1.0)
 Sets the range of a spotlight, i.e.

Real getSpotlightInnerAngle (void) const
 Returns the angle covered by the spotlights inner cone, in degrees.

Real getSpotlightOuterAngle (void) const
 Returns the angle covered by the spotlights outer cone, in degrees.

Real getSpotlightFalloff (void) const
 Returns the falloff between the inner and outer cones of the spotlight.

void _notifyCurrentCamera (Camera *cam)
 Overridden from MovableObject.

const AxisAlignedBoxgetBoundingBox (void) const
 Overridden from MovableObject.

void _updateRenderQueue (RenderQueue *queue)
 Overridden from MovableObject.

const StringgetMovableType (void) const
 Overridden from MovableObject.

const Vector3getDerivedPosition (void) const
 Retrieves the position of the light including any transform from nodes it is attached to.

const Vector3getDerivedDirection (void) const
 Retrieves the direction of the light including any transform from nodes it is attached to.

void setVisible (bool visible)
 Overridden from MovableObject.

Real getBoundingRadius (void) const
 Overridden from MovableObject.

virtual NodegetParentNode (void) const
 Returns the node to which this object is attached.

virtual void _notifyAttached (Node *parent, bool isTagPoint=false)
 Internal method called to notify the object that it has been attached to a node.

virtual bool isAttached (void) const
 Returns true if this object is attached to a SceneNode or TagPoint.

virtual const AxisAlignedBoxgetWorldBoundingBox (bool derive=false) const
 Retrieves the axis-aligned bounding box for this object in world coordinates.

virtual const SpheregetWorldBoundingSphere (bool derive=false) const
 Retrieves the worldspace bounding sphere for this object.

virtual bool isVisible (void) const
 Returns whether or not this object is supposed to be visible or not.

virtual void setUserObject (UserDefinedObject *obj)
 Call this to associate your own custom user object instance with this MovableObject.

virtual UserDefinedObjectgetUserObject (void)
 Retrieves a pointer to a custom application object associated with this movable by an earlier call to setUserObject.

virtual void setRenderQueueGroup (RenderQueueGroupID queueID)
 Sets the render queue group this entity will be rendered through.

virtual RenderQueueGroupID getRenderQueueGroup (void) const
 Gets the queue group for this entity, see setRenderQueueGroup for full details.

virtual Matrix4 _getParentNodeFullTransform (void) const
 return the full transformation of the parent sceneNode or the attachingPoint node

virtual void setQueryFlags (unsigned long flags)
 Sets the query flags for this object.

virtual void addQueryFlags (unsigned long flags)
 As setQueryFlags, except the flags passed as parameters are appended to the existing flags on this object.

virtual void removeQueryFlags (unsigned long flags)
 As setQueryFlags, except the flags passed as parameters are removed from the existing flags on this object.

virtual unsigned long getQueryFlags (void) const
 Returns the query flags relevant for this object.


Public Attributes

Real tempSquareDist
 Temp tag used for sorting.


Protected Attributes

NodemParentNode
 node to which this object is attached

bool mParentIsTagPoint
bool mVisible
 Is this object visible?

UserDefinedObjectmUserObject
 User defined object which is linked to this object.

RenderQueueGroupID mRenderQueueID
 The render queue to use when rendering this object.

unsigned long mQueryFlags
 Flags determining whether this object is included / excluded from scene queries.

AxisAlignedBox mWorldAABB
 Cached world AABB of this object.

Sphere mWorldBoundingSphere

Private Methods

void update (void) const
 internal method for synchronising with parent node (if any)


Private Attributes

String mName
LightTypes mLightType
Vector3 mPosition
ColourValue mDiffuse
ColourValue mSpecular
Vector3 mDirection
Real mSpotOuter
Real mSpotInner
Real mSpotFalloff
Real mRange
Real mAttenuationConst
Real mAttenuationLinear
Real mAttenuationQuad
Vector3 mDerivedPosition
Vector3 mDerivedDirection
Quaternion mLastParentOrientation
 Stored versions of parent orientation / position.

Vector3 mLastParentPosition

Static Private Attributes

String msMovableType = "Light"
 Shared class-level name for Movable type.


Detailed Description

Representation of a dynamic light source in the scene.

Remarks:
Lights are added to the scene like any other object. They contain various parameters like type, position, attenuation (how light intensity fades with distance), colour etc.

The defaults when a light is created is pure white diffues light, with no attenuation (does not decrease with distance) and a range of 1000 world units.

Lights are created by using the SceneManager::createLight method. They can subsequently be added to a SceneNode if required to allow them to move relative to a node in the scene. A light attached to a SceneNode is assumed to havea base position of (0,0,0) and a direction of (0,0,1) before modification by the SceneNode's own orientation. If not attached to a SceneNode, the light's position and direction is as set using setPosition and setDirection.

Remember also that dynamic lights rely on modifying the colour of vertices based on the position of the light compared to an object's vertex normals. Dynamic lighting will only look good if the object being lit has a fair level of tesselation and the normals are properly set. This is particularly true for the spotlight which will only look right on highly tesselated models. In the future OGRE may be extended for certain scene types so an alternative to the standard dynamic lighting may be used, such as dynamic lightmaps.

Definition at line 60 of file OgreLight.h.


Member Enumeration Documentation

enum Ogre::Light::LightTypes
 

Defines the type of light.

Enumeration values:
LT_POINT  Point light sources give off light equally in all directions, so require only position not direction.
LT_DIRECTIONAL  Directional lights simulate parallel light beams from a distant source, hence have direction but no position.
LT_SPOTLIGHT  Spotlights simulate a cone of light from a source so require position and direction, plus extra values for falloff.

Definition at line 67 of file OgreLight.h.

Referenced by Ogre::D3D9Mappings::get().


Constructor & Destructor Documentation

Ogre::Light::Light  
 

Default constructor (for Python mainly).

Definition at line 35 of file OgreLight.cpp.

References LT_POINT, mAttenuationConst, mAttenuationLinear, mAttenuationQuad, mDiffuse, mDirection, mLightType, Ogre::MovableObject::mParentNode, mPosition, mRange, and mSpecular.

Ogre::Light::Light const String   name
 

Normal constructor.

Should not be called directly, but rather the SceneManager::createLight method should be used.

Definition at line 53 of file OgreLight.cpp.

References LT_POINT, mAttenuationConst, mAttenuationLinear, mAttenuationQuad, mDiffuse, mDirection, mLightType, mName, Ogre::MovableObject::mParentNode, mPosition, mRange, mSpecular, mSpotFalloff, mSpotInner, and mSpotOuter.

Ogre::Light::~Light  
 

Standard destructor.

Definition at line 79 of file OgreLight.cpp.


Member Function Documentation

Matrix4 Ogre::MovableObject::_getParentNodeFullTransform void    const [virtual, inherited]
 

return the full transformation of the parent sceneNode or the attachingPoint node

Definition at line 92 of file OgreMovableObject.cpp.

References Ogre::Node::_getFullTransform(), and Ogre::MovableObject::mParentNode.

Referenced by Ogre::Entity::cacheBoneMatrices(), Ogre::TagPoint::getParentEntityTransform(), Ogre::MovableObject::getWorldBoundingBox(), Ogre::SubEntity::getWorldTransforms(), and Ogre::BillboardSet::getWorldTransforms().

void Ogre::MovableObject::_notifyAttached Node   parent,
bool    isTagPoint = false
[virtual, inherited]
 

Internal method called to notify the object that it has been attached to a node.

Definition at line 54 of file OgreMovableObject.cpp.

References Ogre::MovableObject::mParentIsTagPoint, and Ogre::MovableObject::mParentNode.

Referenced by Ogre::SceneNode::attachObject(), Ogre::Entity::attachObjectImpl(), Ogre::SceneNode::detachAllObjects(), Ogre::SceneNode::detachObject(), and Ogre::SceneNode::~SceneNode().

void Ogre::Light::_notifyCurrentCamera Camera   cam [virtual]
 

Overridden from MovableObject.

Implements Ogre::MovableObject.

Definition at line 247 of file OgreLight.cpp.

void Ogre::Light::_updateRenderQueue RenderQueue   queue [virtual]
 

Overridden from MovableObject.

Implements Ogre::MovableObject.

Definition at line 259 of file OgreLight.cpp.

virtual void Ogre::MovableObject::addQueryFlags unsigned long    flags [virtual, inherited]
 

As setQueryFlags, except the flags passed as parameters are appended to the existing flags on this object.

Definition at line 168 of file OgreMovableObject.h.

Real Ogre::Light::getAttenuationConstant void    const
 

Returns the constant factor in the attenuation formula.

Definition at line 210 of file OgreLight.cpp.

References mAttenuationConst, and Ogre::Real.

Referenced by Ogre::GpuProgramParameters::_updateAutoParamsLightsOnly(), Ogre::D3D9RenderSystem::setD3D9Light(), Ogre::D3DRenderSystem::setD3DLight(), and Ogre::GLRenderSystem::setGLLight().

Real Ogre::Light::getAttenuationLinear void    const
 

Returns the linear factor in the attenuation formula.

Definition at line 215 of file OgreLight.cpp.

References mAttenuationLinear, and Ogre::Real.

Referenced by Ogre::GpuProgramParameters::_updateAutoParamsLightsOnly(), Ogre::D3D9RenderSystem::setD3D9Light(), Ogre::D3DRenderSystem::setD3DLight(), and Ogre::GLRenderSystem::setGLLight().

Real Ogre::Light::getAttenuationQuadric void    const
 

Returns the quadric factor in the attenuation formula.

Definition at line 220 of file OgreLight.cpp.

References mAttenuationQuad, and Ogre::Real.

Referenced by Ogre::GpuProgramParameters::_updateAutoParamsLightsOnly(), Ogre::D3D9RenderSystem::setD3D9Light(), Ogre::D3DRenderSystem::setD3DLight(), and Ogre::GLRenderSystem::setGLLight().

Real Ogre::Light::getAttenuationRange void    const
 

Returns the absolute upper range of the light.

Definition at line 205 of file OgreLight.cpp.

References mRange, and Ogre::Real.

Referenced by Ogre::SceneManager::_populateLightList(), Ogre::GpuProgramParameters::_updateAutoParamsLightsOnly(), Ogre::D3D9RenderSystem::setD3D9Light(), and Ogre::D3DRenderSystem::setD3DLight().

const AxisAlignedBox & Ogre::Light::getBoundingBox void    const [virtual]
 

Overridden from MovableObject.

Implements Ogre::MovableObject.

Definition at line 252 of file OgreLight.cpp.

Real Ogre::Light::getBoundingRadius void    const [virtual]
 

Overridden from MovableObject.

Implements Ogre::MovableObject.

Definition at line 282 of file OgreLight.h.

References Ogre::Real.

const Vector3 & Ogre::Light::getDerivedDirection void    const
 

Retrieves the direction of the light including any transform from nodes it is attached to.

Definition at line 275 of file OgreLight.cpp.

References mDerivedDirection, and update().

Referenced by Ogre::GpuProgramParameters::_updateAutoParamsLightsOnly(), Ogre::D3D9RenderSystem::setD3D9Light(), Ogre::D3DRenderSystem::setD3DLight(), and Ogre::GLRenderSystem::setGLLightPositionDirection().

const Vector3 & Ogre::Light::getDerivedPosition void    const
 

Retrieves the position of the light including any transform from nodes it is attached to.

Definition at line 269 of file OgreLight.cpp.

References mDerivedPosition, and update().

Referenced by Ogre::SceneManager::_populateLightList(), Ogre::GpuProgramParameters::_updateAutoParamsLightsOnly(), Ogre::D3D9RenderSystem::setD3D9Light(), Ogre::D3DRenderSystem::setD3DLight(), and Ogre::GLRenderSystem::setGLLightPositionDirection().

const ColourValue & Ogre::Light::getDiffuseColour void    const
 

Returns the colour of the diffuse light given off by this light source (see setDiffuseColour for more info).

Definition at line 174 of file OgreLight.cpp.

References mDiffuse.

Referenced by Ogre::GpuProgramParameters::_updateAutoParamsLightsOnly(), Ogre::D3D9RenderSystem::setD3D9Light(), Ogre::D3DRenderSystem::setD3DLight(), and Ogre::GLRenderSystem::setGLLight().

const Vector3 & Ogre::Light::getDirection void    const
 

Returns the light's direction.

Remarks:
Applicable only to the spotlight and directional light types.

Definition at line 129 of file OgreLight.cpp.

References mDirection.

const String & Ogre::Light::getMovableType void    const [virtual]
 

Overridden from MovableObject.

Implements Ogre::MovableObject.

Definition at line 264 of file OgreLight.cpp.

References msMovableType.

const String & Ogre::Light::getName void    const [virtual]
 

Returns the name of this light (cannot be modified).

Implements Ogre::MovableObject.

Definition at line 83 of file OgreLight.cpp.

References mName.

Node * Ogre::MovableObject::getParentNode void    const [virtual, inherited]
 

Returns the node to which this object is attached.

Remarks:
An object is not visible in the scene unless attached to a SceneNode.

Attaching an object is done via the SceneNode::attachObject method.

Definition at line 60 of file OgreMovableObject.cpp.

References Ogre::MovableObject::mParentNode.

Referenced by Ogre::TagPoint::_updateFromParent(), Ogre::BspIntersectionSceneQuery::execute(), Ogre::TagPoint::getLights(), Ogre::SubEntity::getLights(), Ogre::SubEntity::getSquaredViewDepth(), Ogre::TagPoint::needUpdate(), and Ogre::BspSceneManager::processVisibleLeaf().

const Vector3 & Ogre::Light::getPosition void    const
 

Returns the position of the light.

Note:
Applicable to point lights and spotlights only.

Definition at line 112 of file OgreLight.cpp.

References mPosition.

virtual unsigned long Ogre::MovableObject::getQueryFlags void    const [virtual, inherited]
 

Returns the query flags relevant for this object.

Definition at line 175 of file OgreMovableObject.h.

Referenced by Ogre::BspIntersectionSceneQuery::execute().

RenderQueueGroupID Ogre::MovableObject::getRenderQueueGroup void    const [virtual, inherited]
 

Gets the queue group for this entity, see setRenderQueueGroup for full details.

Definition at line 87 of file OgreMovableObject.cpp.

References Ogre::MovableObject::mRenderQueueID, and Ogre::RenderQueueGroupID.

const ColourValue & Ogre::Light::getSpecularColour void    const
 

Returns the colour of specular light given off by this light source.

Definition at line 191 of file OgreLight.cpp.

References mSpecular.

Referenced by Ogre::GpuProgramParameters::_updateAutoParamsLightsOnly(), Ogre::D3D9RenderSystem::setD3D9Light(), Ogre::D3DRenderSystem::setD3DLight(), and Ogre::GLRenderSystem::setGLLight().

Real Ogre::Light::getSpotlightFalloff void    const
 

Returns the falloff between the inner and outer cones of the spotlight.

Definition at line 157 of file OgreLight.cpp.

References mSpotFalloff, and Ogre::Real.

Referenced by Ogre::D3D9RenderSystem::setD3D9Light(), and Ogre::D3DRenderSystem::setD3DLight().

Real Ogre::Light::getSpotlightInnerAngle void    const
 

Returns the angle covered by the spotlights inner cone, in degrees.

Definition at line 147 of file OgreLight.cpp.

References mSpotInner, and Ogre::Real.

Referenced by Ogre::D3D9RenderSystem::setD3D9Light(), and Ogre::D3DRenderSystem::setD3DLight().

Real Ogre::Light::getSpotlightOuterAngle void    const
 

Returns the angle covered by the spotlights outer cone, in degrees.

Definition at line 152 of file OgreLight.cpp.

References mSpotOuter, and Ogre::Real.

Referenced by Ogre::D3D9RenderSystem::setD3D9Light(), Ogre::D3DRenderSystem::setD3DLight(), and Ogre::GLRenderSystem::setGLLight().

Light::LightTypes Ogre::Light::getType void    const
 

Returns the light type.

Definition at line 94 of file OgreLight.cpp.

References mLightType.

Referenced by Ogre::SceneManager::_populateLightList(), Ogre::D3D9RenderSystem::setD3D9Light(), Ogre::D3DRenderSystem::setD3DLight(), Ogre::GLRenderSystem::setGLLight(), and Ogre::GLRenderSystem::setGLLightPositionDirection().

virtual UserDefinedObject* Ogre::MovableObject::getUserObject void    [virtual, inherited]
 

Retrieves a pointer to a custom application object associated with this movable by an earlier call to setUserObject.

Definition at line 136 of file OgreMovableObject.h.

const AxisAlignedBox & Ogre::MovableObject::getWorldBoundingBox bool    derive = false const [virtual, inherited]
 

Retrieves the axis-aligned bounding box for this object in world coordinates.

Definition at line 104 of file OgreMovableObject.cpp.

References Ogre::MovableObject::_getParentNodeFullTransform(), Ogre::MovableObject::getBoundingBox(), Ogre::MovableObject::mWorldAABB, and Ogre::AxisAlignedBox::transform().

Referenced by Ogre::BspIntersectionSceneQuery::execute(), and Ogre::BspSceneManager::processVisibleLeaf().

const Sphere & Ogre::MovableObject::getWorldBoundingSphere bool    derive = false const [virtual, inherited]
 

Retrieves the worldspace bounding sphere for this object.

Definition at line 116 of file OgreMovableObject.cpp.

References Ogre::Node::_getDerivedPosition(), Ogre::MovableObject::getBoundingRadius(), Ogre::MovableObject::mParentNode, Ogre::MovableObject::mWorldBoundingSphere, Ogre::Sphere::setCenter(), and Ogre::Sphere::setRadius().

bool Ogre::MovableObject::isAttached void    const [virtual, inherited]
 

Returns true if this object is attached to a SceneNode or TagPoint.

Definition at line 65 of file OgreMovableObject.cpp.

References Ogre::MovableObject::mParentNode.

Referenced by Ogre::Entity::attachObjectToBone().

bool Ogre::MovableObject::isVisible void    const [virtual, inherited]
 

Returns whether or not this object is supposed to be visible or not.

Definition at line 76 of file OgreMovableObject.cpp.

References Ogre::MovableObject::mVisible.

Referenced by Ogre::OctreeNode::_addToRenderQueue(), Ogre::SceneManager::_populateLightList(), and Ogre::BspSceneManager::processVisibleLeaf().

virtual void Ogre::MovableObject::removeQueryFlags unsigned long    flags [virtual, inherited]
 

As setQueryFlags, except the flags passed as parameters are removed from the existing flags on this object.

Definition at line 172 of file OgreMovableObject.h.

void Ogre::Light::setAttenuation Real    range,
Real    constant,
Real    linear,
Real    quadratic
 

Sets the attenuation parameters of the light source ie how it diminishes with distance.

Remarks:
Lights normally get fainter the further they are away. Also, each light is given a maximum range beyond which it cannot affect any objects.

Light attentuation is not applicable to directional lights since they have an infinite range and constant intensity.

This follows a standard attenuation approach - see any good 3D text for the details of what they mean since i don't have room here!

Parameters:
range  The absolute upper range of the light in world units
constant  The constant factor in the attenuation formula: 1.0 means never attenuate, 0.0 is complete attenuation
linear  The linear factor in the attenuation formula: 1 means attenuate evenly over the distance
quadratic  The quadratic factor in the attenuation formula: adds a curvature to the attenuation formula.

Definition at line 196 of file OgreLight.cpp.

References mAttenuationConst, mAttenuationLinear, mAttenuationQuad, mRange, and Ogre::Real.

Referenced by Ogre::AutoParamDataSource::AutoParamDataSource().

void Ogre::Light::setDiffuseColour const ColourValue   colour
 

Sets the colour of the diffuse light given off by this source.

Remarks:
Material objects have ambient, diffuse and specular values which indicate how much of each type of light an object reflects. This value denotes the amount and colour of this type of light the light exudes into the scene. The actual appearance of objects is a combination of the two.

Diffuse light simulates the typical light emenating from light sources and affects the base colour of objects together with ambient light.

Definition at line 169 of file OgreLight.cpp.

References mDiffuse.

void Ogre::Light::setDiffuseColour Real    red,
Real    green,
Real    blue
 

Sets the colour of the diffuse light given off by this source.

Remarks:
Material objects have ambient, diffuse and specular values which indicate how much of each type of light an object reflects. This value denotes the amount and colour of this type of light the light exudes into the scene. The actual appearance of objects is a combination of the two.

Diffuse light simulates the typical light emenating from light sources and affects the base colour of objects together with ambient light.

Definition at line 162 of file OgreLight.cpp.

References Ogre::ColourValue::b, Ogre::ColourValue::g, Ogre::green, mDiffuse, Ogre::ColourValue::r, Ogre::Real, and Ogre::red.

Referenced by Ogre::AutoParamDataSource::AutoParamDataSource().

void Ogre::Light::setDirection const Vector3   vec
 

Sets the direction in which a light points.

Remarks:
Applicable only to the spotlight and directional light types.
Note:
This will be overridden if the light is attached to a SceneNode.

Definition at line 124 of file OgreLight.cpp.

References mDirection.

void Ogre::Light::setDirection Real    x,
Real    y,
Real    z
 

Sets the direction in which a light points.

Remarks:
Applicable only to the spotlight and directional light types.
Note:
This will be overridden if the light is attached to a SceneNode.

Definition at line 117 of file OgreLight.cpp.

References mDirection, Ogre::Real, Ogre::Vector3::x, Ogre::Vector3::y, and Ogre::Vector3::z.

void Ogre::Light::setPosition const Vector3   vec
 

Sets the position of the light.

Remarks:
Applicable to point lights and spotlights only.
Note:
This will be overridden if the light is attached to a SceneNode.

Definition at line 107 of file OgreLight.cpp.

References mPosition.

void Ogre::Light::setPosition Real    x,
Real    y,
Real    z
 

Sets the position of the light.

Remarks:
Applicable to point lights and spotlights only.
Note:
This will be overridden if the light is attached to a SceneNode.

Definition at line 99 of file OgreLight.cpp.

References mPosition, Ogre::Real, Ogre::Vector3::x, Ogre::Vector3::y, and Ogre::Vector3::z.

virtual void Ogre::MovableObject::setQueryFlags unsigned long    flags [virtual, inherited]
 

Sets the query flags for this object.

Remarks:
When performing a scene query, this object will be included or excluded according to flags on the object and flags on the query. This is a bitwise value, so only when a bit on these flags is set, will it be included in a query asking for that flag. The meaning of the bits is application-specific.

Definition at line 164 of file OgreMovableObject.h.

void Ogre::MovableObject::setRenderQueueGroup RenderQueueGroupID    queueID [virtual, inherited]
 

Sets the render queue group this entity will be rendered through.

Remarks:
Render queues are grouped to allow you to more tightly control the ordering of rendered objects. If you do not call this method, all Entity objects default to RENDER_QUEUE_MAIN which is fine for most objects. You may want to alter this if you want this entity to always appear in front of other objects, e.g. for a 3D menu system or such.

See RenderQueue for more details.

Parameters:
queueID  Enumerated value of the queue group to use.

Definition at line 82 of file OgreMovableObject.cpp.

References Ogre::MovableObject::mRenderQueueID, and Ogre::RenderQueueGroupID.

void Ogre::Light::setSpecularColour const ColourValue   colour
 

Sets the colour of the specular light given off by this source.

Remarks:
Material objects have ambient, diffuse and specular values which indicate how much of each type of light an object reflects. This value denotes the amount and colour of this type of light the light exudes into the scene. The actual appearance of objects is a combination of the two.

Specular light affects the appearance of shiny highlights on objects, and is also dependent on the 'shininess' Material value.

Definition at line 186 of file OgreLight.cpp.

References mSpecular.

void Ogre::Light::setSpecularColour Real    red,
Real    green,
Real    blue
 

Sets the colour of the specular light given off by this source.

Remarks:
Material objects have ambient, diffuse and specular values which indicate how much of each type of light an object reflects. This value denotes the amount and colour of this type of light the light exudes into the scene. The actual appearance of objects is a combination of the two.

Specular light affects the appearance of shiny highlights on objects, and is also dependent on the 'shininess' Material value.

Definition at line 179 of file OgreLight.cpp.

References Ogre::ColourValue::b, Ogre::ColourValue::g, Ogre::green, mSpecular, Ogre::ColourValue::r, Ogre::Real, and Ogre::red.

Referenced by Ogre::AutoParamDataSource::AutoParamDataSource().

void Ogre::Light::setSpotlightRange Real    innerAngle,
Real    outerAngle,
Real    falloff = 1.0
 

Sets the range of a spotlight, i.e.

the angle of the inner and outer cones and the rate of falloff between them.

Parameters:
innerAngle  Angle covered by the bright inner cone, in degrees
outerAngle  Angle covered by the outer cone, in degrees
falloff  The rate of falloff between the inner and outer cones. 1.0 means a linear falloff, less means slower falloff, higher means faster falloff.

Definition at line 134 of file OgreLight.cpp.

References Except, LT_SPOTLIGHT, mLightType, mSpotFalloff, mSpotInner, mSpotOuter, and Ogre::Real.

void Ogre::Light::setType LightTypes    type
 

Sets the type of light - see LightTypes for more info.

Definition at line 89 of file OgreLight.cpp.

References mLightType.

virtual void Ogre::MovableObject::setUserObject UserDefinedObject   obj [virtual, inherited]
 

Call this to associate your own custom user object instance with this MovableObject.

Remarks:
By simply making your game / application object a subclass of UserDefinedObject, you can establish a link between an OGRE instance of MovableObject and your own application classes. Call this method to establish the link.

Definition at line 132 of file OgreMovableObject.h.

void Ogre::Light::setVisible bool    visible [virtual]
 

Overridden from MovableObject.

Remarks:
Although lights themselves are not 'visible', setting a light to invisible means it no longer affects the scene.

Reimplemented from Ogre::MovableObject.

Definition at line 281 of file OgreLight.cpp.

void Ogre::Light::update void    const [private]
 

internal method for synchronising with parent node (if any)

Definition at line 225 of file OgreLight.cpp.

References Ogre::Node::_getDerivedOrientation(), Ogre::Node::_getDerivedPosition(), mDerivedDirection, mDerivedPosition, mDirection, mLastParentOrientation, mLastParentPosition, Ogre::MovableObject::mParentNode, and mPosition.

Referenced by getDerivedDirection(), and getDerivedPosition().


Member Data Documentation

Real Ogre::Light::mAttenuationConst [private]
 

Definition at line 301 of file OgreLight.h.

Referenced by getAttenuationConstant(), Light(), and setAttenuation().

Real Ogre::Light::mAttenuationLinear [private]
 

Definition at line 302 of file OgreLight.h.

Referenced by getAttenuationLinear(), Light(), and setAttenuation().

Real Ogre::Light::mAttenuationQuad [private]
 

Definition at line 303 of file OgreLight.h.

Referenced by getAttenuationQuadric(), Light(), and setAttenuation().

Vector3 Ogre::Light::mDerivedDirection [private]
 

Definition at line 306 of file OgreLight.h.

Referenced by getDerivedDirection(), and update().

Vector3 Ogre::Light::mDerivedPosition [private]
 

Definition at line 305 of file OgreLight.h.

Referenced by getDerivedPosition(), and update().

ColourValue Ogre::Light::mDiffuse [private]
 

Definition at line 292 of file OgreLight.h.

Referenced by getDiffuseColour(), Light(), and setDiffuseColour().

Vector3 Ogre::Light::mDirection [private]
 

Definition at line 295 of file OgreLight.h.

Referenced by getDirection(), Light(), setDirection(), and update().

Quaternion Ogre::Light::mLastParentOrientation [private]
 

Stored versions of parent orientation / position.

Definition at line 308 of file OgreLight.h.

Referenced by update().

Vector3 Ogre::Light::mLastParentPosition [private]
 

Definition at line 309 of file OgreLight.h.

Referenced by update().

LightTypes Ogre::Light::mLightType [private]
 

Definition at line 290 of file OgreLight.h.

Referenced by getType(), Light(), setSpotlightRange(), and setType().

String Ogre::Light::mName [private]
 

Definition at line 288 of file OgreLight.h.

Referenced by getName(), and Light().

bool Ogre::MovableObject::mParentIsTagPoint [protected, inherited]
 

Definition at line 48 of file OgreMovableObject.h.

Referenced by Ogre::MovableObject::_notifyAttached(), Ogre::MovableObject::MovableObject(), and Ogre::MovableObject::~MovableObject().

Node* Ogre::MovableObject::mParentNode [protected, inherited]
 

node to which this object is attached

Definition at line 47 of file OgreMovableObject.h.

Referenced by Ogre::MovableObject::_getParentNodeFullTransform(), Ogre::MovableObject::_notifyAttached(), Ogre::Entity::_notifyCurrentCamera(), Ogre::ParticleSystem::_triggerEmitters(), Ogre::ParticleSystem::_updateBounds(), Ogre::BillboardSet::_updateBounds(), Ogre::Camera::Camera(), Ogre::Frustum::Frustum(), Ogre::BillboardSet::genBillboardAxes(), Ogre::Entity::getBoundingBox(), Ogre::Entity::getBoundingRadius(), Ogre::TerrainRenderable::getLights(), Ogre::SimpleRenderable::getLights(), Ogre::BillboardSet::getLights(), Ogre::MovableObject::getParentNode(), Ogre::Frustum::getSquaredViewDepth(), Ogre::BillboardSet::getSquaredViewDepth(), Ogre::MovableObject::getWorldBoundingSphere(), Ogre::TerrainRenderable::getWorldOrientation(), Ogre::SubEntity::getWorldOrientation(), Ogre::SimpleRenderable::getWorldOrientation(), Ogre::ParticleSystem::getWorldOrientation(), Ogre::Frustum::getWorldOrientation(), Ogre::BillboardSet::getWorldOrientation(), Ogre::TerrainRenderable::getWorldPosition(), Ogre::SubEntity::getWorldPosition(), Ogre::SimpleRenderable::getWorldPosition(), Ogre::ParticleSystem::getWorldPosition(), Ogre::Frustum::getWorldPosition(), Ogre::BillboardSet::getWorldPosition(), Ogre::TerrainRenderable::getWorldTransforms(), Ogre::SimpleRenderable::getWorldTransforms(), Ogre::Frustum::getWorldTransforms(), Ogre::MovableObject::isAttached(), Ogre::Frustum::isViewOutOfDate(), Ogre::Camera::isViewOutOfDate(), Light(), Ogre::MovableObject::MovableObject(), Ogre::SimpleRenderable::SimpleRenderable(), update(), and Ogre::MovableObject::~MovableObject().

Vector3 Ogre::Light::mPosition [private]
 

Definition at line 291 of file OgreLight.h.

Referenced by getPosition(), Light(), setPosition(), and update().

unsigned long Ogre::MovableObject::mQueryFlags [protected, inherited]
 

Flags determining whether this object is included / excluded from scene queries.

Definition at line 56 of file OgreMovableObject.h.

Referenced by Ogre::MovableObject::MovableObject().

Real Ogre::Light::mRange [private]
 

Definition at line 300 of file OgreLight.h.

Referenced by getAttenuationRange(), Light(), and setAttenuation().

RenderQueueGroupID Ogre::MovableObject::mRenderQueueID [protected, inherited]
 

The render queue to use when rendering this object.

Definition at line 54 of file OgreMovableObject.h.

Referenced by Ogre::Entity::_updateRenderQueue(), Ogre::BillboardSet::_updateRenderQueue(), Ogre::MovableObject::getRenderQueueGroup(), Ogre::MovableObject::MovableObject(), and Ogre::MovableObject::setRenderQueueGroup().

String Ogre::Light::msMovableType = "Light" [static, private]
 

Shared class-level name for Movable type.

Definition at line 32 of file OgreLight.cpp.

Referenced by getMovableType().

ColourValue Ogre::Light::mSpecular [private]
 

Definition at line 293 of file OgreLight.h.

Referenced by getSpecularColour(), Light(), and setSpecularColour().

Real Ogre::Light::mSpotFalloff [private]
 

Definition at line 299 of file OgreLight.h.

Referenced by getSpotlightFalloff(), Light(), and setSpotlightRange().

Real Ogre::Light::mSpotInner [private]
 

Definition at line 298 of file OgreLight.h.

Referenced by getSpotlightInnerAngle(), Light(), and setSpotlightRange().

Real Ogre::Light::mSpotOuter [private]
 

Definition at line 297 of file OgreLight.h.

Referenced by getSpotlightOuterAngle(), Light(), and setSpotlightRange().

UserDefinedObject* Ogre::MovableObject::mUserObject [protected, inherited]
 

User defined object which is linked to this object.

Definition at line 52 of file OgreMovableObject.h.

Referenced by Ogre::MovableObject::MovableObject().

bool Ogre::MovableObject::mVisible [protected, inherited]
 

Is this object visible?

Definition at line 50 of file OgreMovableObject.h.

Referenced by Ogre::Frustum::Frustum(), Ogre::MovableObject::isVisible(), Ogre::MovableObject::MovableObject(), and Ogre::MovableObject::setVisible().

AxisAlignedBox Ogre::MovableObject::mWorldAABB [protected, inherited]
 

Cached world AABB of this object.

Definition at line 58 of file OgreMovableObject.h.

Referenced by Ogre::MovableObject::getWorldBoundingBox(), and Ogre::MovableObject::MovableObject().

Sphere Ogre::MovableObject::mWorldBoundingSphere [protected, inherited]
 

Definition at line 60 of file OgreMovableObject.h.

Referenced by Ogre::MovableObject::getWorldBoundingSphere().

Real Ogre::Light::tempSquareDist
 

Temp tag used for sorting.

Definition at line 64 of file OgreLight.h.

Referenced by Ogre::SceneManager::_populateLightList(), and Ogre::SceneManager::lightLess::operator()().


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

Copyright © 2002-2003 by The OGRE Team
Last modified Wed Jan 21 00:18:01 2004