Class: AABBAlgorithm
AABBAlgorithm is used to provide collision detection using Axis-Aligned Bounding-Boxes (AABB), it provides a simplified collision detection method. This algorithm sacrifices some collision accuracy for performance.
Implements
Table of contents
Constructors
Methods
Constructors
constructor
+ new AABBAlgorithm(): AABBAlgorithm
Returns: AABBAlgorithm
Methods
CalculateCollisions
▸ CalculateCollisions(shapes
: IShape[]): CollisionInfo[]
CalculateCollisions calculates all collisions between the shapes provided, returning a list of CollisionInfos, each representing a Collision.
Parameters:
Name | Type |
---|---|
shapes |
IShape[] |
Returns: CollisionInfo[]
Implementation of: ICollisionAlgorithm