Box2
Represents an axis-aligned bounding box (AABB) in 2D space.
Attributes
- Graph
-
- Supertypes
-
class Objecttrait Anyclass Objecttrait Matchableclass Any
Members list
Value members
Concrete methods
Clamps the given point within the bounds of this box.
Clamps the given point within the bounds of this box.
Attributes
Returns true
if this bounding box includes the entirety of the given bounding box.
Returns true
if this bounding box includes the entirety of the given bounding box.
Attributes
Returns true
if the given point lies within or on the boundaries of this box.
Returns true
if the given point lies within or on the boundaries of this box.
Attributes
Copies the values of the given box to this instance.
Copies the values of the given box to this instance.
Attributes
Returns the euclidean distance from any edge of this box to the specified point.
Returns the euclidean distance from any edge of this box to the specified point.
Attributes
Returns true
if this bounding box is equal with the given one.
Returns true
if this bounding box is equal with the given one.
Attributes
Expands the boundaries of this box to include the given point.
Expands the boundaries of this box to include the given point.
Attributes
Expands each dimension of the box by the given scalar.
Expands each dimension of the box by the given scalar.
Attributes
Expands this box equilaterally by the given vector.
Expands this box equilaterally by the given vector.
Attributes
Returns the center point of this box.
Returns the center point of this box.
Attributes
Returns a point as a proportion of this box's width and height.
Returns a point as a proportion of this box's width and height.
Attributes
Returns the dimensions of this box.
Returns the dimensions of this box.
Attributes
Computes the intersection of this bounding box and the given one.
Computes the intersection of this bounding box and the given one.
Attributes
Returns true
if the given bounding box intersects with this bounding box.
Returns true
if the given bounding box intersects with this bounding box.
Attributes
Returns true if this box includes zero points within its bounds.
Returns true if this box includes zero points within its bounds.
Attributes
Returns a new box with copied values from this instance.
Returns a new box with copied values from this instance.
Attributes
Makes this box empty which means in encloses a zero space in 2D.
Makes this box empty which means in encloses a zero space in 2D.
Attributes
Sets the lower and upper boundaries of this box. Please note that this method only copies the values from the given objects.
Sets the lower and upper boundaries of this box. Please note that this method only copies the values from the given objects.
Attributes
Centers this box on the given center vector and sets this box's width and height to the given size values.
Centers this box on the given center vector and sets this box's width and height to the given size values.
Attributes
Sets the upper and lower bounds of this box so it encloses the position data in the given array.
Sets the upper and lower bounds of this box so it encloses the position data in the given array.
Attributes
Adds the given offset to both the upper and lower bounds of this bounding box.
Adds the given offset to both the upper and lower bounds of this bounding box.
Attributes
Inherited methods
Attributes
- Inherited from:
- Object
Attributes
- Inherited from:
- Object
Attributes
- Inherited from:
- Object
Attributes
- Inherited from:
- Object
Attributes
- Inherited from:
- Object