IShape is the interface for a shape, defining all methods that need implemented in order for the shape to be used with collision detection.
Table of contents
▸ Center(): Vector
Center calculates/retrieves the center of a shape.
The center point of the shape
▸ Copy(): IShape
Creates a copy of the shape and its values, rather than pointing to the same Shape.
The value copy of the Shape
FarthestPointInDirection returns the point that is farthest in the direction provided. Used in the GJK algorithm for collision detection.
||Vector||The direction to get the point in|
The farthest point in the direction provided
▸ Free(): void
Free releases an object or it's constituent parts back into any available object pools.
Inherited from: IFreeable
point: Vector): boolean
PointInside determines if a point provided is within the shape or not.
||Vector||The point to check if it is inside the shape|
If the point is inside the shape, true = inside, false = outside
Transform takes a transform and applies it to shape.
||Transform||The transform to apply to the shape|
The transformed shape