Show / Hide Table of Contents

Class SceneNodeFinder<TNodeToFind, TNode, TComponent>

Allows various searches over scene graphs. This class can be used directly but will be more commonly used by calling one of the Find extension methods declared in SceneFinderExtensions.

Inheritance
System.Object
Visitor<TNode, TComponent>
SceneFinderBase<TNodeToFind, TNode, TComponent>
SceneNodeFinder<TNodeToFind, TNode, TComponent>
Implements
System.Collections.Generic.IEnumerator<TNodeToFind>
System.Collections.IEnumerator
System.IDisposable
Inherited Members
SceneFinderBase<TNodeToFind, TNode, TComponent>._rootList
SceneFinderBase<TNodeToFind, TNode, TComponent>._match
SceneFinderBase<TNodeToFind, TNode, TComponent>.Reset()
Visitor<TNode, TComponent>.IgnoreInactiveComponents
Visitor<TNode, TComponent>.Traverse(TNode)
Visitor<TNode, TComponent>.Traverse(IEnumerable<TNode>)
Visitor<TNode, TComponent>.InitState()
Visitor<TNode, TComponent>.PushState()
Visitor<TNode, TComponent>.PopState()
Visitor<TNode, TComponent>.CurrentNode
Visitor<TNode, TComponent>.CurrentComponent
Visitor<TNode, TComponent>.YieldOnCurrentNode
Visitor<TNode, TComponent>.YieldOnCurrentComponent
Visitor<TNode, TComponent>.YieldEnumeration
Visitor<TNode, TComponent>.EnumInit(IEnumerator<TNode>)
Visitor<TNode, TComponent>.EnumMoveNext()
Visitor<TNode, TComponent>.EnumMoveNextNoComponent()
Visitor<TNode, TComponent>.VisitorModules
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Fusee.Xene
Assembly: Fusee.Xene.dll
Syntax
public class SceneNodeFinder<TNodeToFind, TNode, TComponent> : SceneFinderBase<TNodeToFind, TNode, TComponent>, IEnumerator<TNodeToFind>, IEnumerator, IDisposable where TNodeToFind : TNode where TNode : class, INode where TComponent : class, IComponent
Type Parameters
Name Description
TNodeToFind

The concrete type of nodes to look for.

TNode

The concrete base type of nodes used as building blocks for scene graphs.

TComponent

The concrete base type of components used as building blocks for scene graphs.

Remarks

Search criteria can be passed as (lambda) predicates matching scene nodes. Results are returned as enumerator. Instead of directly using this class, users should use one of the FindNodes or FindComponents extension methods.

Constructors

SceneNodeFinder(IEnumerator<TNode>, Predicate<TNodeToFind>)

Initializes a new instance of the SceneNodeFinder<TNodeToFind, TNode, TComponent> class.

Declaration
public SceneNodeFinder(IEnumerator<TNode> rootList, Predicate<TNodeToFind> match)
Parameters
Type Name Description
System.Collections.Generic.IEnumerator<TNode> rootList

The root list where to start the search.

System.Predicate<TNodeToFind> match

The search predicate. Typically specified as a Lambda expression.

Properties

Current

Gets the element in the collection at the current position of the enumerator.

Declaration
public TNodeToFind Current { get; }
Property Value
Type Description
TNodeToFind

Methods

Dispose()

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

Declaration
public void Dispose()

Dispose(Boolean)

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

Declaration
protected virtual void Dispose(bool disposing)
Parameters
Type Name Description
System.Boolean disposing

If disposing equals true, the method has been called directly or indirectly by a user's code. Managed and unmanaged resources can be disposed. If disposing equals false, the method has been called by the runtime from inside the finalizer and you should not reference other objects. Only unmanaged resources can be disposed.

MatchNode(TNodeToFind)

Reflected Viserator Callback. Performs the match test on the specified node.

Declaration
protected void MatchNode(TNodeToFind node)
Parameters
Type Name Description
TNodeToFind node

The node to check for the match.

MoveNext()

Advances the enumerator to the next element of the collection.

Declaration
public bool MoveNext()
Returns
Type Description
System.Boolean

true if the enumerator was successfully advanced to the next element; false if the enumerator has passed the end of the collection.

Explicit Interface Implementations

IEnumerator.Current

Declaration
object IEnumerator.Current { get; }
Returns
Type Description
System.Object

Implements

System.Collections.Generic.IEnumerator<T>
System.Collections.IEnumerator
System.IDisposable
Generated by DocFX
GitHub Repo
Back to top