Click or drag to resize
Ab4d.SharpEngine logo

PlanarShadowNode Class

PlanarShadowNode is a scene node that generates a planar shadow mesh for a group of 3D models, projecting their shadows onto a specified plane using a configurable light source. The light can be configured by using ApplyDirectionalLight(Vector3, Boolean) or ApplyPointLight(Vector3, Boolean) methods, or by directly setting the shadow matrix with ApplyShadowMatrix(Matrix4x4, Boolean) method.
Inheritance Hierarchy

Namespace: Ab4d.SharpEngine.SceneNodes
Assembly: Ab4d.SharpEngine (in Ab4d.SharpEngine.dll) Version: 4.0.9584+ba1aaa26d4181dd3fa8ed7b6398391d1affa36c8
Syntax
C#
public class PlanarShadowNode : GroupNode

The PlanarShadowNode type exposes the following members.

Constructors
Properties
 NameDescription
Public propertyOriginalGroupNode Gets the GroupNode that was used to create the planar shadow mesh (set when PlanarShadowMeshCreator is created from a GroupNode).
Public propertyPlane Gets the plane that is used for creating the shadow mesh. After changing the plane, you need to call ApplyDirectionalLight(Vector3, Boolean), ApplyPointLight(Vector3, Boolean) or ApplyShadowMatrix(Matrix4x4, Boolean) methods to update the used shadow matrix.
Public propertyShadowMaterial Gets or sets the material that is used for the shadow mesh. By default, this is set to a SolidColorMaterial with DimGray color.
Top
Methods
 NameDescription
Public methodApplyDirectionalLight ApplyDirectionalLight method updates the matrix that is used to flatten all the models to flat shadow models. This method need to be called when the direction of the directional light is changed.
Public methodApplyPointLight ApplyPointLight method updates the matrix that is used to flatten all the models to flat shadow models. This method need to be called when the position of the point light is changed.
Public methodApplyShadowMatrix ApplyShadowMatrix method updates the shadow mesh with the specified shadow matrix.
Protected methodDispose
(Overrides GroupNodeDispose(Boolean))
Protected methodOnInitializeSceneResources
(Overrides GroupNodeOnInitializeSceneResources(Scene, VulkanDevice))
Public methodSetPlane SetPlane method sets the plane for the shadow mesh from the specified PlaneModelNode.
Public methodUpdateGroupNode UpdateGroupNode must be called when the GroupNode that was used to create this PlanarShadowMeshCreator was changed.
Protected methodUpdateLocalBoundingBox
(Overrides GroupNodeUpdateLocalBoundingBox)
Public methodUpdateTransformations UpdateTransformations updates the transformations of all child nodes to use the latest shadow matrix and transformation of the OriginalGroupNode.
Top
Extension Methods
 NameDescription
Public Extension MethodDumpHierarchy Writes the hierarchy of the GroupNode and its children into the Visual Studio Output window.
(Defined by Extensions)
Top
See Also