Skip to content

API / RectangleBoundingBoxData

Class: RectangleBoundingBoxData ​

Defined in: model/BoundingBoxData.ts:109

The rectangle bounding box data.

Extends ​

Constructors ​

Constructor ​

ts
new RectangleBoundingBoxData(): RectangleBoundingBoxData;

Returns ​

RectangleBoundingBoxData

Inherited from ​

BoundingBoxData.constructor

Properties ​

hashCode ​

ts
readonly hashCode: number;

Defined in: core/BaseObject.ts:156

A unique identification number assigned to the object.

Inherited from ​

BoundingBoxData.hashCode


type ​

ts
type: BoundingBoxType;

Defined in: model/BoundingBoxData.ts:44

The bounding box type.

Inherited from ​

BoundingBoxData.type

Methods ​

containsPoint() ​

ts
containsPoint(pX: number, pY: number): boolean;

Defined in: model/BoundingBoxData.ts:290

Check whether the bounding box contains a specific point. (Local coordinate system)

Parameters ​

ParameterType
pXnumber
pYnumber

Returns ​

boolean

Overrides ​

BoundingBoxData.containsPoint


intersectsSegment() ​

ts
intersectsSegment(
   xA: number, 
   yA: number, 
   xB: number, 
   yB: number, 
   intersectionPointA: object, 
   intersectionPointB: object, 
   normalRadians: object): number;

Defined in: model/BoundingBoxData.ts:304

Check whether the bounding box intersects a specific segment. (Local coordinate system)

Parameters ​

ParameterTypeDefault value
xAnumberundefined
yAnumberundefined
xBnumberundefined
yBnumberundefined
intersectionPointA{ x: number; y: number; }null
intersectionPointA.xnumberundefined
intersectionPointA.ynumberundefined
intersectionPointB{ x: number; y: number; }null
intersectionPointB.xnumberundefined
intersectionPointB.ynumberundefined
normalRadians{ x: number; y: number; }null
normalRadians.xnumberundefined
normalRadians.ynumberundefined

Returns ​

number

Overrides ​

BoundingBoxData.intersectsSegment


returnToPool() ​

ts
returnToPool(): void;

Defined in: core/BaseObject.ts:167

Clear the object and return it back to object pool。

Returns ​

void

Inherited from ​

BoundingBoxData.returnToPool


borrowObject() ​

ts
static borrowObject<T>(objectConstructor: () => T): T;

Defined in: core/BaseObject.ts:136

Get an instance of the specify class from object pool.

Type Parameters ​

Type Parameter
T extends BaseObject

Parameters ​

ParameterTypeDescription
objectConstructor() => TThe specify class.

Returns ​

T

Inherited from ​

BoundingBoxData.borrowObject


clearPool() ​

ts
static clearPool(objectConstructor: typeof BaseObject): void;

Defined in: core/BaseObject.ts:111

Clear the cached instances of a specify object pool.

Parameters ​

ParameterTypeDefault valueDescription
objectConstructortypeof BaseObjectnullSpecify class. (Clear all cached instances if not set)

Returns ​

void

Inherited from ​

BoundingBoxData.clearPool


setMaxCount() ​

ts
static setMaxCount(objectConstructor: typeof BaseObject, maxCount: number): void;

Defined in: core/BaseObject.ts:72

Set the maximum cache count of the specify object pool.

Parameters ​

ParameterTypeDescription
objectConstructortypeof BaseObjectThe specify class. (Set all object pools max cache count if not set)
maxCountnumberMax count.

Returns ​

void

Inherited from ​

BoundingBoxData.setMaxCount


toString() ​

ts
static toString(): string;

Defined in: model/BoundingBoxData.ts:110

Returns ​

string

Overrides ​

BoundingBoxData.toString

Released under the MIT License.