Class ReflectionProbeGenerator
A reflection probe generator. Receives a texture cube as a framebuffer target.
Inheritance
Implements
Inherited Members
Namespace: Evergine.Framework.Graphics
Assembly: Evergine.Framework.dll
Syntax
public class ReflectionProbeGenerator : Camera3D, IDependencyObject
Fields
reflectionTexture
The reflection probe's texture.
Declaration
protected Texture reflectionTexture
Field Value
Type | Description |
---|---|
Texture |
Properties
CameraShouldRender
Gets a value indicating whether this camera should be rendered.
Declaration
public override bool CameraShouldRender { get; }
Property Value
Type | Description |
---|---|
bool |
Overrides
FarPlane
Gets or sets the far plane.
Declaration
public override float FarPlane { get; set; }
Property Value
Type | Description |
---|---|
float | The far plane. |
Overrides
HDREnabled
Gets or sets a value indicating whether this reflection probe uses an HDR texture.
Declaration
public override bool HDREnabled { get; set; }
Property Value
Type | Description |
---|---|
bool |
Overrides
NearPlane
Gets or sets the near plane.
Declaration
public override float NearPlane { get; set; }
Property Value
Type | Description |
---|---|
float | The near plane. |
Overrides
ProbeSize
Gets or sets the size of the cubemap.
Declaration
public PowerOfTwoSize ProbeSize { get; set; }
Property Value
Type | Description |
---|---|
PowerOfTwoSize |
ReflectionProbe
Gets the reflection probe.
Declaration
public ReflectionProbe ReflectionProbe { get; }
Property Value
Type | Description |
---|---|
ReflectionProbe |
ReflectionTexture
Gets the reflection probe texture.
Declaration
public Texture ReflectionTexture { get; }
Property Value
Type | Description |
---|---|
Texture |
UpdateStrategy
Gets or sets the update strategy.
Declaration
public ReflectionProbeUpdateStrategy UpdateStrategy { get; set; }
Property Value
Type | Description |
---|---|
ReflectionProbeUpdateStrategy |
Methods
FireOnReflectionProbeUpdated()
Fires the OnReflectionProbeUpdated event.
Declaration
protected void FireOnReflectionProbeUpdated()
OnActivated()
Invoked when the object is activated once it is attached.
Declaration
protected override void OnActivated()
Overrides
OnAttached()
Attaches the camera to the system.
Declaration
protected override bool OnAttached()
Returns
Type | Description |
---|---|
bool | True if everything is OK. |
Overrides
OnDeactivated()
Invoked when the object is deactivated.
Declaration
protected override void OnDeactivated()
Overrides
OnDetach()
Detaches the camera from the system.
Declaration
protected override void OnDetach()
Overrides
OnLoaded()
Invoked when the object is loaded.
Declaration
protected override void OnLoaded()
Overrides
OnPositionChanged()
The transform position has been changed.
Declaration
protected override void OnPositionChanged()
Overrides
RenderNextFrame()
Forces the rendering of the next frame.
Declaration
public void RenderNextFrame()
UpdateReflectionProbeAsync()
Enqueues the order to update the reflection probe and returns an awaitable task that will be completed when the probe has been updated.
Declaration
public Task<ReflectionProbe> UpdateReflectionProbeAsync()
Returns
Type | Description |
---|---|
Task<ReflectionProbe> | An awaitable task with the reflection probe updated. |
UpdateReflectionProbeAsync(CancellationToken)
Enqueues the order to update the reflection probe and returns an awaitable task that will be completed when the probe has been updated.
Declaration
public Task<ReflectionProbe> UpdateReflectionProbeAsync(CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
CancellationToken | cancellationToken | The cancellation token for the awaitable task. |
Returns
Type | Description |
---|---|
Task<ReflectionProbe> | An awaitable task with the reflection probe updated. |
Events
OnReflectionProbeUpdated
Event fired when the reflection probe is updated.
Declaration
public event EventHandler<ReflectionProbe> OnReflectionProbeUpdated
Event Type
Type | Description |
---|---|
EventHandler<ReflectionProbe> |