Table of Contents

Class ShadowMapNode

Namespace
HelixToolkit.SharpDX.Model.Scene
Assembly
HelixToolkit.SharpDX.dll
public class ShadowMapNode : SceneNode, IDisposable, IComparable<SceneNode>, IAnimationNode
Inheritance
ShadowMapNode
Implements
Inherited Members
Extension Methods

Properties

AutoCoverCompleteScene

Gets or sets a value indicating whether shadow map should automatically cover complete scene. Only effective with directional light.

Limitation: Currently unable to properly cover BoneSkinned model animation.

public bool AutoCoverCompleteScene { get; set; }

Property Value

bool

true if [automatic cover complete scene]; otherwise, false.

Bias

public float Bias { get; set; }

Property Value

float

CastSceneScale

Gets or sets the shadow cast scene scale. Only effective if AutoCoverCompleteScene is true.

This is used if the mesh render shadow is much bigger than the meshes casting shadow. The shadow cast camera has to cover the shadow rendering region, otherwise the shadow maybe cut off. Increase the value to increase the shadow cast camera rendering region.

public float CastSceneScale { get; set; }

Property Value

float

Region scale for shadow cast.

Distance

public float Distance { get; set; }

Property Value

float

FarField

Gets or sets the far field.

public float FarField { get; set; }

Property Value

float

The far field.

Intensity

public float Intensity { get; set; }

Property Value

float

IsSceneDynamic

Gets or sets a value indicating whether the scene is dynamic. Only effective if AutoCoverCompleteScene is true.

Setting to true will force shadow map to update the shadow camera for each frame. May impact the performance.

public bool IsSceneDynamic { get; set; }

Property Value

bool

true if scene is dynamic; otherwise, false.

LightCamera

Distance of the directional light from origin

public ProjectionCameraCore? LightCamera { get; set; }

Property Value

ProjectionCameraCore

NearField

Gets or sets the near field.

public float NearField { get; set; }

Property Value

float

The far field.

OrthoWidth

public float OrthoWidth { get; set; }

Property Value

float

Resolution

Gets or sets the resolution.

public Size2 Resolution { get; set; }

Property Value

Size2

The resolution.

Methods

AssignDefaultValuesToCore(RenderCore)

Assigns the default values to core.

protected override void AssignDefaultValuesToCore(RenderCore core)

Parameters

core RenderCore

The core.

CanHitTest(HitTestContext?)

Determines whether this instance [can hit test] the specified context.

protected override bool CanHitTest(HitTestContext? context)

Parameters

context HitTestContext

The context.

Returns

bool

true if this instance [can hit test] the specified context; otherwise, false.

CanRender(RenderContext)

Determine if this can be rendered.

protected override bool CanRender(RenderContext context)

Parameters

context RenderContext

Returns

bool

OnAttach(IEffectsManager)

To override Attach routine, please override this.

protected override bool OnAttach(IEffectsManager effectsManager)

Parameters

effectsManager IEffectsManager

Returns

bool

Return true if attached

OnCreateRenderCore()

Called when [create render core].

protected override RenderCore OnCreateRenderCore()

Returns

RenderCore

OnDetach()

Used to override Detach

protected override void OnDetach()

OnHitTest(HitTestContext?, Matrix4x4, ref List<HitTestResult>)

Called when [hit test].

protected override bool OnHitTest(HitTestContext? context, Matrix4x4 totalModelMatrix, ref List<HitTestResult> hits)

Parameters

context HitTestContext

The context.

totalModelMatrix Matrix4x4

The total model matrix.

hits List<HitTestResult>

The hits.

Returns

bool