bool isInLightRange(const Ogre::Sphere &sphere) const
Check whether a sphere is included in the lighted area of the light.
void setVisible(bool visible)
static String msMovableType
Shared class-level name for Movable type.
const String & getType(void) const
Get the type of the object to be created.
void setShadowFarDistance(Real distance)
Sets the maximum distance away from the camera that shadows by this light will be visible.
LightTypes
Defines the type of light.
A viewpoint from which the scene will be rendered.
void setShadowNearClipDistance(Real nearClip)
Set the near clip plane distance to be used by the shadow camera, if this light casts texture shadows...
PlaneBoundedVolume mNearClipVolume
Vector4 getAs4DVector(bool cameraRelativeIfSet=false) const
Gets the details of this light as a 4D vector.
bool isInLightRange(const Ogre::AxisAlignedBox &container) const
Check whether a bounding box is included in the lighted area of the light.
void resetCustomShadowCameraSetup(void)
Reset the shadow camera setup to the default.
vector< String >::type StringVector
Real getShadowNearClipDistance() const
Get the near clip plane distance to be used by the shadow camera, if this light casts texture shadows...
Structure recording the use of an automatic parameter.
Representation of a dynamic light source in the scene.
const String & getAnimableDictionaryName(void) const
Get the name of the animable dictionary for this class.
virtual const PlaneBoundedVolume & _getNearClipVolume(const Camera *const cam) const
Internal method for calculating the 'near clip volume', which is the volume formed between the near c...
Real getShadowFarClipDistance() const
Get the far clip plane distance to be used by the shadow camera, if this light casts texture shadows.
Abstract class defining a movable object in a scene.
void setSpotlightRange(const Radian &innerAngle, const Radian &outerAngle, Real falloff=1.0)
Sets the range of a spotlight, i.e.
const Vector3 & getPosition(void) const
Returns the position of the light.
const ShadowCameraSetupPtr & getCustomShadowCameraSetup(void) const
Return a pointer to the custom shadow camera setup (null means use SceneManager global version).
void setDirection(const Vector3 &vec)
Sets the direction in which a light points.
Real _deriveShadowNearClipDistance(const Camera *maincam) const
Derive a shadow camera near distance from either the light, or from the main camera if the light does...
const Vector4 & getCustomParameter(uint16 index) const
Gets the custom value associated with this Light at the given index.
const Vector3 & getDirection(void) const
Returns the light's direction.
Interface definition for a factory class which produces a certain kind of MovableObject,...
CustomParameterMap mCustomParameters
Stores the custom parameters for the light.
Vector3 mDerivedCamRelativePosition
Real getBoundingRadius(void) const
Retrieves the radius of the origin-centered bounding sphere for this object.
const String & getMovableType(void) const
Returns the type name of this object.
map< String, String >::type NameValuePairList
Name / value parameter pair (first = name, second = value)
Vector3 mDerivedDirection
void _updateRenderQueue(RenderQueue *queue)
Internal method by which the movable object must add Renderable subclass instances to the rendering q...
void setSpotlightInnerAngle(const Radian &val)
Sets the angle covered by the spotlights inner cone.
void _calcTempSquareDist(const Vector3 &worldPos)
internal method for calculating current squared distance from some world position
Factory object for creating Light instances.
const Radian & getSpotlightInnerAngle(void) const
Returns the angle covered by the spotlights inner cone.
void setCustomShadowCameraSetup(const ShadowCameraSetupPtr &customShadowSetup)
Set this light to use a custom shadow camera when rendering texture shadows.
Real mShadowFarDistSquared
const AxisAlignedBox & getBoundingBox(void) const
Retrieves the local axis-aligned bounding box for this object.
~Light()
Standard destructor.
void setCustomParameter(uint16 index, const Vector4 &value)
Sets a custom parameter for this Light, which may be used to drive calculations for this specific Ren...
void setSpotlightOuterAngle(const Radian &val)
Sets the angle covered by the spotlights outer cone.
Real getSpotlightNearClipDistance() const
Get the near clip plane distance to be used by spotlights that use light clipping.
Real getAttenuationLinear(void) const
Returns the linear factor in the attenuation formula.
virtual const PlaneBoundedVolumeList & _getFrustumClipVolumes(const Camera *const cam) const
Internal method for calculating the clip volumes outside of the frustum which can be used to determin...
Real getAttenuationConstant(void) const
Returns the constant factor in the attenuation formula.
ShadowCameraSetupPtr mCustomShadowCameraSetup
Pointer to a custom shadow camera setup.
void setShadowFarClipDistance(Real farClip)
Set the far clip plane distance to be used by the shadow camera, if this light casts texture shadows.
const Radian & getSpotlightOuterAngle(void) const
Returns the angle covered by the spotlights outer cone.
void setPowerScale(Real power)
Set a scaling factor to indicate the relative power of a light.
const Vector3 & getDerivedPosition(bool cameraRelativeIfSet=false) const
Retrieves the position of the light including any transform from nodes it is attached to.
Wrapper class which indicates a given angle value is in Radians.
void setDirection(Real x, Real y, Real z)
Sets the direction in which a light points.
const ColourValue & getSpecularColour(void) const
Returns the colour of specular light given off by this light source.
bool mDerivedTransformDirty
Is the derived transform dirty?
void setType(LightTypes type)
Sets the type of light - see LightTypes for more info.
A 3D box aligned with the x/y/z axes.
virtual void _updateCustomGpuParameter(uint16 paramIndex, const GpuProgramParameters::AutoConstantEntry &constantEntry, GpuProgramParameters *params) const
Update a custom GpuProgramParameters constant which is derived from information only this Light knows...
void setPosition(Real x, Real y, Real z)
Sets the position of the light.
Collects together the program parameters used for a GpuProgram.
Real getShadowFarDistanceSquared(void) const
AnimableValuePtr createAnimableValue(const String &valueName)
Create a reference-counted AnimableValuePtr for the named value.
A sphere primitive, mostly used for bounds checking.
MovableObject * createInstanceImpl(const String &name, const NameValuePairList *params)
Internal implementation of create method - must be overridden.
Light()
Default constructor (for Python mainly).
void visitRenderables(Renderable::Visitor *visitor, bool debugRenderables=false)
Method to allow a caller to abstractly iterate over the Renderable instances that this MovableObject ...
Represents a convex volume bounded by planes.
const ColourValue & getDiffuseColour(void) const
Returns the colour of the diffuse light given off by this light source (see setDiffuseColour for more...
Class representing colour.
Real getSpotlightFalloff(void) const
Returns the falloff between the inner and outer cones of the spotlight.
void setSpecularColour(Real red, Real green, Real blue)
Sets the colour of the specular light given off by this source.
map< uint16, Vector4 >::type CustomParameterMap
4-dimensional homogeneous vector.
void setDiffuseColour(const ColourValue &colour)
Sets the colour of the diffuse light given off by this source.
Real getAttenuationRange(void) const
Returns the absolute upper range of the light.
void setDiffuseColour(Real red, Real green, Real blue)
Sets the colour of the diffuse light given off by this source.
Visitor object that can be used to iterate over a collection of Renderable instances abstractly.
void _setCameraRelative(Camera *cam)
Set the camera which this light should be relative to, for camera-relative rendering.
void setPosition(const Vector3 &vec)
Sets the position of the light.
Light(const String &name)
Normal constructor.
void _notifyAttached(Node *parent, bool isTagPoint=false)
Internal method called to notify the object that it has been attached to a node.
void _notifyIndexInFrame(size_t i)
bool mDerivedCamRelativeDirty
void setSpotlightFalloff(Real val)
Sets the falloff between the inner and outer cones of the spotlight.
PlaneBoundedVolumeList mFrustumClipVolumes
uint32 getTypeFlags(void) const
Override to return specific type flag.
Real tempSquareDist
Temp tag used for sorting.
float Real
Software floating point type.
vector< PlaneBoundedVolume >::type PlaneBoundedVolumeList
virtual void update(void) const
Internal method for synchronising with parent node (if any)
const Vector3 & getDerivedDirection(void) const
Retrieves the direction of the light including any transform from nodes it is attached to.
void _notifyMoved(void)
Internal method called to notify the object that it has been moved.
Class representing a general-purpose node an articulated scene graph.
void resetShadowFarDistance(void)
Tells the light to use the shadow far distance of the SceneManager.
Real _deriveShadowFarClipDistance(const Camera *maincam) const
Derive a shadow camera far distance from either the light, or from the main camera if the light doesn...
LightTypes getType(void) const
Returns the light type.
Real getPowerScale(void) const
Set the scaling factor which indicates the relative power of a light.
Standard 3-dimensional vector.
Real getShadowFarDistance(void) const
Gets the maximum distance away from the camera that shadows by this light will be visible.
void destroyInstance(MovableObject *obj)
Destroy an instance of the object.
Real getAttenuationQuadric(void) const
Returns the quadric factor in the attenuation formula.
Class to manage the scene object rendering queue.
size_t _getIndexInFrame() const
Gets the index at which this light is in the current render.
static String FACTORY_TYPE_NAME
void setAttenuation(Real range, Real constant, Real linear, Real quadratic)
Sets the attenuation parameters of the light source i.e.
Camera * mCameraToBeRelativeTo
void setSpotlightNearClipDistance(Real nearClip)
Set the near clip plane distance to be used by spotlights that use light clipping,...
void setSpecularColour(const ColourValue &colour)
Sets the colour of the specular light given off by this source.
void initialiseAnimableDictionary(StringVector &vec) const
Internal method for initialising dictionary; should be implemented by subclasses wanting to expose an...
Copyright © 2012 Torus Knot Software Ltd

This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.