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
Implements
Inherited Members
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 |