OGRE 2.1
Object-Oriented Graphics Rendering Engine
|
Specialized version of Ogre::Light which caches which zones the light affects. More...
#include <OgrePCZLight.h>
Public Types | |
enum | LightTypes { LT_DIRECTIONAL = 0 , LT_POINT = 1 , LT_SPOTLIGHT = 2 , LT_VPL = 3 , MAX_FORWARD_PLUS_LIGHTS = 4 , LT_AREA_APPROX = 4 , LT_AREA_LTC = 5 , NUM_LIGHT_TYPES } |
Defines the type of light. More... | |
typedef FastArray< MovableObject * > | MovableObjectArray |
@See SceneManager::cullFrustum | |
Public Member Functions | |
PCZLight () | |
Default constructor (for Python mainly). | |
PCZLight (const String &name) | |
Normal constructor. | |
~PCZLight () | |
Standard destructor. | |
void | _calcTempSquareDist (const Vector3 &worldPos) |
Internal method for calculating current squared distance from some world position. | |
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't have its own setting. | |
Real | _deriveShadowNearClipDistance (const Camera *maincam) const |
Derive a shadow camera near distance from either the light, or from the main camera if the light doesn't have its own setting. | |
LightList * | _getLightList () |
Returns a pointer to the current list of lights for this object. | |
SceneManager * | _getManager (void) const |
Get the manager of this object, if any (internal use only) | |
ObjectData & | _getObjectData () |
Returns a direct access to the ObjectData state. | |
bool | _getOwnShadowFarDistance (void) const |
const Matrix4 & | _getParentNodeFullTransform (void) const |
Returns the full transformation of the parent sceneNode or the attachingPoint node. | |
virtual void | _notifyAttached (Node *parent) |
Internal method called to notify the object that it has been attached to a node. | |
void | _notifyManager (SceneManager *man) |
Notify the object of it's manager (internal use only) | |
virtual void | _notifyMoved (void) |
MovableObject notified when SceneNode changes. | |
virtual void | _notifyParentNodeMemoryChanged (void) |
@See Node::_callMemoryChangeListeners | |
virtual void | _notifyStaticDirty (void) const |
Called by SceneManager when it is telling we're a static MovableObject being dirty Don't call this directly. | |
virtual void | _releaseManualHardwareResources () |
Notifies the movable object that hardware resources were lost. | |
virtual void | _restoreManualHardwareResources () |
Notifies the movable object that hardware resources should be restored. | |
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. | |
virtual void | _updateRenderQueue (RenderQueue *queue, Camera *camera, const Camera *lodCamera) |
Internal method by which the movable object must add Renderable subclass instances to the rendering queue. | |
void | addQueryFlags (uint32 flags) |
As setQueryFlags, except the flags passed as parameters are appended to the existing flags on this object. | |
void | addVisibilityFlags (uint32 flags) |
As setVisibilityFlags, except the flags passed as parameters are appended to the existing flags on this object. | |
void | addZoneToAffectedZonesList (PCZone *zone) |
Manually add a zone to the zones affected list. | |
bool | affectsVisibleZone (void) |
bool | affectsZone (PCZone *zone) |
Check if a zone is in the list of zones affected by the light. | |
void | clearAffectedZones (void) |
Clear the affectedZonesList. | |
void | clearNeedsUpdate (void) |
Clear update flag. | |
AnimableValuePtr | createAnimableValue (const String &valueName) |
Create a reference-counted AnimableValuePtr for the named value. | |
void | detachFromParent (void) |
Detaches an object from a parent SceneNode if attached. | |
bool | getAffectParentNode (void) const |
const StringVector & | getAnimableValueNames (void) const |
Gets a list of animable value names for this object. | |
Vector4 | getAs4DVector (void) const |
Tells this object whether to be visible or not, if it has a renderable component. | |
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. | |
Real | getAttenuationRange (void) const |
Returns the absolute upper range of the light. | |
RealAsUint | getCachedDistanceToCamera (void) const |
Returns the distance to camera as calculated in @cullFrustum. | |
Real | getCachedDistanceToCameraAsReal (void) const |
Returns the distance to camera as calculated in @cullFrustum. | |
bool | getCastShadows (void) const |
Returns whether shadow casting is enabled for this object. | |
unsigned char | getCurrentMeshLod (void) const |
const Vector4 & | getCustomParameter (uint16 index) const |
Gets the custom value associated with this Light at the given index. | |
Vector3 | getDerivedDirection (void) const |
Retrieves the direction of the light including any transform from nodes it is attached to. | |
Vector3 | getDerivedDirectionUpdated (void) const |
Vector2 | getDerivedRectSize (void) const |
const ColourValue & | getDiffuseColour (void) const |
Returns the colour of the diffuse light given off by this light source (see setDiffuseColour for more info). | |
Vector3 | getDirection (void) const |
Returns the light's direction. | |
bool | getDoubleSided (void) const |
IdType | getId () const |
Get the unique id of this object. | |
uint32 | getLightMask () const |
Get a bitwise mask which will filter the lights affecting this object. | |
Listener * | getListener (void) const |
Gets the current listener for this object. | |
Aabb | getLocalAabb (void) const |
Retrieves the local axis-aligned bounding box for this object. | |
float | getLocalRadius (void) const |
See getLocalAabb and getWorldRadius. | |
const String & | getMovableType (void) const |
Overridden from MovableObject. | |
const String & | getName (void) const |
Returns the name of this object. | |
bool | getNeedsUpdate (void) |
Get status of need for update. this checks all affected zones. | |
Node * | getParentNode (void) const |
Returns the node to which this object is attached. | |
SceneNode * | getParentSceneNode (void) const |
Real | getPowerScale (void) const |
Set the scaling factor which indicates the relative power of a light. | |
uint32 | getQueryFlags (void) const |
Returns the query flags relevant for this object. | |
const Vector2 & | getRectSize (void) const |
Real | getRenderingDistance (void) const |
Gets the distance at which batches are no longer rendered. | |
Real | getRenderingMinPixelSize () const |
Returns the minimum pixel size an object needs to be in both screen axes in order to be rendered. | |
uint8 | getRenderQueueGroup (void) const |
Gets the queue group for this entity, see setRenderQueueGroup for full details. | |
Real | getShadowFarClipDistance () const |
Get the far clip plane distance to be used by the shadow camera, if this light casts texture shadows. | |
Real | getShadowFarDistance (void) const |
Gets the maximum distance away from the camera that shadows by this light will be visible. | |
Real | getShadowFarDistanceSquared (void) const |
Real | getShadowNearClipDistance () const |
Get the near clip plane distance to be used by the shadow camera, if this light casts texture shadows. | |
Real | getShadowRenderingDistance (void) const |
Gets the distance at which batches are no longer casting shadows. | |
SkeletonInstance * | getSkeletonInstance (void) const |
const ColourValue & | getSpecularColour (void) const |
Returns the colour of specular light given off by this light source. | |
Real | getSpotlightFalloff (void) const |
Returns the falloff between the inner and outer cones of the spotlight. | |
const Radian & | getSpotlightInnerAngle (void) const |
Returns the angle covered by the spotlights inner cone. | |
Real | getSpotlightNearClipDistance () const |
Get the near clip plane distance to be used by spotlights that use light clipping. | |
const Radian & | getSpotlightOuterAngle (void) const |
Returns the angle covered by the spotlights outer cone. | |
Real | getSpotlightTanHalfAngle (void) const |
LightTypes | getType (void) const |
Returns the light type. | |
UserObjectBindings & | getUserObjectBindings () |
Return an instance of user objects binding associated with this class. | |
const UserObjectBindings & | getUserObjectBindings () const |
Return an instance of user objects binding associated with this class. | |
uint32 | getVisibilityFlags (void) const |
Returns the visibility flags relevant for this object. | |
bool | getVisible (void) const |
Gets this object whether to be visible or not, if it has a renderable component. | |
Aabb | getWorldAabb () const |
Gets the axis aligned box in world space. | |
Aabb | getWorldAabbUpdated () |
Gets the axis aligned box in world space. | |
float | getWorldRadius () const |
Gets the bounding Radius scaled by max( scale.x, scale.y, scale.z ). | |
float | getWorldRadiusUpdated () |
Gets the bounding Radius scaled by max( scale.x, scale.y, scale.z ). | |
virtual void | instanceBatchCullFrustumThreaded (const Frustum *frustum, const Camera *lodCamera, uint32 combinedVisibilityFlags) |
@See InstancingTheadedCullingMethod, | |
bool | isAttached (void) const |
Returns true if this object is attached to a Node. | |
bool | isStatic () const |
Checks whether this MovableObject is static. @See setStatic. | |
bool | isVisible (void) const |
Returns whether or not this object is supposed to be visible or not. | |
void | operator delete (void *ptr) |
void | operator delete (void *ptr, const char *, int, const char *) |
void | operator delete (void *ptr, void *) |
void | operator delete[] (void *ptr) |
void | operator delete[] (void *ptr, const char *, int, const char *) |
void * | operator new (size_t sz) |
void * | operator new (size_t sz, const char *file, int line, const char *func) |
operator new, with debug line info | |
void * | operator new (size_t sz, void *ptr) |
placement operator new | |
void * | operator new[] (size_t sz) |
void * | operator new[] (size_t sz, const char *file, int line, const char *func) |
array operator new, with debug line info | |
bool | operator() (const IdObject &left, const IdObject &right) |
bool | operator() (const IdObject *left, const IdObject *right) |
const LightList & | queryLights (void) const |
Gets a list of lights, ordered relative to how close they are to this movable object. | |
void | removeQueryFlags (uint32 flags) |
As setQueryFlags, except the flags passed as parameters are removed from the existing flags on this object. | |
void | removeVisibilityFlags (uint32 flags) |
As setVisibilityFlags, except the flags passed as parameters are removed from the existing flags on this object. | |
void | removeZoneFromAffectedZonesList (PCZone *zone) |
Manually remove a zone from the affected list. | |
void | resetShadowFarDistance (void) |
Tells the light to use the shadow far distance of the SceneManager. | |
void | setAffectParentNode (bool bAffect) |
A Light must always have a Node attached to it. | |
void | setAffectsVisibleZone (bool affects) |
Marks a light as affecting a visible zone. | |
void | setAttenuation (Real range, Real constant, Real linear, Real quadratic) |
Sets the attenuation parameters of the light source i.e. | |
void | setAttenuationBasedOnRadius (Real radius, Real lumThreshold) |
Sets the attenuation parameters (range, constant, linear & quadratic,. | |
void | setCastShadows (bool enabled) |
Sets whether or not this object will cast shadows. | |
void | setCustomParameter (uint16 index, const Vector4 &value) |
Sets a custom parameter for this Light, which may be used to drive calculations for this specific Renderable, like GPU program parameters. | |
void | setDiffuseColour (const ColourValue &colour) |
Sets the colour of the diffuse light given off by this source. | |
void | setDiffuseColour (Real red, Real green, Real blue) |
Sets the colour of the diffuse light given off by this source. | |
void | setDirection (const Vector3 &vec) |
Sets the direction in which a light points. | |
void | setDoubleSided (bool bDoubleSided) |
For area lights and custom 2d shapes, specifies whether the light lits in both directions (positive & negative sides of the plane) or if only towards one. | |
void | setLightMask (uint32 lightMask) |
Set a bitwise mask which will filter the lights affecting this object. | |
void | setListener (Listener *listener) |
Sets a listener for this object. | |
void | setLocalAabb (const Aabb box) |
Sets the local axis-aligned bounding box for this object. | |
void | setName (const String &name) |
Sets a custom name for this node. | |
void | setPowerScale (Real power) |
Set a scaling factor to indicate the relative power of a light. | |
void | setQueryFlags (uint32 flags) |
Sets the query flags for this object. | |
void | setRectSize (Vector2 rectSize) |
For custom 2D shape and area lights, sets the dimensions of the rectangle, in half size. | |
void | setRenderingDistance (Real dist) |
Sets the distance at which the object is no longer rendered. | |
void | setRenderingMinPixelSize (Real pixelSize) |
Sets the minimum pixel size an object needs to be in both screen axes in order to be rendered. | |
virtual void | setRenderQueueGroup (uint8 queueID) |
Overload to avoid it. Light::setType uses the RenderQueue ID to classify lights per type. | |
void | setShadowFarClipDistance (Real farClip) |
Set the far clip plane distance to be used by the shadow camera, if this light casts texture shadows. | |
void | setShadowFarDistance (Real distance) |
Sets the maximum distance away from the camera that shadows by this light will be visible. | |
void | setShadowNearClipDistance (Real nearClip) |
Set the near clip plane distance to be used by the shadow camera, if this light casts texture shadows. | |
void | setShadowRenderingDistance (Real dist) |
Sets the distance at which the object is no longer casting shadows. | |
void | setSpecularColour (const ColourValue &colour) |
Sets the colour of the specular light given off by this source. | |
void | setSpecularColour (Real red, Real green, Real blue) |
Sets the colour of the specular light given off by this source. | |
void | setSpotlightFalloff (Real val) |
Sets the falloff between the inner and outer cones of the spotlight. | |
void | setSpotlightInnerAngle (const Radian &val) |
Sets the angle covered by the spotlights inner cone. | |
void | setSpotlightNearClipDistance (Real nearClip) |
Set the near clip plane distance to be used by spotlights that use light clipping, allowing you to render spots as if they start from further down their frustum. | |
void | setSpotlightOuterAngle (const Radian &val) |
Sets the angle covered by the spotlights outer cone. | |
void | setSpotlightRange (const Radian &innerAngle, const Radian &outerAngle, Real falloff=1.0) |
Sets the range of a spotlight, i.e. | |
bool | setStatic (bool bStatic) |
Turns this Node into static or dynamic. | |
void | setTexture (const TexturePtr &texture, uint16 sliceIdx) |
Sets a textured for types of light that support it. | |
void | setType (LightTypes type) |
Sets the type of light - see LightTypes for more info. | |
void | setVisibilityFlags (uint32 flags) |
Sets the visibility flags for this object. | |
void | setVisible (bool visible) |
Tells this object whether to be visible or not, if it has a renderable component. | |
void | updateZones (PCZone *defaultZone, unsigned long frameCount) |
Update the list of zones the light affects. | |
Public Attributes | |
size_t | mGlobalIndex |
Index in the vector holding this MO reference (could be our parent node, or a global array tracking all movable objecst to avoid memory leaks). | |
size_t | mParentIndex |
Index in the vector holding this MO reference (could be our parent node, or a global array tracking all movable objecst to avoid memory leaks). | |
RenderableArray | mRenderables |
uint16 | mTexLightMaskDiffuseMipStart |
Control the start of mip level for diffuse component for area lights The value is UNORM, thus the range [0; 65535] maps to [0; 1] where 1.0 means to use the highest mip level, and 0 the lowest mip. | |
uint16 | mTextureLightMaskIdx |
Real | tempSquareDist |
Temp tag used for sorting. | |
Static Public Attributes | |
static const FastArray< Real > | c_DefaultLodMesh |
Specialized version of Ogre::Light which caches which zones the light affects.
@See SceneManager::cullFrustum
frustum | Frustum to clip against |
sceneVisibilityFlags | Combined scene's visibility flags (i.e. viewport | scene). Set LAYER_SHADOW_CASTER bit if you want to exclude non-shadow casters. |
outCulledObjects | Out. List of objects that are (fully or partially) inside the frustum and should be rendered |
lodCamera | Camera in which lod levels calculations are based (i.e. during shadow pass renders) Note however, we only use this camera to calulate if should be visible according to mUpperDistance |
|
inherited |
Defines the type of light.
Ogre::PCZLight::PCZLight | ( | ) |
Default constructor (for Python mainly).
Normal constructor.
Should not be called directly, but rather the SceneManager::createLight method should be used.
Ogre::PCZLight::~PCZLight | ( | ) |
Standard destructor.
Internal method for calculating current squared distance from some world position.
Derive a shadow camera far distance from either the light, or from the main camera if the light doesn't have its own setting.
Derive a shadow camera near distance from either the light, or from the main camera if the light doesn't have its own setting.
|
inlineinherited |
Returns a pointer to the current list of lights for this object.
|
inlineinherited |
Get the manager of this object, if any (internal use only)
|
inlineinherited |
Returns a direct access to the ObjectData state.
Returns the full transformation of the parent sceneNode or the attachingPoint node.
Internal method called to notify the object that it has been attached to a node.
Reimplemented in Ogre::v1::Entity, Ogre::v1::InstancedEntity, and Ogre::ParticleSystem.
|
inlineinherited |
Notify the object of it's manager (internal use only)
MovableObject notified when SceneNode changes.
@See Node::_callMemoryChangeListeners
Reimplemented in Ogre::v1::InstancedEntity, and Ogre::Item.
Called by SceneManager when it is telling we're a static MovableObject being dirty Don't call this directly.
Reimplemented in Ogre::v1::InstancedEntity.
Notifies the movable object that hardware resources were lost.
Reimplemented in Ogre::v1::BillboardSet, and Ogre::v1::ManualObject.
Notifies the movable object that hardware resources should be restored.
|
virtualinherited |
Update a custom GpuProgramParameters constant which is derived from information only this Light knows.
paramIndex | The index of the constant being updated |
constantEntry | The auto constant entry from the program parameters |
params | The parameters object which this method should call to set the updated parameters. |
|
inlinevirtualinherited |
Internal method by which the movable object must add Renderable subclass instances to the rendering queue.
Reimplemented from Ogre::MovableObject.
As setQueryFlags, except the flags passed as parameters are appended to the existing flags on this object.
As setVisibilityFlags, except the flags passed as parameters are appended to the existing flags on this object.
Manually add a zone to the zones affected list.
Check if a zone is in the list of zones affected by the light.
|
staticinherited |
@See SceneManager::buildLightList
globalLightList | List of lights already culled against all possible frustums and reorganized contiguously for SoA |
|
staticinherited |
|
virtualinherited |
Create a reference-counted AnimableValuePtr for the named value.
Reimplemented from Ogre::AnimableObject.
|
staticinherited |
|
staticinherited |
@See SceneManager::cullLights &
outGlobalLightList | Output, a list of lights, contiguously placed |
frustums | An array of all frustums we need to check against |
cubemapFrustums | An array of all frustums that are used at least once as cubemaps (@See SceneManager::createCamera) |
Detaches an object from a parent SceneNode if attached.
|
inlineinherited |
Gets a list of animable value names for this object.
References Ogre::Exception::ERR_ITEM_NOT_FOUND, and OGRE_EXCEPT.
Tells this object whether to be visible or not, if it has a renderable component.
Returns the constant factor in the attenuation formula.
Returns the linear factor in the attenuation formula.
Returns the quadric factor in the attenuation formula.
Returns the absolute upper range of the light.
|
inlineinherited |
Returns the distance to camera as calculated in @cullFrustum.
Returns the distance to camera as calculated in @cullFrustum.
Returns whether shadow casting is enabled for this object.
Gets the custom value associated with this Light at the given index.
index | Index of the parameter to retrieve |
Get the default query flags for all future MovableObject instances.
Get the default visibility flags for all future MovableObject instances.
Retrieves the direction of the light including any transform from nodes it is attached to.
|
inlineinherited |
Returns the colour of the diffuse light given off by this light source (see setDiffuseColour for more info).
Returns the light's direction.
|
inlineinherited |
Get the unique id of this object.
|
inlineinherited |
Get a bitwise mask which will filter the lights affecting this object.
Gets the current listener for this object.
Retrieves the local axis-aligned bounding box for this object.
See getLocalAabb and getWorldRadius.
Overridden from MovableObject.
Reimplemented from Ogre::Light.
Returns the name of this object.
Get status of need for update. this checks all affected zones.
Returns the node to which this object is attached.
Set the scaling factor which indicates the relative power of a light.
Returns the query flags relevant for this object.
Gets the distance at which batches are no longer rendered.
|
inlineinherited |
Returns the minimum pixel size an object needs to be in both screen axes in order to be rendered.
Gets the queue group for this entity, see setRenderQueueGroup for full details.
|
inlineinherited |
Get the far clip plane distance to be used by the shadow camera, if this light casts texture shadows.
Gets the maximum distance away from the camera that shadows by this light will be visible.
|
inlineinherited |
Get the near clip plane distance to be used by the shadow camera, if this light casts texture shadows.
Gets the distance at which batches are no longer casting shadows.
|
inlineinherited |
|
inlineinherited |
Returns the colour of specular light given off by this light source.
Returns the falloff between the inner and outer cones of the spotlight.
Returns the angle covered by the spotlights inner cone.
|
inlineinherited |
Get the near clip plane distance to be used by spotlights that use light clipping.
Returns the angle covered by the spotlights outer cone.
|
inlineinherited |
Returns the light type.
|
inlineinherited |
Return an instance of user objects binding associated with this class.
You can use it to associate one or more custom objects with this class instance.
|
inlineinherited |
Return an instance of user objects binding associated with this class.
You can use it to associate one or more custom objects with this class instance.
Returns the visibility flags relevant for this object.
Reserved visibility flags are not returned.
Gets this object whether to be visible or not, if it has a renderable component.
|
inherited |
Gets the axis aligned box in world space.
|
inherited |
Gets the axis aligned box in world space.
|
inherited |
Gets the bounding Radius scaled by max( scale.x, scale.y, scale.z ).
|
inherited |
Gets the bounding Radius scaled by max( scale.x, scale.y, scale.z ).
|
inlinevirtualinherited |
@See InstancingTheadedCullingMethod,
Returns true if this object is attached to a Node.
|
inherited |
Checks whether this MovableObject is static. @See setStatic.
Returns whether or not this object is supposed to be visible or not.
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
operator new, with debug line info
placement operator new
|
inlineinherited |
|
inlineinherited |
array operator new, with debug line info
Gets a list of lights, ordered relative to how close they are to this movable object.
As setQueryFlags, except the flags passed as parameters are removed from the existing flags on this object.
As setVisibilityFlags, except the flags passed as parameters are removed from the existing flags on this object.
Manually remove a zone from the affected list.
Tells the light to use the shadow far distance of the SceneManager.
A Light must always have a Node attached to it.
The direction is taken from the node's orientation, and thus setDirection modifies the attached node directly.
bAffect | When true, the scene node is affected and modified by changes to range and falloff. |
Marks a light as affecting a visible zone.
|
inherited |
Sets the attenuation parameters of the light source i.e.
how it diminishes with distance.
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. |
Sets the attenuation parameters (range, constant, linear & quadratic,.
(distance / radius)² * 0.5 + 0.5
The original formula never ends, that is the range is infinity. This function calculates a range based on "lumThreshold": When the luminosity past certain distance is below the established threshold, the light calculations are cut.
radius | The radius of the light. i.e. A light bulb is a couple centimeters, the sun is ~696km; but be sure to be consistent in the unit of measurement you use (i.e. don't use km if your default unit is in meters). Note: Having a radius = 2 means that at distance = 2 the pixel is lit 100% Anything inside that radius (which is supposedly impossible) will have more than 100% light power. |
lumThreshold | Value in the range [0; 1) Sets range at which the luminance (in percentage) of a point would go below the threshold. For example lumThreshold = 0 means the attenuation range is infinity; lumThreshold = 1 means the range is set to 0. |
Sets whether or not this object will cast shadows.
Sets a custom parameter for this Light, which may be used to drive calculations for this specific Renderable, like GPU program parameters.
index | The index with which to associate the value. Note that this does not have to start at 0, and can include gaps. It also has no direct correlation with a GPU program parameter index - the mapping between the two is performed by the ACT_LIGHT_CUSTOM entry, if that is used. |
value | The value to associate. |
Set the default query flags for all future MovableObject instances.
Set the default visibility flags for all future MovableObject instances.
|
inlineinherited |
Sets the colour of the diffuse light given off by this source.
Sets the colour of the diffuse light given off by this source.
Sets the direction in which a light points.
For area lights and custom 2d shapes, specifies whether the light lits in both directions (positive & negative sides of the plane) or if only towards one.
bDoubleSided | True to enable. Default: false. |
Set a bitwise mask which will filter the lights affecting this object.
Sets a listener for this object.
Sets the local axis-aligned bounding box for this object.
Sets a custom name for this node.
Doesn't have to be unique
Set a scaling factor to indicate the relative power of a light.
power | The power rating of this light, default is 1.0. |
Sets the query flags for this object.
For custom 2D shape and area lights, sets the dimensions of the rectangle, in half size.
halfSize |
Sets the distance at which the object is no longer rendered.
dist | Distance beyond which the object will not be rendered (the default is FLT_MAX, which means objects are always rendered). Values equal or below zero will be ignored, and cause an assertion in debug mode. |
Sets the minimum pixel size an object needs to be in both screen axes in order to be rendered.
pixelSize | Number of minimum pixels (the default is 0, which means objects are always rendered). |
Overload to avoid it. Light::setType uses the RenderQueue ID to classify lights per type.
Reimplemented from Ogre::MovableObject.
Set the far clip plane distance to be used by the shadow camera, if this light casts texture shadows.
farClip | The distance, or -1 to use the main camera setting. |
Sets the maximum distance away from the camera that shadows by this light will be visible.
Set the near clip plane distance to be used by the shadow camera, if this light casts texture shadows.
nearClip | The distance, or -1 to use the main camera setting. |
Sets the distance at which the object is no longer casting shadows.
dist | Distance beyond which the object will not cast shadows (the default is FLT_MAX, which means objects are always casting shadows). Values equal or below zero will be ignored, and cause an assertion in debug mode. |
|
inlineinherited |
Sets the colour of the specular light given off by this source.
Sets the colour of the specular light given off by this source.
Sets the falloff between the inner and outer cones of the spotlight.
Sets the angle covered by the spotlights inner cone.
Set the near clip plane distance to be used by spotlights that use light clipping, allowing you to render spots as if they start from further down their frustum.
nearClip | The near distance. |
Sets the angle covered by the spotlights outer cone.
|
inherited |
Sets the range of a spotlight, i.e.
the angle of the inner and outer cones and the rate of falloff between them.
innerAngle | Angle covered by the bright inner cone |
outerAngle | Angle covered by the outer cone |
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. |
Turns this Node into static or dynamic.
|
inherited |
Sets a textured for types of light that support it.
At the time of writing only LT_AREA_APPROX supports it.
texture | Texture. Can be monochrome or coloured. Must be a 2D Array texture. |
sliceIdx | Slice to the texture. |
|
inherited |
Sets the type of light - see LightTypes for more info.
Sets the visibility flags for this object.
Tells this object whether to be visible or not, if it has a renderable component.
|
staticinherited |
@See SceneManager::updateAllBounds
Update the list of zones the light affects.
|
inherited |
Index in the vector holding this MO reference (could be our parent node, or a global array tracking all movable objecst to avoid memory leaks).
Used for O(1) removals.
|
inherited |
Index in the vector holding this MO reference (could be our parent node, or a global array tracking all movable objecst to avoid memory leaks).
Used for O(1) removals.
|
inherited |
|
inherited |
Control the start of mip level for diffuse component for area lights The value is UNORM, thus the range [0; 65535] maps to [0; 1] where 1.0 means to use the highest mip level, and 0 the lowest mip.
|
inherited |
|
inherited |
Temp tag used for sorting.