Bounds.Bounds2d

Description: Abstract bounds type that is used to detect intersections.

Implements: EndGate.IMoveable

Constructors

Bounds2d (position)
Should only ever be called by derived classes.

position: EndGate.Vector2d
Initial Position of the current bounded object.

Bounds2d (position, rotation)
Should only ever be called by derived classes.

position: EndGate.Vector2d
Initial Position of the current bounded object.

rotation: number
Initial Rotation of the current bounded object.

Fields

Position: EndGate.Vector2d
Gets or sets the Position of the bounds.

Rotation: number
Gets or sets the Rotation of the bounds.

Methods

Scale()
Abstract: Scales the size of the bounded object.

ContainsPoint()
Abstract: Determines if the current bounded object contains the provided Vector2d.

ContainsCircle()
Abstract: Determines if the current bounded object completely contains the provided BoundingCircle.

ContainsRectangle()
Abstract: Determines if the current bounded object completely contains the provided BoundingRectangle.

Contains()
Abstract: Determines if the current bounded object contains the provided Vector2d.

Intersects()
Determines if the current bounded object intersects another bounded object.

IntersectsCircle()
Abstract: Determines if the current bounded object is intersecting the provided BoundingCircle.

IntersectsRectangle()
Abstract: Determines if the current bounded object is intersecting the provided BoundingRectangle.

Examples

There's currently no example available for this page. If you'd like to suggest one send me an containing a description, code, and link to the page for the suggested example. As a thanks I'll associate the code snippet with your name directly below the example if approved.