Skip to content

Latest commit

 

History

History
108 lines (62 loc) · 1.39 KB

File metadata and controls

108 lines (62 loc) · 1.39 KB
source

Represents an axis aligned bounding box with a center position, and extents which are the distance from the center to the corners

export declare class Bounds 

Creates a bounds object.

Signature

constructor(center: Vec3, extents: Vec3);

Parameters

center: Vec3

The center of the bounds.

extents: Vec3

1/2 the size of the bounds.

The position of the bounds.

Signature

center: Vec3;

The distance from center to min/max of the bounds.

Signature

extents: Vec3;

Get the position of the maximum corner of the bounds

Signature

max(): Vec3;

Returns

Vec3

the maximum point of the bounds

Get the position of the minimum corner of the bounds

Signature

min(): Vec3;

Returns

Vec3

the minimum point of the bounds

Get the size of the box, which is twice the extents

Signature

size(): Vec3;

Returns

Vec3

The size of the bounding box