Skip to content
Last updated

API / geotoolkit3d / scene / reservoir / hexahedral / voxel / VoxelGridGroup / VoxelGridGroup

Class: VoxelGridGroup

voxel.VoxelGridGroup.VoxelGridGroup

The Voxel grid group is a utility 3D visual that allow handling of multiple Voxel sub grids at the same time, providing convenience of use and performance improvements. (Soon with LOD support)

Hierarchy

Table of contents

Constructors
  • [new VoxelGridGroup(options)](/solutions/geotoolkit/GeoToolkit_JS/apis/classes/geotoolkit3d.scene-3.reservoir-2.hexahedral-1.voxel.voxelgridgroup.voxelgridgroup.md#new voxelgridgroup(options))
Methods

Contents

Constructors

new VoxelGridGroup(options)

• new VoxelGridGroup(options?)

Parameters

Name Type
Optional optionsOptionsBase

Overrides

AbstractReservoirGrid.constructor

Methods

add

▸ add(object): VoxelGridGroup

Adds object as child of this object.

Parameters

Name Type Description
objectObject3D<Object3DEventMap&gt; | Object3D<Object3DEventMap&gt;[]object

Returns

VoxelGridGroup

this

Inherited from

AbstractReservoirGrid.add


afterRender

▸ afterRender(scene, camera, plot, renderer): VoxelGridGroup

This function is called after rendering and can update this object's content.<br> <br> It should not trigger any invalidateObject though.<br> 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.<br> <br> This will be executed after the transformations simplification.<br> <br>

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

VoxelGridGroup

Inherited from

AbstractReservoirGrid.afterRender


beforeRender

▸ beforeRender(scene, camera, plot, renderer): VoxelGridGroup

This function is called prior to rendering and can update this object's content.<br> <br> It should not trigger any invalidateObject though.<br> 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.<br> <br> This will be executed after the transformations simplification.<br> <br>

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

VoxelGridGroup

Inherited from

AbstractReservoirGrid.beforeRender


deleteAdditionalCellData

▸ deleteAdditionalCellData(name): void

Delete a previously defined additional cell data.<br>

Parameters

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

Returns

void


dispose

▸ dispose(): void

Dispose this VoxelGridGroup, along its children.

Returns

void

Overrides

AbstractReservoirGrid.dispose


disposeVoxelGrid

▸ disposeVoxelGrid(id): VoxelGridGroup

Remove and dispose the voxel subgrid at the specified ID.

Parameters

Name Type Description
idstringthe voxel subgrid ID

Returns

VoxelGridGroup


getClassName

▸ getClassName(): string

Returns

string

Inherited from

AbstractReservoirGrid.getClassName


getColorProvider

▸ getColorProvider(): ColorProvider

Return the colorProvider for this Grid group, assuming the same colorprovider is used for all sub grids.

Returns

ColorProvider


getFilteredCellsCount

▸ getFilteredCellsCount(): number

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

Returns

number


getMetadata

▸ getMetadata(): MetaData

Return a copy of this VoxelGrid group metadata.

Returns

MetaData


getOptions

▸ getOptions(): OptionsBaseOut

Get this Voxel Grid group options.

Returns

OptionsBaseOut

Overrides

AbstractReservoirGrid.getOptions


getVisible

▸ getVisible(): boolean

Get visible

Returns

boolean

true, if object is visible

Inherited from

AbstractReservoirGrid.getVisible


getVoxelGrid

▸ getVoxelGrid(id): VoxelGrid

Return the Voxel sub grid for the specified ID, or undefined if no grid exists at this ID.

Parameters

Name Type Description
idstringthe subgrid ID.

Returns

VoxelGrid


getVoxelGridList

▸ getVoxelGridList(): VoxelGrid[]

Return all the current Voxel sub grids.

Returns

VoxelGrid[]


invalidateObject

▸ invalidateObject<T&gt;(event?): VoxelGridGroup

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

Type parameters

Name
T

Parameters

Name Type Description
Optional eventEvent<T&gt;The event to fire

Returns

VoxelGridGroup

Inherited from

AbstractReservoirGrid.invalidateObject


isDisposed

▸ isDisposed(): boolean

Returns whether this object has been disposed

Returns

boolean

Inherited from

AbstractReservoirGrid.isDisposed


isSelectable

▸ isSelectable(): boolean

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

Returns

boolean

Inherited from

AbstractReservoirGrid.isSelectable


notify

▸ notify<E&gt;(type, source, args?): VoxelGridGroup

  • Notify listeners. Parent nodes will also be notified if they are instances of geotoolkit3d.scene.Object3D

Type parameters

NameType
Eextends string

Parameters

Name Type Description
typeEevent types
sourceVoxelGridof the event
Optional argsEventMap[E]arguments of the event

Returns

VoxelGridGroup

this

Overrides

AbstractReservoirGrid.notify


off

▸ off<E&gt;(type?, callback?): VoxelGridGroup

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.

Type parameters

NameType
Eextends string

Parameters

Name Type Description
Optional typeEtype of the event
Optional callback(eventType: E, sender: VoxelGridGroup, args: EventMap[E]) => voidfunction to be called

Returns

VoxelGridGroup

this

Inherited from

AbstractReservoirGrid.off


on

▸ on<E&gt;(type, callback): VoxelGridGroup

Attach listener on event that will be called whenever the specified event is delivered to the target <p> If the callback function is already in the list of event listeners for this target, the function is not added a second time. </p> <p> 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. </p>

Type parameters

NameType
Eextends string

Parameters

Name Type Description
typeEtype of event or property
callback(eventType: E, sender: VoxelGridGroup, args: EventMap[E]) => voidto be called

Returns

VoxelGridGroup

this

Inherited from

AbstractReservoirGrid.on


onStatsUpdated

▸ onStatsUpdated(metrics): VoxelGridGroup

This function is called when the plot has updated performance metric.<br> It will be called every set number of frames.<br> 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

VoxelGridGroup

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): VoxelGridGroup

