Last updated

API / geotoolkit3d / scene / reservoir / hexahedral / ReservoirGrid / ReservoirGrid

Class: ReservoirGrid

hexahedral.ReservoirGrid.ReservoirGrid

A 3D Reservoir object.

This object represents the 3D visualization of a reservoir grid with an optional attribute used for coloring.
The reservoir cell's geometry and values is defined by the given ReservoirData, and the cell visibility is determined by user-defined filters.

The skeleton (outline) is drawn simultaneously as the cell in the GPU fragment stage, so it doesn't need extra CPU/memory resources.

The default DisplayMode is showing mesh, skeleton, but not horizons.

Note: ReservoirGrid works with transparent colors, but for correct visualization occlusion will be switched off. So performance in case of transparent colors will be worse than with only opaque colors.

Hierarchy

Implements

Table of contents

Constructors
Properties
Methods

Contents

Constructors

new ReservoirGrid(options)

new ReservoirGrid(options)

Parameters

Name Type
optionsOptions

Overrides

AbstractReservoirGrid.constructor

Properties

ADDITIONAL_PROPERTY_SIZE

Static ADDITIONAL_PROPERTY_SIZE: number


ESTIMATE_RAM_PER_CELL

Static ESTIMATE_RAM_PER_CELL: number


ESTIMATE_RAM_PER_CELL_INTERSECTION

Static ESTIMATE_RAM_PER_CELL_INTERSECTION: number


ESTIMATE_VRAM_PER_CELL

Static ESTIMATE_VRAM_PER_CELL: number


MAX_VALUES_PER_ELEMENT

Static MAX_VALUES_PER_ELEMENT: number

Methods

add

add(object): ReservoirGrid

Adds object as child of this object.

Parameters

Name Type Description
objectObject3D<Object3DEventMap> | Object3D<Object3DEventMap>[]object

Returns

ReservoirGrid

this

Inherited from

AbstractReservoirGrid.add


afterRender

afterRender(scene, camera, plot, renderer): ReservoirGrid

This function is called after rendering and can update this object's content.

It should not trigger any invalidateObject though.
Note that it is not necessary nor recommended to explicitly call afterRender on this object's children as beforeRender will be called on all nodes present in the scene.

This will be executed after the transformations simplification.

See

Plot for more details on the render steps

Parameters

Name Type Description
sceneSceneThe scene
cameraCameraThe camera used for this render phase.
plotPlotThe 3D plot
rendererWebGLRendererThe renderer

Returns

ReservoirGrid

Inherited from

AbstractReservoirGrid.afterRender


beforeRender

beforeRender(scene, camera, plot, renderer): ReservoirGrid

This function is called prior to rendering and can update this object's content.

It should not trigger any invalidateObject though.
Note that it is not necessary nor recommended to explicitly call beforeRender on this object's children as beforeRender will be called on all nodes present in the scene.

This will be executed after the transformations simplification.

See

Plot for more details on the render steps

Parameters

Name Type Description
sceneSceneThe scene
cameraCameraThe camera used for this render phase.
plotPlotThe 3D plot
rendererWebGLRendererThe renderer

Returns

ReservoirGrid

Inherited from

AbstractReservoirGrid.beforeRender


deleteAdditionalCellData

deleteAdditionalCellData(name): void

Delete a previously defined additional cell data.

Parameters

Name Type Description
namestringThe name of the additional data to delete.

Returns

void


dispose

dispose(): void

Dispose this reservoir visual, along its ReservoirData.

Returns

void

Overrides

AbstractReservoirGrid.dispose


getBoundingBox

getBoundingBox(): Box3

Get the bounding box of this Reservoir Grid (in local coordinates).

Returns

Box3

bbox


getCellGeometry

getCellGeometry(ijk, scale, plot?): BufferGeometry<NormalBufferAttributes>

Build a cell geometry from an existing cell index ijk, that overlaps the aforesaid cell depending on the value entered for the scale parameter. Scale is the percentage of overlapping.
The ijk array is the index of the cell in the reservoir:
For example, if i=0, j= 4 and z=2, the array will be
[ 0, 4, 2 ]
If plot is specified, the Geometry will be adapted in "business" coordinates else it will be in local coordinates
Business coordinates are obtained using Helper.localToBusiness

Parameters

Name Type
ijknumber[] | IJKIndex
scalenumber
Optional plotPlot

Returns

BufferGeometry<NormalBufferAttributes>


getClassName

getClassName(): string

Returns

string

Implementation of

IIntersectablePolyhedron.getClassName

Inherited from

AbstractReservoirGrid.getClassName


