Class SceneComponentFinder<TComponentToFind, 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 SceneComponentFinder<TComponentToFind, TNode, TComponent> : SceneFinderBase<TComponentToFind, TNode, TComponent>, IEnumerator<TComponentToFind>, IEnumerator, IDisposable where TComponentToFind : TComponent where TNode : class, INode where TComponent : class, IComponent
Type Parameters
Name | Description |
---|---|
TComponentToFind | The concrete type of the components 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 components. Results are returned as enumerator. Instead of directly using this class, users should use one of the FindNodes or FindComponents extension methods.
Constructors
SceneComponentFinder(IEnumerator<TNode>, Predicate<TComponentToFind>)
Initializes a new instance of the SceneComponentFinder<TComponentToFind, TNode, TComponent> class.
Declaration
public SceneComponentFinder(IEnumerator<TNode> rootList, Predicate<TComponentToFind> match)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.IEnumerator<TNode> | rootList | The root list. |
System.Predicate<TComponentToFind> | match | The match. |
Properties
Current
Gets the element in the collection at the current position of the enumerator.
Declaration
public TComponentToFind Current { get; }
Property Value
Type | Description |
---|---|
TComponentToFind |
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. |
MatchComponent(TComponentToFind)
Reflected Viserator Callback. Performs the match test on the specified component.
Declaration
protected void MatchComponent(TComponentToFind component)
Parameters
Type | Name | Description |
---|---|---|
TComponentToFind | component | The component 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 |