Skip to content

API / geotoolkit3d / util / intersection / IOverlayableObject / IOverlayableObject

Class: IOverlayableObject

intersection.IOverlayableObject.IOverlayableObject

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

Interface

Implemented by

Table of contents

Constructors
  • [new IOverlayableObject()](/solutions/geotoolkit/GeoToolkit_JS/apis/classes/geotoolkit3d.util-5.intersection.ioverlayableobject.ioverlayableobject.md#new ioverlayableobject())
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.<br>

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.<br>

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&gt;, Material | Material[], Object3DEventMap&gt;

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

Returns

Mesh<BufferGeometry<NormalBufferAttributes&gt;, Material | Material[], Object3DEventMap&gt;


getOverlay

▸ Abstract getOverlay(): Group<Node&gt;

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

Returns

Group<Node&gt;


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&gt;

Returns

void


getClassName

▸ Static getClassName(): string

Returns

string