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