mirror of
https://github.com/AlexMacocian/MonoGame.Extended.git
synced 2026-07-24 12:06:37 +00:00
* 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
32 lines
894 B
C#
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; }
|
|
}
|
|
} |