Table of Contents

Class GroupNodeBase

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

Constructors

GroupNodeBase()

Initializes a new instance of the GroupNodeBase class.

public GroupNodeBase()

GroupNodeBase(string)

Initializes a new instance of the GroupNodeBase class.

public GroupNodeBase(string name)

Parameters

name string

The name.

Fields

itemHashSet

protected readonly Dictionary<Guid, SceneNode> itemHashSet

Field Value

Dictionary<Guid, SceneNode>

Properties

Metadata

Gets or sets the metadata. Metadata is used to store additional data to describe the scene node.

public Metadata? Metadata { get; set; }

Property Value

Metadata

The metadata.

Methods

AddChildNode(SceneNode)

Adds the child node.

public bool AddChildNode(SceneNode node)

Parameters

node SceneNode

The node.

Returns

bool

Exceptions

ArgumentException

SceneNode already attach to a different node

Clear(bool)

Clears this instance. If detach = false, then developer must manage the life cycle of the cleared child nodes manually.

public void Clear(bool detachChildren = true)

Parameters

detachChildren bool

Whether to detach the child nodes automatically after removing. Default = true.

InsertChildNode(int, SceneNode)

Inserts the child node.

public bool InsertChildNode(int index, SceneNode node)

Parameters

index int

The index.

node SceneNode

The node.

Returns

bool

MoveChildNode(int, int)

Moves the child node.

public void MoveChildNode(int fromIndex, int toIndex)

Parameters

fromIndex int

From index.

toIndex int

To index.

OnAttach(IEffectsManager)

Called when [attach].

protected override bool OnAttach(IEffectsManager effectsManager)

Parameters

effectsManager IEffectsManager

The effectsManager.

Returns

bool

OnDetach()

Called when [detach].

protected override void OnDetach()

OnDispose(bool)

Called when [dispose].

protected override void OnDispose(bool disposeManagedResources)

Parameters

disposeManagedResources bool

if set to true [dispose managed resources].

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

RemoveChildNode(SceneNode, bool)

Removes the child node. If detach = false, then developer must manage the life cycle of the removed node manually.

public bool RemoveChildNode(SceneNode node, bool detachChild = true)

Parameters

node SceneNode

The node.

detachChild bool

Whether to detach the child node automatically after removing. Default = true.

Returns

bool

TransferChildNode(SceneNode, GroupNodeBase)

Transfers the child node from current group node to another group node.

public bool TransferChildNode(SceneNode node, GroupNodeBase targetGroup)

Parameters

node SceneNode

The node.

targetGroup GroupNodeBase

The target group.

Returns

bool

TryGetNode(Guid, out SceneNode?)

Tries the get node.

public bool TryGetNode(Guid guid, out SceneNode? node)

Parameters

guid Guid

The unique identifier.

node SceneNode

The node.

Returns

bool

Events

ChildNodeAdded

public event EventHandler<GroupNodeBase.OnChildNodeChangedArgs>? ChildNodeAdded

Event Type

EventHandler<GroupNodeBase.OnChildNodeChangedArgs>

ChildNodeRemoved

public event EventHandler<GroupNodeBase.OnChildNodeChangedArgs>? ChildNodeRemoved

Event Type

EventHandler<GroupNodeBase.OnChildNodeChangedArgs>

Cleared

public event EventHandler<GroupNodeBase.OnChildNodeChangedArgs>? Cleared

Event Type

EventHandler<GroupNodeBase.OnChildNodeChangedArgs>