getColorProvider

getColorProvider(): RgbaColor | ColorProvider

Return the color provider of the intersectable.

Returns

RgbaColor | ColorProvider

Implementation of

IIntersectablePolyhedron.getColorProvider


getData

getData(): ReservoirData

Get the reservoir data, holding the cells positions and values.

Returns

ReservoirData

data


getFilteredCellsCount

getFilteredCellsCount(): number

Return the number of cells resulting from the user's filter.

Returns

number


getFilteredCellsVolume

getFilteredCellsVolume(): number

Return the volume occupied by the remaining cells resulting from the user's filter.
Each cell volume is computed based on the cell's xyz corner coordinates.
The unit of the volume measurement is based on the unit used in cells coordinates, to user discretion. (ex: if cells coordinates are in meters, then the volume will be in cubic meters. If feet, then cubic feet, and so on.)

Returns

number

the total filtered cells volume.


getFilteredReservoirData

getFilteredReservoirData(): ReservoirData

Return a new instance of ReservoirData resulting from the user's filter, the cells that are filtered in (are displayed), based on IJK filter, value filter, and the user filter. If no cell is currently visible, null will be returned instead as no ReservoirData can be created.

Returns

ReservoirData


getHighlightedObjects

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

Get the selected cell geometry. Used in highlighting logic.

Deprecated

since 5.0, was not meant to be public. To retrieve the currently selected cell, please use getCellGeometry instead.

Returns

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


getMesh

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

Return the mesh representing the polyhderons to be intersected.

Returns

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

Implementation of

IIntersectablePolyhedron.getMesh


getOptions

getOptions(): OptionsBaseOut

Get this Reservoir Grid options.

Returns

OptionsBaseOut

Overrides

AbstractReservoirGrid.getOptions


getPolyhedron

getPolyhedron(polyhedronIndex, target): void

Return the polyhedron data at given index.
Vertices coordinates must be in the local coordinate space of the mesh returned by getMesh method.

Parameters

Name Type Description
polyhedronIndexnumberthe index of the polyhedron
targetPolyhedronCellDataresult

Returns

void

Implementation of

IIntersectablePolyhedron.getPolyhedron


getPolyhedronCount

getPolyhedronCount(): number

Return the total number of Polyhedrons contained by this object.

Returns

number

Implementation of

IIntersectablePolyhedron.getPolyhedronCount


getPolyhedronsBoundingBox

getPolyhedronsBoundingBox(target): void

Return the bounding box of the polyhedrons.
The bounding box should be calculated directly from the polyhedrons' geometry vertex positions, representing the bounding box in the polyhedrons' local space.
The box coordinates must be in the local coordinate space of the mesh returned by getMesh method.

Parameters

Name Type Description
targetBox3result

Returns

void

Implementation of

IIntersectablePolyhedron.getPolyhedronsBoundingBox


getReservoirFullVolume

getReservoirFullVolume(): number

Returns the total volume of this reservoir.
Computed by the sum of the volume of every cell, filters are ignored.
The unit of the volume measurement is based on the unit used in cells coordinates, to user discretion. (ex: if cells coordinates are in meters, then the volume will be in cubic meters. If feet, then cubic feet, and so on.)

Returns

number


getSelectedIJKIndex

getSelectedIJKIndex(): IJKIndex

Get IJK info of selected/highlighted cell.

Returns

IJKIndex


getVisible

getVisible(): boolean

Get visible

Returns

boolean

true, if object is visible

Inherited from

AbstractReservoirGrid.getVisible


highlightCellByIJK

highlightCellByIJK(ijk?): boolean

Highlight the designated cell ijk in the format [i, j, k].
Set the argument to null to remove the current cell highlight.
Only one cell can be highlighted at the same time. Cells highlighted using this method will not be automatically removed by selection tools, unless another cell from this reservoir is selected.

Parameters

Name Type Description
Optional ijknumber[]the cell ijk position to highlight, or null to remove previous highlight.

Returns

boolean

true if the cell ijk is valid, false if the given ijk match no cell. Null/no value is valid and returns true.


highlightCellByIndex

highlightCellByIndex(index?): boolean

Highlight the designated cell index. Set the index to null to remove the current cell highlight. Return true on success, false if the index is not valid.
Only one cell can be highlighted at the same time. Cells highlighted using this method will not be automatically removed by selection tools, unless another cell from this reservoir is selected.

Parameters

Name Type Description
Optional indexnumberthe cell index to highlight, or null to remove previous highlight.

Returns

boolean

true if the cell index is valid, false if the index is out of bounds. Null/no value is valid and returns true.