Removes object as child of this object.

Parameters

Name Type Description
objectObject3D<Object3DEventMap&gt; | Object3D<Object3DEventMap&gt;[]object

Returns

VoxelGridGroup

this

Inherited from

AbstractReservoirGrid.remove


removeHighlightShape

▸ removeHighlightShape(): void

Remove the current cell highlight effects on this voxel grid group.

Returns

void

Overrides

AbstractReservoirGrid.removeHighlightShape


setColorProvider

▸ setColorProvider(colorProvider): VoxelGridGroup

Set the colorProvider for this Grid group.

Parameters

Name Type Description
colorProviderColorProviderthe color provider

Returns

VoxelGridGroup


setOptions

▸ setOptions(options): VoxelGridGroup

Set this VoxelGrid group options.

Parameters

Name Type
optionsOptionsBase

Returns

VoxelGridGroup

Overrides

AbstractReservoirGrid.setOptions


setPosition

▸ setPosition(position): VoxelGridGroup

Set Object's local position.

Parameters

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

Returns

VoxelGridGroup

this

Inherited from

AbstractReservoirGrid.setPosition


setRotation

▸ setRotation(x, y, z, order?): VoxelGridGroup

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

Parameters

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

Returns

VoxelGridGroup

this

Inherited from

AbstractReservoirGrid.setRotation


setSelectable

▸ setSelectable(selectable): void

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

Parameters

Name Type Description
selectablebooleanif can be selected

Returns

void

Inherited from

AbstractReservoirGrid.setSelectable


setVisible

▸ setVisible(visible, silent?): VoxelGridGroup

Set visible

Parameters

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

Returns

VoxelGridGroup

this

Inherited from

AbstractReservoirGrid.setVisible


setVoxelGrid

▸ setVoxelGrid(voxelGrid, id): VoxelGridGroup

Register and add a voxel subGrid to this Voxel grid group.

Parameters

Name Type Description
voxelGridVoxelGridthe voxel sub grid to add.
idstringthe ID of the voxel subgrid, for easy retrieval.

Returns

VoxelGridGroup


updateObject

▸ updateObject(scene, camera): VoxelGridGroup

This function is called prior to rendering and can update this object's content.<br> <br> It should not trigger any invalidateObject though.<br> 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.<br> <br> This will be executed before the transformations simplification.<br> <br>

See

Plot for more details on the render steps

Parameters

Name Type Description
sceneSceneThe scene
cameraCameraThe camera

Returns

VoxelGridGroup

Inherited from

AbstractReservoirGrid.updateObject


useOwnHighlight

▸ useOwnHighlight(): boolean

Returns true if this object make its own highlight effect (like geotoolkit3d.scene.reservoir.hexahedral.ReservoirGrid) This is to prevent unnecessary executions of the costly highlight passes.

Returns

boolean

Inherited from

AbstractReservoirGrid.useOwnHighlight


getClassName

▸ Static getClassName(): string

Returns

string

Inherited from

AbstractReservoirGrid.getClassName


register

▸ Static register(): void

Register object for special processing through a callback function<br>

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