Class Collision<TCoordinates>
- Namespace
- AlphaFramework.World.Components
- Assembly
- AlphaFramework.World.dll
Controls how EntityBase<TCoordinates, TTemplate>s occupy space around them.
public abstract class Collision<TCoordinates> : ICloneable where TCoordinates : struct
Type Parameters
TCoordinates
- Inheritance
-
Collision<TCoordinates>
- Implements
- Derived
- Inherited Members
- Extension Methods
Methods
Clone()
Creates a copy of this Collision<TCoordinates>.
public Collision<TCoordinates> Clone()
Returns
- Collision<TCoordinates>
The cloned Collision<TCoordinates>.
CollisionTest(Quadrangle, float)
Determines whether a certain area lies within the collision body.
public abstract bool CollisionTest(Quadrangle area, float rotation)
Parameters
areaQuadrangleThe area to check for collision in entity space.
rotationfloatHow the collision body shall be rotated before performing the collision test.
Returns
- bool
trueifareadoes collide with the body,falseotherwise.
CollisionTest(TCoordinates, float)
Determines whether a certain point lies within the collision body.
public abstract bool CollisionTest(TCoordinates point, float rotation)
Parameters
pointTCoordinatesThe point to check for collision in entity space.
rotationfloatHow the collision body shall be rotated before performing the collision test.
Returns
- bool
trueifpointdoes collide with the body,falseotherwise.
ToString()
Returns a string that represents the current object.
public override string ToString()
Returns
- string
A string that represents the current object.