VoxelPrimitive

open external class VoxelPrimitive(options: VoxelPrimitive.ConstructorOptions? = definedExternally)(source)

A primitive that renders voxel data from a VoxelProvider.

See also

Constructors

Link copied to clipboard
constructor(options: VoxelPrimitive.ConstructorOptions? = definedExternally)

Types

Link copied to clipboard
external interface ConstructorOptions

Properties

Link copied to clipboard

The event fired to indicate that all tiles that meet the screen space error this frame are loaded. The voxel primitive is completely loaded for this view.

Link copied to clipboard

Gets the bounding sphere.

Link copied to clipboard

The ClippingPlaneCollection used to selectively disable rendering the primitive.

Link copied to clipboard

Gets or sets the custom shader. If undefined, attempt to build a default custom shader appropriate to the metadata type. If that fails, use VoxelPrimitive.DefaultCustomShader.

Link copied to clipboard

Gets an event that is raised whenever a custom shader is compiled.

Link copied to clipboard
external var debugDraw: Boolean

Gets or sets whether or not to render debug visualizations.

Link copied to clipboard
external var depthTest: Boolean

Gets or sets whether or not to test against depth when rendering.

Link copied to clipboard
external val dimensions: Cartesian3

Gets the dimensions of each voxel tile, in z-up orientation. Does not include padding.

Link copied to clipboard
external var disableUpdate: Boolean

Gets or sets whether or not the primitive should update when the view changes.

Link copied to clipboard

The event fired to indicate that all tiles that meet the screen space error this frame are loaded. This event is fired once when all tiles in the initial view are loaded.

Link copied to clipboard

Gets the dimensions of one tile of the input voxel data, in the input orientation. Includes padding.

Link copied to clipboard

The event fired to indicate progress of loading new tiles. This event is fired when a new tile is requested, when a requested tile is finished downloading, and when a downloaded tile has been processed and is ready to render.

Link copied to clipboard
external var maxBounds: Cartesian3

Gets or sets the maximum bounds in the shape's local coordinate system. Voxel data is stretched or squashed to fit the bounds.

Link copied to clipboard

Gets or sets the maximum clipping location in the shape's local coordinate system. Any voxel content outside the range is clipped.

Link copied to clipboard

Gets the maximum value per channel of the voxel data.

Link copied to clipboard
external var minBounds: Cartesian3

Gets or sets the minimum bounds in the shape's local coordinate system. Voxel data is stretched or squashed to fit the bounds.

Link copied to clipboard

Gets or sets the minimum clipping location in the shape's local coordinate system. Any voxel content outside the range is clipped.

Link copied to clipboard

Gets the minimum value per channel of the voxel data.

Link copied to clipboard
external val modelMatrix: Matrix4

Gets the model matrix.

Link copied to clipboard
external var nearestSampling: Boolean

Gets or sets the nearest sampling.

Link copied to clipboard

Gets the oriented bounding box.

Link copied to clipboard
external val paddingAfter: Cartesian3

Gets the padding after the voxel data.

Link copied to clipboard

Gets the padding before the voxel data.

Link copied to clipboard
external val provider: VoxelProvider

Gets the VoxelProvider associated with this primitive.

Link copied to clipboard
external val ready: Boolean

Gets a value indicating whether or not the primitive is ready for use.

Link copied to clipboard
external var screenSpaceError: Int

Gets or sets the screen space error in pixels. If the screen space size of a voxel is greater than the screen space error, the tile is subdivided. Lower screen space error corresponds with higher detail rendering, but could result in worse performance and higher memory consumption.

Link copied to clipboard
external val shape: VoxelShapeType

Gets the shape type.

Link copied to clipboard
external var show: Boolean

Gets or sets whether or not this primitive should be displayed.

Link copied to clipboard
external var stepSize: Double

Gets or sets the step size multiplier used during raymarching. The lower the value, the higher the rendering quality, but also the worse the performance.

Link copied to clipboard
external var tileFailed: DefaultEvent

The event fired to indicate that a tile's content failed to load.

Link copied to clipboard
external var tileLoad: DefaultEvent

The event fired to indicate that a tile's content was loaded.

Link copied to clipboard
external var tileUnload: DefaultEvent

The event fired to indicate that a tile's content was unloaded.

Link copied to clipboard

This event fires once for each visible tile in a frame. This event is fired during the traversal while the frame is being rendered.

Functions

Link copied to clipboard
external fun destroy()

Destroys the WebGL resources held by this object. Destroying an object allows for deterministic release of WebGL resources, instead of relying on the garbage collector to destroy this object.

Link copied to clipboard
external fun isDestroyed(): Boolean

Returns true if this object was destroyed; otherwise, false.