invalidateObject

invalidateObject<T>(event?): ReservoirGrid

Notifies this object and its parent that this object has been invalidated.
If this object is in a Plot, it will be marked as dirty and will trigger a rendering cycle.

Type parameters

Name
T

Parameters

Name Type Description
Optional eventEvent<T>The event to fire

Returns

ReservoirGrid

Inherited from

AbstractReservoirGrid.invalidateObject


isCellIndexFilteredOut

isCellIndexFilteredOut(index): boolean

Return true if the cell of the given index is filtered out (is not displayed), based on both IJK filter, value filter, and the user filter.

Parameters

Name Type
indexnumber

Returns

boolean


isDisposed

isDisposed(): boolean

Returns whether this object has been disposed

Returns

boolean

Inherited from

AbstractReservoirGrid.isDisposed


isIJKValidInFilter

isIJKValidInFilter(ijk): boolean

Return true if the given IJK is valid by the IJK filter of ReservoirGrid, false if is filtered out.

Parameters

Name Type
ijknumber[] | IJKIndex

Returns

boolean


isPolyhedronIndexFilteredOut

isPolyhedronIndexFilteredOut(polyhedronIndex): boolean

Return if the polyhedron at given index is filtered out.
Polyhedron objects like ReservoirGrid can contain multiple polyhedrons, which can be filtered out by user settings.
This method allow to express whether this specific polyhedron is filtered out (and should be excluded from intersection).

Parameters

Name Type
polyhedronIndexnumber

Returns

boolean

true if filtered out, otherwise false

Implementation of

IIntersectablePolyhedron.isPolyhedronIndexFilteredOut


isSelectable

isSelectable(): boolean

Return if this object can be picked/selected (see RendererPicking).

Returns

boolean

Inherited from

AbstractReservoirGrid.isSelectable


isValueValidInFilter

isValueValidInFilter(value): boolean

Return true if the given value is bounded by the value filter of this ReservoirGrid, false if the value is filtered out.
Also return false if the value is not a number or equal to the defined nullvalue.

Parameters

Name Type
valuenumber

Returns

boolean


notify

notify(type, source, args?): ReservoirGrid

Notify listeners

Parameters

Name Type Description
typestringevent types
sourceanyof the event
Optional argsanyarguments of the event

Returns

ReservoirGrid

this

Inherited from

AbstractReservoirGrid.notify


off

off(type?, callback?): ReservoirGrid

Detach listener on event. Calling .off() with no arguments removes all attached listeners. Calling .off(type) with no callback removes all attached listeners for specific type.

Parameters

Name Type Description
Optional typestringtype of the event
Optional callbackEventListenerfunction to be called

Returns

ReservoirGrid

this

Inherited from

AbstractReservoirGrid.off

off<E>(type, callback): ReservoirGrid

Type parameters

NameType
Eextends string

Parameters

Name Type
typeE
callback(eventType: E, sender: ReservoirGrid, args: EventMap[E]) => void

Returns

ReservoirGrid

Inherited from

AbstractReservoirGrid.off


on

on(type, callback, options?): ReservoirGrid

Attach listener on event that will be called whenever the specified event is delivered to the target

If the callback function is already in the list of event listeners for this target, the function is not added a second time.

If a particular anonymous function is in the list of event listeners registered for a certain target, and then later in the code, an identical anonymous function is given in an "on" call, the second function will also be added to the list of event listeners for that target.

Parameters

Name Type Description
typestringtype of event or property
callbackEventListenerto be called
Optional optionsOptionsoptions of subscription

Returns

ReservoirGrid

this

Inherited from

AbstractReservoirGrid.on

on<E>(type, callback, options?): ReservoirGrid

Type parameters

NameType
Eextends string

Parameters

Name Type
typeE
callback(eventType: E, sender: ReservoirGrid, args: EventMap[E]) => void
Optional optionsOptions

Returns

ReservoirGrid

Inherited from

AbstractReservoirGrid.on


onStatsUpdated

onStatsUpdated(metrics): ReservoirGrid

This function is called when the plot has updated performance metric.
It will be called every set number of frames.
The number of frame is customizable in the plot options advancedrendering.performancemetrics.updateframeperiod and is 100 by default.

Parameters

Name Type Description
metricsPerformanceMetricsThe performance metrics.

Returns

ReservoirGrid

Inherited from

AbstractReservoirGrid.onStatsUpdated


onVisibilityChanged

Protected onVisibilityChanged(): void

This method is called if visibility is changed. Send event Events.VisibilityChanged

Returns

void

Inherited from

AbstractReservoirGrid.onVisibilityChanged


