Class Octree<T>
Implements a cubic Octree.
Inheritance
System.Object
Octree<T>
Implements
System.Collections.Generic.IEnumerable<T>
System.Collections.IEnumerable
System.IDisposable
Assembly: Eco.Shared.dll
Syntax
public class Octree<T> : Object, IEnumerable<T>, IEnumerable, IDisposable where T : class
Type Parameters
Name |
Description |
T |
The type of data to store in the tree.
|
Constructors
Octree(Boolean)
Declaration
public Octree(bool threadSafe = false)
Parameters
Type |
Name |
Description |
System.Boolean |
threadSafe |
|
Properties
Count
Declaration
public int Count { get; }
Property Value
Type |
Description |
System.Int32 |
|
Extents
Declaration
public WorldRange Extents { get; }
Property Value
IsThreadSafe
Declaration
public bool IsThreadSafe { get; }
Property Value
Type |
Description |
System.Boolean |
|
Item[Vector3i]
Declaration
public T this[Vector3i pos] { get; set; }
Parameters
Property Value
Methods
AsArray()
Declaration
Returns
Clear()
Declaration
CollectAll(Queue<T>)
Declaration
public int CollectAll(Queue<T> buffer)
Parameters
Type |
Name |
Description |
System.Collections.Generic.Queue<T> |
buffer |
|
Returns
Type |
Description |
System.Int32 |
|
CollectRange(WorldRange, Queue<T>)
Declaration
public int CollectRange(WorldRange range, Queue<T> buffer)
Parameters
Type |
Name |
Description |
WorldRange |
range |
|
System.Collections.Generic.Queue<T> |
buffer |
|
Returns
Type |
Description |
System.Int32 |
|
CollectRangeExclusiveOf(WorldRange, Queue<T>)
Declaration
public int CollectRangeExclusiveOf(WorldRange range, Queue<T> buffer)
Parameters
Type |
Name |
Description |
WorldRange |
range |
|
System.Collections.Generic.Queue<T> |
buffer |
|
Returns
Type |
Description |
System.Int32 |
|
Dispose()
Declaration
Dispose(Boolean)
Declaration
protected virtual void Dispose(bool disposing)
Parameters
Type |
Name |
Description |
System.Boolean |
disposing |
|
GetEnumerator()
Declaration
public DisposableUtils.DisposableActionEnumerator<T> GetEnumerator()
Returns
GetRangeEnumerable(WorldRange)
Declaration
public DisposableUtils.DisposableActionEnumerable<T> GetRangeEnumerable(WorldRange range)
Parameters
Returns
GetRangeExclusiveOfEnumerable(WorldRange)
Declaration
public DisposableUtils.DisposableActionEnumerable<T> GetRangeExclusiveOfEnumerable(WorldRange range)
Parameters
Returns
Set(Vector3i, T)
Declaration
public void Set(Vector3i pos, T obj)
Parameters
Type |
Name |
Description |
Vector3i |
pos |
|
T |
obj |
|
TryGetValue(Vector3i, out T)
Declaration
public bool TryGetValue(Vector3i pos, out T obj)
Parameters
Type |
Name |
Description |
Vector3i |
pos |
|
T |
obj |
|
Returns
Type |
Description |
System.Boolean |
|
Implements
System.Collections.Generic.IEnumerable<>
System.Collections.IEnumerable
System.IDisposable
Extension Methods