Class: VolumeLayer
Defined in: plot3d/volume.ts:92
Direct volume rendering: GPU raymarching through a 3D texture with front-to-back alpha compositing and a colormap transfer function. Draws the volume's bounding box (back faces) and integrates each ray across the box interior.
Implements
Constructors
Constructor
new VolumeLayer(gl, opts): VolumeLayer;Defined in: plot3d/volume.ts:112
Parameters
| Parameter | Type |
|---|---|
gl | WebGL2RenderingContext |
opts | VolumeOptions |
Returns
VolumeLayer
Properties
id
readonly id: string;Defined in: plot3d/volume.ts:93
Implementation of
name?
readonly optional name?: string;Defined in: plot3d/volume.ts:94
Series name for the legend (optional).
Implementation of
Methods
bounds3()
bounds3(): Bounds3;Defined in: plot3d/volume.ts:205
Returns
Implementation of
colorInfo()
colorInfo(): ColorInfo;Defined in: plot3d/volume.ts:207
Colormap + value range for a colorbar, if this layer is colormapped.
Returns
Implementation of
dispose()
dispose(): void;Defined in: plot3d/volume.ts:247
Returns
void
Implementation of
draw()
draw(gl, mvp): void;Defined in: plot3d/volume.ts:219
Parameters
| Parameter | Type |
|---|---|
gl | WebGL2RenderingContext |
mvp | Mat4 |
Returns
void
Implementation of
setCamera()
setCamera(worldEye): void;Defined in: plot3d/volume.ts:210
Set the camera position in world space; converted to the volume's [0,1] local space.
Parameters
| Parameter | Type |
|---|---|
worldEye | [number, number, number] |
Returns
void
setData()
setData(values): void;Defined in: plot3d/volume.ts:201
Stream a new scalar volume (same dims); re-uploads the 3D texture. Call plot.refresh() after.
Parameters
| Parameter | Type |
|---|---|
values | ArrayLike<number> |
Returns
void