Class GeometryNode
- Namespace
- HelixToolkit.SharpDX.Model.Scene
- Assembly
- HelixToolkit.SharpDX.dll
public abstract class GeometryNode : SceneNode, IDisposable, IComparable<SceneNode>, IAnimationNode, IHitable, IThrowingShadow, IInstancing, IBoundable, IApplyPostEffect
- Inheritance
-
GeometryNode
- Implements
- Derived
- Inherited Members
- Extension Methods
Constructors
GeometryNode()
Initializes a new instance of the GeometryNode class.
public GeometryNode()
Fields
BoundManager
Gets or sets the bound manager.
public readonly GeometryBoundManager BoundManager
Field Value
- GeometryBoundManager
The bound manager.
OnCreateRasterState
Create raster state description delegate.
If OnCreateRasterState is set, then CreateRasterState() will not be called.
public GeometryNode.CreateRasterStateFunc? OnCreateRasterState
Field Value
reuseVertexArrayBuffer
The reuse vertex array buffer
protected bool reuseVertexArrayBuffer
Field Value
Properties
Bounds
Gets the bounds. Usually same as OriginalBounds. If have instances, the bound will enclose all instances.
public override sealed BoundingBox Bounds { get; }
Property Value
- BoundingBox
The bounds.
BoundsSphere
Gets the bounds sphere. Usually same as OriginalBoundsSphere. If have instances, the bound sphere will enclose all instances.
public override BoundingSphere BoundsSphere { get; }
Property Value
- BoundingSphere
The bounds sphere.
BoundsSphereWithTransform
Gets the bounds sphere with transform. If have transform, the bound is the transformed BoundsSphere
public override BoundingSphere BoundsSphereWithTransform { get; }
Property Value
- BoundingSphere
The bounds sphere with transform.
BoundsWithTransform
Gets the bounds with transform. Usually same as Bounds. If have transform, the bound is the transformed Bounds
public override sealed BoundingBox BoundsWithTransform { get; }
Property Value
- BoundingBox
The bounds with transform.
BufferModelInternal
Gets the buffer model internal.
protected IAttachableBufferModel? BufferModelInternal { get; }
Property Value
- IAttachableBufferModel
The buffer model internal.
DepthBias
Gets or sets the depth bias.
public int DepthBias { get; set; }
Property Value
- int
The depth bias.
EnableViewFrustumCheck
Gets or sets a value indicating whether [enable view frustum check].
public bool EnableViewFrustumCheck { get; set; }
Property Value
- bool
trueif [enable view frustum check]; otherwise,false.
FillMode
Gets or sets the fill mode.
public FillMode FillMode { get; set; }
Property Value
- FillMode
The fill mode.
Geometry
Gets or sets the geometry.
public Geometry3D? Geometry { get; set; }
Property Value
- Geometry3D
The geometry.
GeometryValid
Gets a value indicating whether [geometry valid].
public bool GeometryValid { get; }
Property Value
- bool
trueif [geometry valid]; otherwise,false.
HasInstances
Gets a value indicating whether this instance has instances.
public bool HasInstances { get; }
Property Value
- bool
trueif this instance has instances; otherwise,false.
InstanceBuffer
Gets the instance buffer.
public IElementsBufferModel<Matrix4x4> InstanceBuffer { get; }
Property Value
- IElementsBufferModel<Matrix4x4>
The instance buffer.
Instances
Gets or sets the instances.
public IList<Matrix4x4>? Instances { get; set; }
Property Value
IsDepthClipEnabled
Gets or sets a value indicating whether this instance is depth clip enabled.
public bool IsDepthClipEnabled { get; set; }
Property Value
- bool
trueif this instance is depth clip enabled; otherwise,false.
IsMSAAEnabled
Gets or sets a value indicating whether Multisampling Anti-Aliasing enabled.
public bool IsMSAAEnabled { get; set; }
Property Value
- bool
trueif this instance is msaa enabled; otherwise,false.
IsScissorEnabled
Gets or sets a value indicating whether this instance is scissor enabled.
public bool IsScissorEnabled { get; set; }
Property Value
- bool
trueif this instance is scissor enabled; otherwise,false.
IsThrowingShadow
Gets or sets a value indicating whether this instance is throwing shadow.
public bool IsThrowingShadow { get; set; }
Property Value
- bool
trueif this instance is throwing shadow; otherwise,false.
OriginalBounds
Gets the original bound from the geometry. Same as Bound
public override sealed BoundingBox OriginalBounds { get; }
Property Value
- BoundingBox
The original bound.
OriginalBoundsSphere
Gets the original bound sphere from the geometry. Same as BoundingSphere
public override sealed BoundingSphere OriginalBoundsSphere { get; }
Property Value
- BoundingSphere
The original bound sphere.
PostEffects
Gets or sets the post effects.
public string PostEffects { get; set; }
Property Value
- string
The post effects.
SlopeScaledDepthBias
Gets or sets the slope scaled depth bias.
public float SlopeScaledDepthBias { get; set; }
Property Value
- float
The slope scaled depth bias.
Methods
CanHitTest(HitTestContext?)
Determines whether this instance [can hit test] the specified context.
protected override bool CanHitTest(HitTestContext? context)
Parameters
contextHitTestContextThe hit 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
CreateRasterState()
Create raster state description.
If OnCreateRasterState is set, then OnCreateRasterState instead of CreateRasterState() will be called.
protected abstract RasterizerStateDescription CreateRasterState()
Returns
- RasterizerStateDescription
HitTest(HitTestContext?, ref List<HitTestResult>)
public override bool HitTest(HitTestContext? context, ref List<HitTestResult> hits)
Parameters
contextHitTestContexthitsList<HitTestResult>
Returns
InstancesChanged()
Instanceses the changed.
protected virtual void InstancesChanged()
OnAttach(IEffectsManager)
This function initialize the Geometry Buffer and Instance Buffer
protected override bool OnAttach(IEffectsManager effectsManager)
Parameters
effectsManagerIEffectsManager
Returns
- bool
Return true if attached
OnAttached()
Called when [attached].
protected override void OnAttached()
OnCheckGeometry(Geometry3D?)
Called when [check geometry].
protected virtual bool OnCheckGeometry(Geometry3D? geometry)
Parameters
geometryGeometry3DThe geometry.
Returns
OnCreateBufferModel(Guid, Geometry3D?)
Called when [create buffer model].
protected virtual IAttachableBufferModel OnCreateBufferModel(Guid modelGuid, Geometry3D? geometry)
Parameters
modelGuidGuidgeometryGeometry3D
Returns
OnDetach()
Used to override Detach
protected override void OnDetach()
OnDispose(bool)
Disposes of object resources.
protected override void OnDispose(bool disposeManagedResources)
Parameters
disposeManagedResourcesboolIf true, managed resources should be disposed of in addition to unmanaged resources.
OnGeometryChanged(Geometry3D?, Geometry3D?)
Called when [geometry changed].
protected virtual void OnGeometryChanged(Geometry3D? newGeometry, Geometry3D? oldGeometry)
Parameters
newGeometryGeometry3DThe new geometry.
oldGeometryGeometry3DThe old geometry.
OnRasterStateChanged()
Called when [raster state changed].
protected virtual void OnRasterStateChanged()
PreHitTestOnBounds(HitTestContext?)
Pre hit test on BoundsWithTransform and BoundsSphereWithTransform. If return false, OnHitTest(HitTestContext?, Matrix4x4, ref List<HitTestResult>) will not be called.
protected virtual bool PreHitTestOnBounds(HitTestContext? context)
Parameters
contextHitTestContext
Returns
TestViewFrustum(ref BoundingFrustum)
Views the frustum test.
public override bool TestViewFrustum(ref BoundingFrustum viewFrustum)
Parameters
viewFrustumBoundingFrustumThe view frustum.
Returns
UpdateNotRender(RenderContext)
Updates the not render.
public override void UpdateNotRender(RenderContext context)
Parameters
contextRenderContextThe context.