Files
MonoGame.Extended/Source/MonoGame.Extended.Collisions/CollisionInfo.cs
T
Jon Seaman 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

21 lines
596 B
C#

using Microsoft.Xna.Framework;
namespace MonoGame.Extended.Collisions
{
/// <summary>
/// This class holds data on a collision. It is passed as a parameter to
/// OnCollision methods.
/// </summary>
public class CollisionInfo
{
/// <summary>
/// Gets the object being collided with.
/// </summary>
public ICollidable Other { get; internal set; }
/// <summary>
/// Gets a vector representing the overlap between the two objects.
/// </summary>
public Vector2 PenetrationVector { get; internal set; }
}
}