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
-
objectCollision<TCoordinates>
- Implements
- Derived
Methods
Clone()
Creates a deep copy of this instance.
public abstract Collision<TCoordinates> Clone()
Returns
- Collision<TCoordinates>
CloneFromTo(Collision<TCoordinates>, Collision<TCoordinates>)
Copies all members declared by Collision<TCoordinates> from one instance to another.
protected static void CloneFromTo(Collision<TCoordinates> from, Collision<TCoordinates> to)
Parameters
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.