This sample shows how to add and change a VoxelDynamicSection on a VoxelLayer.
A section is a plane which cuts through a voxel volume. Sections can reveal valuable information, such as soil composition and contamination across a subsurface profile. The VoxelDynamicSection allows you to define the properties of an individual dynamic section.
A VoxelDynamicSection can be added by defining a point, orientation and tilt. The point is a position on the slice plane specified as [x, y, z] in voxel space for both XYZ and XYZT volumes, and as [x, y, t] for XYT volumes. Properties of voxel space are defined in VoxelVolume. sizeInVoxels contains the volume size in voxels and volumeType returns the type of the current volume. The VoxelDynamicSection rotates counterclockwise as the value of the orientation increases.
const vxlVolume = vxlLayer.getVolume(null);
const volSize = vxlVolume.sizeInVoxels;
const volType = vxlVolume.volumeType;
A horizontal section through the middle of the volume can be defined with a tilt and orientation of zero:
let zValue = Math.floor(volSize[2] / 2);
let zSection = new VoxelDynamicSection({
"orientation": 0,
"tilt": 0,
"point": [0, 0, zValue]});
Point, orientation and tilt can be modified with real-time rendering updates.