API / geotoolkit3d / scene / reservoir / hexahedral / ReservoirGrid / 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.
↳
ReservoirGrid
Constructors
Properties
Methods
Properties
▪ Static ADDITIONAL_PROPERTY_SIZE: number
▪ Static ESTIMATE_RAM_PER_CELL: number
▪ Static ESTIMATE_RAM_PER_CELL_INTERSECTION: number
▪ Static ESTIMATE_VRAM_PER_CELL: number
▪ Static MAX_VALUES_PER_ELEMENT: number
Methods
▸ add(object): ReservoirGrid
Adds object as child of this object.
| Name | Type | Description |
|---|---|---|
object | Object3D<Object3DEventMap> | Object3D<Object3DEventMap>[] | object |
this
▸ 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
| Name | Type | Description |
|---|---|---|
scene | Scene | The scene |
camera | Camera | The camera used for this render phase. |
plot | Plot | The 3D plot |
renderer | WebGLRenderer | The renderer |
AbstractReservoirGrid.afterRender
▸ 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
| Name | Type | Description |
|---|---|---|
scene | Scene | The scene |
camera | Camera | The camera used for this render phase. |
plot | Plot | The 3D plot |
renderer | WebGLRenderer | The renderer |
AbstractReservoirGrid.beforeRender
▸ deleteAdditionalCellData(name): void
Delete a previously defined additional cell data.
| Name | Type | Description |
|---|---|---|
name | string | The name of the additional data to delete. |
void
▸ dispose(): void
Dispose this reservoir visual, along its ReservoirData.
void
▸ getBoundingBox(): Box3
Get the bounding box of this Reservoir Grid (in local coordinates).
Box3
bbox
▸ 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
BufferGeometry<NormalBufferAttributes>
▸ getClassName(): string
string
IIntersectablePolyhedron.getClassName
AbstractReservoirGrid.getClassName
▸ getColorProvider(): RgbaColor | ColorProvider
Return the color provider of the intersectable.
IIntersectablePolyhedron.getColorProvider
▸ getData(): ReservoirData
Get the reservoir data, holding the cells positions and values.
data
▸ getFilteredCellsCount(): number
Return the number of cells resulting from the user's filter.
number
▸ 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.)
number
the total filtered cells volume.
▸ 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.
▸ 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.
Mesh<BufferGeometry<NormalBufferAttributes>, Material | Material[], Object3DEventMap>
▸ getMesh(): Mesh<BufferGeometry<NormalBufferAttributes>, Material | Material[], Object3DEventMap>
Return the mesh representing the polyhderons to be intersected.
Mesh<BufferGeometry<NormalBufferAttributes>, Material | Material[], Object3DEventMap>
IIntersectablePolyhedron.getMesh
▸ getOptions(): OptionsBaseOut
Get this Reservoir Grid options.
AbstractReservoirGrid.getOptions
▸ 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.
| Name | Type | Description |
|---|---|---|
polyhedronIndex | number | the index of the polyhedron |
target | PolyhedronCellData | result |
void
IIntersectablePolyhedron.getPolyhedron
▸ getPolyhedronCount(): number
Return the total number of Polyhedrons contained by this object.
number
IIntersectablePolyhedron.getPolyhedronCount
▸ 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.
| Name | Type | Description |
|---|---|---|
target | Box3 | result |
void
IIntersectablePolyhedron.getPolyhedronsBoundingBox
▸ 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.)
number
▸ getSelectedIJKIndex(): IJKIndex
Get IJK info of selected/highlighted cell.
▸ getVisible(): boolean
Get visible
boolean
true, if object is visible
AbstractReservoirGrid.getVisible
▸ 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.
| Name | Type | Description |
|---|---|---|
Optional ijk | number[] | the cell ijk position to highlight, or null to remove previous highlight. |
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(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.
| Name | Type | Description |
|---|---|---|
Optional index | number | the cell index to highlight, or null to remove previous highlight. |
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<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.
| Name |
|---|
T |
| Name | Type | Description |
|---|---|---|
Optional event | Event<T> | The event to fire |
AbstractReservoirGrid.invalidateObject
▸ 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.
| Name | Type |
|---|---|
index | number |
boolean
▸ isDisposed(): boolean
Returns whether this object has been disposed
boolean
AbstractReservoirGrid.isDisposed
▸ isIJKValidInFilter(ijk): boolean
Return true if the given IJK is valid by the IJK filter of ReservoirGrid, false if is filtered out.
| Name | Type |
|---|---|
ijk | number[] | IJKIndex |
boolean
▸ 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).
| Name | Type |
|---|---|
polyhedronIndex | number |
boolean
true if filtered out, otherwise false
IIntersectablePolyhedron.isPolyhedronIndexFilteredOut
▸ isSelectable(): boolean
Return if this object can be picked/selected (see RendererPicking).
boolean
AbstractReservoirGrid.isSelectable
▸ 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.
| Name | Type |
|---|---|
value | number |
boolean
▸ notify(type, source, args?): ReservoirGrid
Notify listeners
| Name | Type | Description |
|---|---|---|
type | string | event types |
source | any | of the event |
Optional args | any | arguments of the event |
this
▸ 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.
| Name | Type | Description |
|---|---|---|
Optional type | string | type of the event |
Optional callback | EventListener | function to be called |
this
▸ off<E>(type, callback): ReservoirGrid
| Name | Type |
|---|---|
E | extends string |
| Name | Type |
|---|---|
type | E |
callback | (eventType: E, sender: ReservoirGrid, args: EventMap[E]) => void |
▸ 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.
| Name | Type | Description |
|---|---|---|
type | string | type of event or property |
callback | EventListener | to be called |
Optional options | Options | options of subscription |
this
▸ on<E>(type, callback, options?): ReservoirGrid
| Name | Type |
|---|---|
E | extends string |
| Name | Type |
|---|---|
type | E |
callback | (eventType: E, sender: ReservoirGrid, args: EventMap[E]) => void |
Optional options | Options |
▸ 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.
| Name | Type | Description |
|---|---|---|
metrics | PerformanceMetrics | The performance metrics. |
AbstractReservoirGrid.onStatsUpdated
▸ Protected onVisibilityChanged(): void
This method is called if visibility is changed. Send event Events.VisibilityChanged
void
AbstractReservoirGrid.onVisibilityChanged
▸ remove(object): ReservoirGrid
Removes object as child of this object.
| Name | Type | Description |
|---|---|---|
object | Object3D<Object3DEventMap> | Object3D<Object3DEventMap>[] | object |
this
▸ removeHighlightShape(): void
Remove the highlight effect on the selected shape.
void
AbstractReservoirGrid.removeHighlightShape
▸ 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.
| Name | Type |
|---|---|
cellsValues | CellsValues |
▸ 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.
| Name | Type |
|---|---|
options | OptionsBase |
AbstractReservoirGrid.setOptions
▸ setPosition(position): ReservoirGrid
Set Object's local position.
| Name | Type | Description |
|---|---|---|
position | Object | local position |
Optional position.x | number | |
Optional position.y | number | |
Optional position.z | number |
this
AbstractReservoirGrid.setPosition
▸ setRotation(x, y, z, order?): ReservoirGrid
Set Object's local rotation (Euler angles), in radians.
| Name | Type | Description |
|---|---|---|
x | number | x angle |
y | number | y angle |
z | number | z angle |
Optional order | EulerOrder | euler order |
this
AbstractReservoirGrid.setRotation
▸ setSelectable(selectable): void
Set if this object can be picked/selected (see RendererPicking).
| Name | Type | Description |
|---|---|---|
selectable | boolean | if can be selected |
void
AbstractReservoirGrid.setSelectable
▸ setVisible(visible, silent?): ReservoirGrid
Set visible
| Name | Type | Description |
|---|---|---|
visible | boolean | true, if object is visible |
Optional silent | boolean | true, if object shouldn't be invalidated |
this
AbstractReservoirGrid.setVisible
▸ 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.
▸ 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
| Name | Type | Description |
|---|---|---|
scene | Scene | The scene |
camera | Camera | The camera |
AbstractReservoirGrid.updateObject
▸ 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.
boolean
AbstractReservoirGrid.useOwnHighlight
▸ 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.
| Name | Type |
|---|---|
options | MemoryEstimationOptions |
▸ Static getClassName(): string
string
AbstractReservoirGrid.getClassName
▸ 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.
void