remove

remove(object): ReservoirGrid

Removes object as child of this object.

Parameters

Name Type Description
objectObject3D<Object3DEventMap> | Object3D<Object3DEventMap>[]object

Returns

ReservoirGrid

this

Inherited from

AbstractReservoirGrid.remove


removeHighlightShape

removeHighlightShape(): void

Remove the highlight effect on the selected shape.

Returns

void

Overrides

AbstractReservoirGrid.removeHighlightShape


setCellsValues

setCellsValues(cellsValues): ReservoirGrid

Change the cells values, and/or define additional cell data.
Changing cell values will change the active cells properties used with the colormap, and reset the "value" filter.
Additional cell data are named properties that can be then used in a custom filter function.
To remove additional cell data, please use ReservoirGrid.deleteAdditionalCellData.

Parameters

Name Type
cellsValuesCellsValues

Returns

ReservoirGrid


setOptions

setOptions(options): ReservoirGrid

Set this Reservoir Grid options.
Changing position data using setOptions is not allowed, as it is more expensive than creating a new Reservoir Grid.

Parameters

Name Type
optionsOptionsBase

Returns

ReservoirGrid

Overrides

AbstractReservoirGrid.setOptions


setPosition

setPosition(position): ReservoirGrid

Set Object's local position.

Parameters

Name Type Description
positionObjectlocal position
Optional position.xnumber
Optional position.ynumber
Optional position.znumber

Returns

ReservoirGrid

this

Inherited from

AbstractReservoirGrid.setPosition


setRotation

setRotation(x, y, z, order?): ReservoirGrid

Set Object's local rotation (Euler angles), in radians.

Parameters

Name Type Description
xnumberx angle
ynumbery angle
znumberz angle
Optional orderEulerOrdereuler order

Returns

ReservoirGrid

this

Inherited from

AbstractReservoirGrid.setRotation


setSelectable

setSelectable(selectable): void

Set if this object can be picked/selected (see RendererPicking).

Parameters

Name Type Description
selectablebooleanif can be selected

Returns

void

Inherited from

AbstractReservoirGrid.setSelectable


setVisible

setVisible(visible, silent?): ReservoirGrid

Set visible

Parameters

Name Type Description
visiblebooleantrue, if object is visible
Optional silentbooleantrue, if object shouldn't be invalidated

Returns

ReservoirGrid

this

Inherited from

AbstractReservoirGrid.setVisible


updateCellFilter

updateCellFilter(): ReservoirGrid

Rebuild reservoir geometry depending on filters.
Calling ReservoirGrid.setOptions() also rebuilds the reservoir.
The main use of this updateCellFilter() function is to update the reservoir when the custom filter is updated via closure variables when setOptions() is not called.

Returns

ReservoirGrid


updateObject

updateObject(scene, camera): ReservoirGrid

This function is called prior to rendering and can update this object's content.

It should not trigger any invalidateObject though.
Note that it is not necessary nor recommended to explicitly call updateObject on this object's children as updateObject will be called on all nodes present in the scene.

This will be executed before the transformations simplification.

See

Plot for more details on the render steps

Parameters

Name Type Description
sceneSceneThe scene
cameraCameraThe camera

Returns

ReservoirGrid

Inherited from

AbstractReservoirGrid.updateObject


useOwnHighlight

useOwnHighlight(): boolean

Used by the rendering pass to know whether this object have its won highlight mechanism, or should the pass itself generate a generic one.

Returns

boolean

Overrides

AbstractReservoirGrid.useOwnHighlight


estimateMemoryCapabilities

Static estimateMemoryCapabilities(options): MemoryCapabilitiesInfo

Estimate the maximum number of cells that can be created in one ReservoirGrid visual, with the given RAM/VRAM information.
With enough memory, the implementation limit for ReservoirGrid is eventually tied to Typed array allocation. This test will perform a one-time array allocation test on your device, to accurately estimate the maximum array size your browser/device is capable of. It is important to have enough memory available for this test to be accurate.

Parameters

Name Type
optionsMemoryEstimationOptions

Returns

MemoryCapabilitiesInfo


getClassName

Static getClassName(): string

Returns

string

Inherited from

AbstractReservoirGrid.getClassName


register

Static register(): void

Register object for special processing through a callback function

Example

geotoolkit3d.util.ObjectProcessor.getDefaultInstance().registerObject(this.getClassName(), callback);

Deprecated

since 5.0, to allow custom object highlighting, please instead make your Object implement the interface geotoolkit3d/scene/ICustomHighlight.

Returns

void

Inherited from

AbstractReservoirGrid.register