Skip to main content
Version: Next

Class: CustomObject

@cognite/reveal.CustomObject

This class encasulate a Object3D, and made it possible to add flags to it. It might be extended with more flags in the future.

Implements

Constructors

constructor

new CustomObject(object): CustomObject

Constructor

Parameters

NameType
objectObject3D<Object3DEventMap>

Returns

CustomObject

Defined in

packages/utilities/src/customObject/CustomObject.ts:25

Accessors

isPartOfBoundingBox

get isPartOfBoundingBox(): boolean

Set or get whether it should be part of the combined bounding box or not. Default is true.

Returns

boolean

Implementation of

ICustomObject.isPartOfBoundingBox

Defined in

packages/utilities/src/customObject/CustomObject.ts:42

set isPartOfBoundingBox(value): void

Parameters

NameType
valueboolean

Returns

void

Implementation of

ICustomObject.isPartOfBoundingBox

Defined in

packages/utilities/src/customObject/CustomObject.ts:46


object

get object(): Object3D<Object3DEventMap>

Get the Object3D

Returns

Object3D<Object3DEventMap>

Implementation of

ICustomObject.object

Defined in

packages/utilities/src/customObject/CustomObject.ts:33


shouldPick

get shouldPick(): boolean

Set or get whether it should be picked by the camera manager Default is false.

Returns

boolean

Implementation of

ICustomObject.shouldPick

Defined in

packages/utilities/src/customObject/CustomObject.ts:55

set shouldPick(value): void

Parameters

NameType
valueboolean

Returns

void

Implementation of

ICustomObject.shouldPick

Defined in

packages/utilities/src/customObject/CustomObject.ts:59


shouldPickBoundingBox

get shouldPickBoundingBox(): boolean

Set or get whether it should be also give the bounding box when picked by the camera Default is false.

Returns

boolean

Implementation of

ICustomObject.shouldPickBoundingBox

Defined in

packages/utilities/src/customObject/CustomObject.ts:77

set shouldPickBoundingBox(value): void

Parameters

NameType
valueboolean

Returns

void

Implementation of

ICustomObject.shouldPickBoundingBox

Defined in

packages/utilities/src/customObject/CustomObject.ts:81

Methods

getBoundingBox

getBoundingBox(target): Box3

Get the bounding box from the object

Parameters

NameType
targetBox3

Returns

Box3

Implementation of

ICustomObject.getBoundingBox

Defined in

packages/utilities/src/customObject/CustomObject.ts:67


intersectIfCloser

intersectIfCloser(intersectInput, closestDistance): undefined | CustomObjectIntersection

Intersect the object with the raycaster. This function can be overridden to provide custom intersection logic.

Parameters

NameType
intersectInputCustomObjectIntersectInput
closestDistanceundefined | number

Returns

undefined | CustomObjectIntersection

Implementation of

ICustomObject.intersectIfCloser

Defined in

packages/utilities/src/customObject/CustomObject.ts:90