Skip to main content

Class: BoundingBox

Constructors​

constructor​

• new BoundingBox(x1?, y1?, x2?, y2?)

Parameters​

NameTypeDefault value
x1numberNumber.NaN
y1numberNumber.NaN
x2numberNumber.NaN
y2numberNumber.NaN

Defined in​

src/BoundingBox.ts:3

Properties​

x1​

• x1: number = Number.NaN

Defined in​

src/BoundingBox.ts:4


y1​

• y1: number = Number.NaN

Defined in​

src/BoundingBox.ts:5


x2​

• x2: number = Number.NaN

Defined in​

src/BoundingBox.ts:6


y2​

• y2: number = Number.NaN

Defined in​

src/BoundingBox.ts:7

Accessors​

x​

• get x(): number

Returns​

number

Defined in​

src/BoundingBox.ts:13


y​

• get y(): number

Returns​

number

Defined in​

src/BoundingBox.ts:17


width​

• get width(): number

Returns​

number

Defined in​

src/BoundingBox.ts:21


height​

• get height(): number

Returns​

number

Defined in​

src/BoundingBox.ts:25

Methods​

addPoint​

â–¸ addPoint(x, y): void

Parameters​

NameType
xnumber
ynumber

Returns​

void

Defined in​

src/BoundingBox.ts:29


addX​

â–¸ addX(x): void

Parameters​

NameType
xnumber

Returns​

void

Defined in​

src/BoundingBox.ts:61


addY​

â–¸ addY(y): void

Parameters​

NameType
ynumber

Returns​

void

Defined in​

src/BoundingBox.ts:65


addBoundingBox​

â–¸ addBoundingBox(boundingBox): void

Parameters​

NameType
boundingBoxBoundingBox

Returns​

void

Defined in​

src/BoundingBox.ts:69


sumCubic​

â–¸ Private sumCubic(t, p0, p1, p2, p3): number

Parameters​

NameType
tnumber
p0number
p1number
p2number
p3number

Returns​

number

Defined in​

src/BoundingBox.ts:85


bezierCurveAdd​

â–¸ Private bezierCurveAdd(forX, p0, p1, p2, p3): void

Parameters​

NameType
forXboolean
p0number
p1number
p2number
p3number

Returns​

void

Defined in​

src/BoundingBox.ts:100


addBezierCurve​

â–¸ addBezierCurve(p0x, p0y, p1x, p1y, p2x, p2y, p3x, p3y): void

Parameters​

NameType
p0xnumber
p0ynumber
p1xnumber
p1ynumber
p2xnumber
p2ynumber
p3xnumber
p3ynumber

Returns​

void

Defined in​

src/BoundingBox.ts:161


addQuadraticCurve​

â–¸ addQuadraticCurve(p0x, p0y, p1x, p1y, p2x, p2y): void

Parameters​

NameType
p0xnumber
p0ynumber
p1xnumber
p1ynumber
p2xnumber
p2ynumber

Returns​

void

Defined in​

src/BoundingBox.ts:177


isPointInBox​

â–¸ isPointInBox(x, y): boolean

Parameters​

NameType
xnumber
ynumber

Returns​

boolean

Defined in​

src/BoundingBox.ts:193