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
namestringThe name.
Fields
itemHashSet
protected readonly Dictionary<Guid, SceneNode> itemHashSet
Field Value
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
nodeSceneNodeThe node.
Returns
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
detachChildrenboolWhether 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
Returns
MoveChildNode(int, int)
Moves the child node.
public void MoveChildNode(int fromIndex, int toIndex)
Parameters
OnAttach(IEffectsManager)
Called when [attach].
protected override bool OnAttach(IEffectsManager effectsManager)
Parameters
effectsManagerIEffectsManagerThe effectsManager.
Returns
OnDetach()
Called when [detach].
protected override void OnDetach()
OnDispose(bool)
Called when [dispose].
protected override void OnDispose(bool disposeManagedResources)
Parameters
disposeManagedResourcesboolif 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
contextHitTestContextThe context.
totalModelMatrixMatrix4x4The total model matrix.
hitsList<HitTestResult>The hits.
Returns
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
nodeSceneNodeThe node.
detachChildboolWhether to detach the child node automatically after removing. Default = true.
Returns
TransferChildNode(SceneNode, GroupNodeBase)
Transfers the child node from current group node to another group node.
public bool TransferChildNode(SceneNode node, GroupNodeBase targetGroup)
Parameters
nodeSceneNodeThe node.
targetGroupGroupNodeBaseThe target group.
Returns
TryGetNode(Guid, out SceneNode?)
Tries the get node.
public bool TryGetNode(Guid guid, out SceneNode? node)
Parameters
Returns
Events
ChildNodeAdded
public event EventHandler<GroupNodeBase.OnChildNodeChangedArgs>? ChildNodeAdded
Event Type
ChildNodeRemoved
public event EventHandler<GroupNodeBase.OnChildNodeChangedArgs>? ChildNodeRemoved
Event Type
Cleared
public event EventHandler<GroupNodeBase.OnChildNodeChangedArgs>? Cleared