Class Light
Base class for all light types.
Inherited Members
Assembly: FlaxEngine.dll
File: Engine/Level/Actors/Light.h
Syntax
public class Light : public Actor
Fields
_sceneRenderingKey
Declaration
protected int32 _sceneRenderingKey = -1
Field Value
int32
|
Brightness
Brightness of the light
Declaration
public float Brightness = 3.14f
Field Value
float
|
CastVolumetricShadow
Toggles whether or not to cast a volumetric shadow for lights contributing to Volumetric Fog. Also shadows casting by this light should be enabled in order to make it cast volumetric fog shadow.
Declaration
public bool CastVolumetricShadow = true
Field Value
bool
|
Color
IndirectLightingIntensity
Controls how much this light will contribute indirect lighting. When set to 0, there is no GI from the light. The default value is 1.
Declaration
public float IndirectLightingIntensity = 1.0f
Field Value
float
|
ViewDistance
Controls light visibility range. The distance at which the light becomes completely faded (blend happens on the last 10% of that range). Use a value of 0 to always draw light.
Declaration
public float ViewDistance = 0.0f
Field Value
float
|
VolumetricScatteringIntensity
Controls how much this light will contribute to the Volumetric Fog. When set to 0, there is no contribution.
Declaration
public float VolumetricScatteringIntensity = 1.0f
Field Value
float
|
Methods
AdjustBrightness(const RenderView& view, float& brightness)
Declaration
protected void AdjustBrightness(const RenderView& view, float& brightness) const
Parameters
RenderView
view
|
float
brightness
|
CheckViewDistance(const Float3& viewPosition, const Float3& viewOrigin, Float3& position, float& brightness)
Declaration
protected bool CheckViewDistance(const Float3& viewPosition, const Float3& viewOrigin, Float3& position, float& brightness) const
Parameters
Float3
viewPosition
|
Float3
viewOrigin
|
Float3
position
|
float
brightness
|
Returns
bool
|
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
DrawLightsDebug(RenderView& view)
GetEditorBox()
Gets actor bounding box (single actor, no children included) for editor tools.
Declaration
public virtual BoundingBox GetEditorBox() const override
Returns
BoundingBox
|
Overrides
OnDisable()
Called when actor gets removed from game systems. Occurs on EndPlay event or when actor gets inactivated in hierarchy. Use this event to unregister object from other game system (eg. audio).
Declaration
public virtual void OnDisable() override
Overrides
OnEnable()
Called when actor gets added to game systems. Occurs on BeginPlay event or when actor gets activated in hierarchy. Use this event to register object to other game system (eg. audio).
Declaration
public virtual void OnEnable() 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. |