Last updated

API / geotoolkit3d / util / intersection / IOverlayableObject / IOverlayableObject

Class: IOverlayableObject

intersection.IOverlayableObject.IOverlayableObject

Define an interface for 3D object with overlay capabilities.
Overlayable objects should have a rectangular coplanar shape, that can be deduced by using the .getCorner() method.
This interface is intended for internal usage only.

Interface

Implemented by

Table of contents

Constructors
Methods

Contents

Constructors

new IOverlayableObject()

new IOverlayableObject()

Methods

getClassName

getClassName(): string

Returns

string


getCorner

Abstract getCorner(index, target?): Vector3

Return the world position of a specific corner of this overlayable (rectangular) object.

Example

The indices represent the 4 corners of the overlayable object like so:
0---1
|   |
2---3

Parameters

Name Type Description
indexnumberIndex of the corner, from 0 to 3.
Optional targetVector3Optional point Vector3 to avoid unnecessary object creation. Will be updated and returned if provided.

Returns

Vector3


getLocalCorner

Abstract getLocalCorner(index, target?): Vector3

Return the local position of a specific corner of this overlayable (rectangular) object.

Example

The indices represent the 4 corners of the overlayable object like so:
0---1
|   |
2---3

Parameters

Name Type Description
indexnumberIndex of the corner, from 0 to 3.
Optional targetVector3Optional point Vector3 to avoid unnecessary object creation. Will be updated and returned if provided.

Returns

Vector3


getMesh

Abstract getMesh(): Mesh<BufferGeometry<NormalBufferAttributes>, Material | Material[], Object3DEventMap>

Return the Three.js Mesh of this overlayable object.
Used in intersections to compute the object boundaries, to generate transformations for the overlay.

Returns

Mesh<BufferGeometry<NormalBufferAttributes>, Material | Material[], Object3DEventMap>


getOverlay

Abstract getOverlay(): Group<Node>

Return the current 2D Shape group used to render the overlay.

Returns

Group<Node>


getOverlayTextureBounds

Abstract getOverlayTextureBounds(): Rect

Return the overlay texture bounds, (unit is in pixel).

Returns

Rect


setOverlay

Abstract setOverlay(group): void

Set the current 2D Shape group used to render the overlay.

Parameters

Name Type
groupGroup<Node>

Returns

void


getClassName

Static getClassName(): string

Returns

string