Files
MonoGame.Extended/Source/MonoGame.Extended.Collisions/QuadTree/QuadTreeData.cs
T
Jon SeamanandDylan Wilson ce9fc2459b QuadTree Collision Library (#504)
* Created unit test project for collisions.

* Started on tests

* Created unit test project for collisions.

* Started on tests

* Update collision test

* CollisionInfo docs

* More docs for CollisionGrid and Cell

* Fix obsolete warning for RectangleF.Intersect

* Summary for CollisionGrid and CollisionGridCell

* QuadTree collision implemented

 - Ported from C++ from Game Physics Cookbook chapter 6, 2D Optimizations

* Small refactor for QuadTree naming

* First tests for QuadTree

* Fix test

* COde Cleanup

* Added DefaultMaxObjectsPerNode

* Add missed Query code

* Insert Tests and bugfix

* Fix bug with QuadTree.Shake

* Fix namespaces

* Query tests and fix

* Additional test for Query

* Initial QuadTreeCollision Component

* Basic collision demo working

* Spikey ball colliding with walls

* Improved the collision demo

* Update QuadTree

* Added comment for CollisionComponent

* Ignore test that needs fixed

* Rename QuadTree to Quadtree

* Fix penetration vector

* Update to 2.0 and xUnit
2018-05-30 20:26:34 +10:00

32 lines
906 B
C#

namespace MonoGame.Extended.Collisions
{
/// <summary>
/// Data structure for the quad tree.
/// Holds the entity and collision data for it.
/// </summary>
public class QuadtreeData
{
public QuadtreeData(IActorTarget target)
{
Target = target;
BoundingBox = target.BoundingBox;
Flag = false;
}
/// <summary>
/// Gets or sets the Target for collision.
/// </summary>
public IActorTarget Target { get; set; }
/// <summary>
/// Gets or sets whether Target has had its collision handled this
/// iteration.
/// </summary>
public bool Flag { get; set; }
/// <summary>
/// Gets or sets the bounding box for collision detection.
/// </summary>
public RectangleF BoundingBox { get; set; }
}
}