Class Box2

Index

Constructor methods

Properties

Methods

Constructor methods

constructor(min?: Vector2, max?: Vector2): Box2

Parameters

Returns

Box2

Properties

public max: Vector2

public min: Vector2

Methods

public center(optionalTarget?: Vector2): Vector2

Parameters

  • optionalTarget?: Vector2 optional

Returns

Vector2

public clampPoint(point: Vector2, optionalTarget?: Vector2): Vector2

Parameters

Returns

Vector2

public clone(): Box2

Returns

Box2

public containsBox(box: Box2): boolean

Parameters

Returns

boolean

public containsPoint(point: Vector2): boolean

Parameters

Returns

boolean

public copy(box: Box2): Box2

Parameters

Returns

Box2

public distanceToPoint(point: Vector2): number

Parameters

Returns

number

public empty(): boolean

Returns

boolean

public equals(box: Box2): boolean

Parameters

Returns

boolean

public expandByPoint(point: Vector2): Box2

Parameters

Returns

Box2

public expandByScalar(scalar: number): Box2

Parameters

  • scalar: number

Returns

Box2

public expandByVector(vector: Vector2): Box2

Parameters

Returns

Box2

public getParameter(point: Vector2): Vector2

Parameters

Returns

Vector2

public intersect(box: Box2): Box2

Parameters

Returns

Box2

public isIntersectionBox(box: Box2): boolean

Parameters

Returns

boolean

public makeEmpty(): Box2

Returns

Box2

public set(min: Vector2, max: Vector2): Box2

Parameters

Returns

Box2

public setFromCenterAndSize(center: Vector2, size: number): Box2

Parameters

Returns

Box2

public setFromPoints(points: Vector2[]): Box2

Parameters

Returns

Box2

public size(optionalTarget?: Vector2): Vector2

Parameters

  • optionalTarget?: Vector2 optional

Returns

Vector2

public translate(offset: Vector2): Box2

Parameters

Returns

Box2

public union(box: Box2): Box2

Parameters

Returns

Box2