Skip to main content

CubeGpuRenderer

Low-level Cesium primitive that keeps cube values and colormapping on the GPU.

Constructors​

Constructor​

new CubeGpuRenderer(options): CubeGpuRenderer;

Parameters​

ParameterType
optionsCubeGpuRendererOptions

Returns​

CubeGpuRenderer

Methods​

clearCrossSection()​

clearCrossSection(): void;

Clears the cross-section, reverting to the default slice rendering.

Returns​

void


destroy()​

destroy(): undefined;

Destroys the renderer, releasing all associated resources.

Returns​

undefined


isDestroyed()​

isDestroyed(): boolean;

Checks if the renderer has been destroyed.

Returns​

boolean

True if the renderer has been destroyed, false otherwise.


setCrossSection()​

setCrossSection(start, end): void;

Updates the rendered slices based on the provided cross-section points.

Parameters​

ParameterTypeDescription
startCubeCrossSectionPointThe starting point of the cross-section.
endCubeCrossSectionPointThe ending point of the cross-section.

Returns​

void


setSlices()​

setSlices(
latitude,
longitude,
elevation
): void;

Updates the rendered slices based on the provided indices.

Parameters​

ParameterTypeDescription
latitudenumberThe index of the latitude slice to display.
longitudenumberThe index of the longitude slice to display.
elevationnumberThe index of the elevation slice to display.

Returns​

void


setStyle()​

setStyle(
colors,
min,
max,
opacity
): void;

Updates the rendered style based on the provided color scale and opacity.

Parameters​

ParameterTypeDescription
colorsstring[] | number[][]The color scale to use for rendering.
minnumberThe minimum value of the color scale.
maxnumberThe maximum value of the color scale.
opacitynumberThe opacity of the rendered cube.

Returns​

void


setVerticalLayout()​

setVerticalLayout(verticalExaggeration, elevationMode): void;

Updates the vertical layout of the cube based on the provided vertical exaggeration and elevation mode.

Parameters​

ParameterTypeDescription
verticalExaggerationnumberThe factor by which to exaggerate the vertical dimension.
elevationModeElevationModeThe mode to use for rendering elevation ('height' or 'depth').

Returns​

void


update()​

update(frameState): void;

Updates the renderer, rebuilding commands and textures as needed.

Parameters​

ParameterTypeDescription
frameStateanyThe current frame state from Cesium.

Returns​

void


supportReason()​

static supportReason(scene, dimensions): string | null;

Parameters​

ParameterType
sceneany
dimensions[number, number, number]

Returns​

string | null

Properties​

show​

show: boolean = true;