Class EnvironmentProbe
Environment Probe can capture space around the objects to provide reflections.
Inherited Members
Assembly: FlaxEngine.dll
File: Engine/Level/Actors/EnvironmentProbe.h
Syntax
public class EnvironmentProbe : public Actor
Constructors
~EnvironmentProbe()
Declaration
public ~EnvironmentProbe()
Fields
Brightness
The reflections brightness.
Declaration
public float Brightness = 1.0f
Field Value
float
|
CaptureNearPlane
The probe capture camera near plane distance.
Declaration
public float CaptureNearPlane = 10.0f
Field Value
float
|
CubemapResolution
The reflections texture resolution.
Declaration
public ProbeCubemapResolution CubemapResolution = ProbeCubemapResolution::UseGraphicsSettings
Field Value
ProbeCubemapResolution
|
UpdateMode
The probe update mode.
Declaration
public ProbeUpdateMode UpdateMode = ProbeUpdateMode::Manual
Field Value
ProbeUpdateMode
|
Methods
Bake(float timeout = 0)
Bakes that probe. It won't be performed now but on async graphics rendering task.
Declaration
public void Bake(float timeout = 0)
Parameters
float
timeout
The timeout in seconds left to bake it (aka startup time). |
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
GetCustomProbe()
Gets the custom probe (null if using baked one or none).
Declaration
public CubeTexture* GetCustomProbe() const
Returns
CubeTexture
|
GetEditorBox()
Gets actor bounding box (single actor, no children included) for editor tools.
Declaration
public virtual BoundingBox GetEditorBox() const override
Returns
BoundingBox
|
Overrides
GetProbe()
Gets the probe texture used during rendering (baked or custom one).
Declaration
public GPUTexture* GetProbe() const
Returns
GPUTexture
|
GetRadius()
Gets the probe radius.
Declaration
public float GetRadius() const
Returns
float
|
GetScaledRadius()
Gets probe scaled radius.
Declaration
public float GetScaledRadius() const
Returns
float
|
HasContentLoaded()
Returns true if actor has loaded content.
Declaration
public virtual bool HasContentLoaded() const override
Returns
bool
|
Overrides
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
IsUsingCustomProbe()
True if probe is using custom cube texture (not baked).
Declaration
public bool IsUsingCustomProbe() const
Returns
bool
|
OnDebugDrawSelected()
Draws debug shapes for the selected actor and all child scripts.
Declaration
public virtual void OnDebugDrawSelected() override
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
protected 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
protected virtual void OnEnable() 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
SetCustomProbe(CubeTexture* probe)
Sets the custom probe (null to disable that feature).
Declaration
public void SetCustomProbe(CubeTexture* probe)
Parameters
CubeTexture
probe
Probe cube texture asset to use |
SetProbeData(GPUContext* context, GPUTexture* data)
Action fired when probe has been baked. Copies data to the texture memory (GPU-only for real-time probes).
Declaration
public void SetProbeData(GPUContext* context, GPUTexture* data)
Parameters
GPUContext
context
The GPU context to use for probe data copying. |
GPUTexture
data
The new probe data (GPU texture). |
SetProbeData(TextureData& data)
Action fired when probe has been baked. Imports data to the texture asset (virtual if running in game).
Declaration
public void SetProbeData(TextureData& data)
Parameters
TextureData
data
The new probe data. |
SetRadius(float value)
Sets the probe radius.
Declaration
public void SetRadius(float value)
Parameters
float
value
|