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
area
QuadrangleThe area to check for collision in entity space.
rotation
floatHow the collision body shall be rotated before performing the collision test.
Returns
- bool
true
ifarea
does collide with the body,false
otherwise.
CollisionTest(TCoordinates, float)
Determines whether a certain point lies within the collision body.
public abstract bool CollisionTest(TCoordinates point, float rotation)
Parameters
point
TCoordinatesThe point to check for collision in entity space.
rotation
floatHow the collision body shall be rotated before performing the collision test.
Returns
- bool
true
ifpoint
does collide with the body,false
otherwise.
ToString()
Returns a string that represents the current object.
public override string ToString()
Returns
- string
A string that represents the current object.