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
trueif [automatic cover complete scene]; otherwise,false.
Bias
public float Bias { get; set; }
Property Value
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
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
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
trueif scene is dynamic; otherwise,false.
LightCamera
Distance of the directional light from origin
public ProjectionCameraCore? LightCamera { get; set; }
Property Value
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
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
coreRenderCoreThe core.
CanHitTest(HitTestContext?)
Determines whether this instance [can hit test] the specified context.
protected override bool CanHitTest(HitTestContext? context)
Parameters
contextHitTestContextThe context.
Returns
- bool
trueif 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
contextRenderContext
Returns
OnAttach(IEffectsManager)
To override Attach routine, please override this.
protected override bool OnAttach(IEffectsManager effectsManager)
Parameters
effectsManagerIEffectsManager
Returns
- bool
Return true if attached
OnCreateRenderCore()
Called when [create render core].
protected override RenderCore OnCreateRenderCore()
Returns
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
contextHitTestContextThe context.
totalModelMatrixMatrix4x4The total model matrix.
hitsList<HitTestResult>The hits.