Table of Contents

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

GeometryNode.CreateRasterStateFunc

reuseVertexArrayBuffer

The reuse vertex array buffer

protected bool reuseVertexArrayBuffer

Field Value

bool

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

true if [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

true if [geometry valid]; otherwise, false.

HasInstances

Gets a value indicating whether this instance has instances.

public bool HasInstances { get; }

Property Value

bool

true if 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

IList<Matrix4x4>

The instances.

IsDepthClipEnabled

Gets or sets a value indicating whether this instance is depth clip enabled.

public bool IsDepthClipEnabled { get; set; }

Property Value

bool

true if 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

true if 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

true if 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

true if 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

context HitTestContext

The hit 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

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

context HitTestContext
hits List<HitTestResult>

Returns

bool

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

effectsManager IEffectsManager

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

geometry Geometry3D

The geometry.

Returns

bool

OnCreateBufferModel(Guid, Geometry3D?)

Called when [create buffer model].

protected virtual IAttachableBufferModel OnCreateBufferModel(Guid modelGuid, Geometry3D? geometry)

Parameters

modelGuid Guid
geometry Geometry3D

Returns

IAttachableBufferModel

OnDetach()

Used to override Detach

protected override void OnDetach()

OnDispose(bool)

Disposes of object resources.

protected override void OnDispose(bool disposeManagedResources)

Parameters

disposeManagedResources bool

If 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

newGeometry Geometry3D

The new geometry.

oldGeometry Geometry3D

The old geometry.

OnRasterStateChanged()

Called when [raster state changed].

protected virtual void OnRasterStateChanged()

PreHitTestOnBounds(HitTestContext?)

protected virtual bool PreHitTestOnBounds(HitTestContext? context)

Parameters

context HitTestContext

Returns

bool

TestViewFrustum(ref BoundingFrustum)

Views the frustum test.

public override bool TestViewFrustum(ref BoundingFrustum viewFrustum)

Parameters

viewFrustum BoundingFrustum

The view frustum.

Returns

bool

UpdateNotRender(RenderContext)

Updates the not render.

public override void UpdateNotRender(RenderContext context)

Parameters

context RenderContext

The context.