Class PointLight
Point light emits light from point in all directions.
Inherited Members
Assembly: FlaxEngine.dll
File: Engine/Level/Actors/PointLight.h
Syntax
public class PointLight : public LightWithShadow
Fields
FallOffExponent
Controls the radial falloff of light when UseInverseSquaredFalloff is disabled.
Declaration
public float FallOffExponent = 8.0f
Field Value
float
|
IESBrightnessScale
Global scale for IES brightness contribution
Declaration
public float IESBrightnessScale = 1.0f
Field Value
float
|
IESTexture
IES texture (light profiles from real world measured data)
Declaration
public AssetReference<IESProfile> IESTexture
Field Value
AssetReference<IESProfile>
|
SourceLength
Light source bulb length
Declaration
public float SourceLength = 0.0f
Field Value
float
|
SourceRadius
Light source bulb radius
Declaration
public float SourceRadius = 0.0f
Field Value
float
|
UseIESBrightness
Enable/disable using light brightness from IES profile
Declaration
public bool UseIESBrightness = false
Field Value
bool
|
UseInverseSquaredFalloff
Whether to use physically based inverse squared distance falloff, where Radius is only clamping the light's contribution.
Declaration
public bool UseInverseSquaredFalloff = false
Field Value
bool
|
Methods
ComputeBrightness()
Computes light brightness value.
Declaration
public float ComputeBrightness() const
Returns
float
|
Deserialize(DeserializeStream& stream, ISerializeModifier* modifier)
Deserializes object from the input stream.
Declaration
public virtual void Deserialize(DeserializeStream& stream, ISerializeModifier* modifier) override
Parameters
DeserializeStream
stream
The input stream. |
ISerializeModifier
modifier
The deserialization modifier object. Always valid. |
Overrides
Draw(RenderContext& renderContext)
Draws this actor. Called by Scene Rendering service. This call is more optimized than generic Draw (eg. geometry is rendered during all pass types but other actors are drawn only during GBufferFill pass).
Declaration
public virtual void Draw(RenderContext& renderContext) override
Parameters
RenderContext
renderContext
The rendering context. |
Overrides
DrawLightsDebug(RenderView& view)
Declaration
public virtual void DrawLightsDebug(RenderView& view) override
Parameters
RenderView
view
|
Overrides
GetRadius()
Gets light radius
Declaration
public float GetRadius() const
Returns
float
|
GetScaledRadius()
Gets scaled light radius
Declaration
public float GetScaledRadius() const
Returns
float
|
IntersectsItself(const Ray& ray, Real& distance, Vector3& normal)
Determines if there is an intersection between the current object and a ray.
Declaration
public virtual bool IntersectsItself(const Ray& ray, Real& distance, Vector3& normal) override
Parameters
Ray
ray
The ray to test. |
Real
distance
When the method completes, contains the distance of the intersection (if any valid). |
Vector3
normal
When the method completes, contains the intersection surface normal vector (if any valid). |
Returns
bool
True whether the two objects intersected, otherwise false. |
Overrides
OnDebugDraw()
Draws debug shapes for the actor and all child scripts.
Declaration
public virtual void OnDebugDraw() override
Overrides
OnDebugDrawSelected()
Draws debug shapes for the selected actor and all child scripts.
Declaration
public virtual void OnDebugDrawSelected() override
Overrides
OnLayerChanged()
Called when layer gets changed.
Declaration
public virtual void OnLayerChanged() override
Overrides
OnTransformChanged()
Called when actor transform gets changed.
Declaration
protected virtual void OnTransformChanged() override
Overrides
Serialize(SerializeStream& stream, const void* otherObj)
Serializes object to the output stream compared to the values of the other object instance (eg. default class object). If other object is null then serialize all properties.
Declaration
public virtual void Serialize(SerializeStream& stream, const void* otherObj) override
Parameters
SerializeStream
stream
The output stream. |
void
otherObj
The instance of the object to compare with and serialize only the modified properties. If null, then serialize all properties. |
Overrides
SetRadius(float value)
Sets light radius
Declaration
public void SetRadius(float value)
Parameters
float
value
The new value |