Quadtree
Namespace: Murder.Core.Physics
Assembly: Murder.dll
public class Quadtree
⭐ Constructors
public Quadtree(Rectangle mapBounds)
Parameters
mapBounds
Rectangle
⭐ Properties
Collision
public readonly QTNode<T> Collision;
Returns
QTNode<T>
PushAway
public readonly QTNode<T> PushAway;
Returns
QTNode<T>
StaticRender
public readonly QTNode<T> StaticRender;
Returns
QTNode<T>
⭐ Methods
GetOrCreateUnique(World)
public Quadtree GetOrCreateUnique(World world)
Parameters
world
World
Returns
Quadtree
AddToCollisionQuadTree(IEnumerable)
public void AddToCollisionQuadTree(IEnumerable<T> entities)
Parameters
entities
IEnumerable<T>
AddToStaticRenderQuadTree(IEnumerable)
public void AddToStaticRenderQuadTree(IEnumerable<T> entities)
Parameters
entities
IEnumerable<T>
GetCollisionEntitiesAt(Rectangle, List)
public void GetCollisionEntitiesAt(Rectangle boundingBox, List<T> list)
Parameters
boundingBox
Rectangle
list
List<T>
RemoveFromCollisionQuadTree(IEnumerable)
public void RemoveFromCollisionQuadTree(IEnumerable<T> entities)
Parameters
entities
IEnumerable<T>
RemoveFromStaticRenderQuadTree(IEnumerable)
public void RemoveFromStaticRenderQuadTree(IEnumerable<T> entities)
Parameters
entities
IEnumerable<T>
UpdateQuadTree(IEnumerable)
public void UpdateQuadTree(IEnumerable<T> entities)
Completelly clears and rebuilds the quad tree and pushAway quad tree using a given list of entities We should avoid this if possible
Parameters
entities
IEnumerable<T>
⚡