Files
MonoGame.Extended/Source/MonoGame.Extended.Collisions/QuadTree/QuadTreeData.cs
T
Jon SeamanandDylan Wilson 862b64ac7b Rectangles now collide with circles (#513)
* Added CircleF and RectangleF intersection method

* Simplified shape implementation

* Docs

* Collision system uses shapes

* QuadTree collision allows circles

* ICollisionActor remove setter

+semver: patch

* Added position to IShapeF

+semver: patch

* Added CollisionComponent contains

* Fix penetration vector between circles

* Circle Rectangle penetration vector

* Added test for Rectangle Rectangle Collision

* Add docs, fix test
2018-06-14 21:27:37 +10:00

32 lines
894 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(ICollisionActor target)
{
Target = target;
Bounds = target.Bounds;
Flag = false;
}
/// <summary>
/// Gets or sets the Target for collision.
/// </summary>
public ICollisionActor 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 IShapeF Bounds { get; set; }
}
}