Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Traversal can easily be done by utilizing the <code>Find&lt;T&gt;()</code> function. It allows the definition of a predicate function which is called for every node in the scene, matching the given type parameter T. </p> <p>Let's take the following scene, showing a simple line plot (<a href="http://ilnumerics.net/ilcc.php?ilc=ia5d62c" rel="nofollow">http://ilnumerics.net/ilcc.php?ilc=ia5d62c</a>):</p> <pre><code>var scene = new ILScene { new ILPlotCube { new ILLinePlot(ILMath.array&lt;float&gt;( new float[] { 1, 3, 5, 2, 7}, 1, 5)) } }; //scene; scene.Find&lt;ILGroup&gt;(predicate: n =&gt; { // this predicate is called once for every node Console.Out.WriteLine(n.ToString()); return false; }); </code></pre> <p>This gives the following output: </p> <pre><code>ILGroup #20 '--' Childs:[4] Camera: #21 - Polar r:10 f:0° ?:0° - Pos X:0 Y:0 Z:10 - Lookat X:0 Y:0 Z:0 - Top X:0 Y:1 Z:0 ILGroup #22 'Screen' Childs:[1] ILGroup #23 'Light0Group' Childs:[1] ILPlotCube #26 'PlotCube' Childs:[2] ILPlotCubeScaleGroup #27 'PlotCubeScale' Childs:[3] ILPlotCubeDataGroup #28 'PlotsData' Childs:[1] ILLinePlot #57 'LinePlot' Childs:[2] ILMarker #59 'Marker' Childs:[2] ILAxisCollection #30 'AxisCollection' Childs:[3] ILAxis #31 'AxisGroup' Childs:[5] ILTickCollection #32 'TicksCollectionGroup' Childs:[1] ILAxis #39 'AxisGroup' Childs:[5] ILTickCollection #40 'TicksCollectionGroup' Childs:[1] ILAxis #47 'AxisGroup' Childs:[5] ILTickCollection #48 'TicksCollectionGroup' Childs:[1] ILSelectionRectangle #55 'SelectionRectangle' Childs:[1] </code></pre> <p>Note that the generic type T in <code>Find&lt;T&gt;</code> determines the type of nodes to consider for output. Here, only group nodes are considered. In order to recognize ALL nodes within the scene, one may use <code>Find&lt;ILNode&gt;()</code> instead.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload