VoxelPrimitive

new Cesium.VoxelPrimitive(options)

A primitive that renders voxel data from a VoxelProvider.
参数名称 类型 描述信息
options object 可选 Object with the following properties:
参数名称 类型 默认值 描述信息
provider VoxelProvider 可选 The voxel provider that supplies the primitive with tile data.
modelMatrix Matrix4 Matrix4.IDENTITY 可选 The model matrix used to transform the primitive.
customShader CustomShader 可选 The custom shader used to style the primitive.
clock Clock 可选 The clock used to control time dynamic behavior.
Experimental

This feature is not final and is subject to change without Cesium's standard deprecation policy.

参考:

成员(属性)

Gets the bounding sphere.
The ClippingPlaneCollection used to selectively disable rendering the primitive.
Gets or sets the custom shader. If undefined, VoxelPrimitive.DefaultCustomShader is set.

readonly customShaderCompilationEvent : Event

Gets an event that is raised whenever a custom shader is compiled.
Gets or sets whether or not to render debug visualizations.
Gets or sets whether or not to test against depth when rendering.
Gets the voxel dimensions.
Gets or sets whether or not the primitive should update when the view changes.
Gets or sets the maximum bounds in the shape's local coordinate system. Voxel data is stretched or squashed to fit the bounds.
Gets or sets the maximum clipping location in the shape's local coordinate system. Any voxel content outside the range is clipped.

readonly maximumValues : Array.<Array.<number>>

Gets the maximum value per channel of the voxel data.
Gets or sets the minimum bounds in the shape's local coordinate system. Voxel data is stretched or squashed to fit the bounds.
Gets or sets the minimum clipping location in the shape's local coordinate system. Any voxel content outside the range is clipped.

readonly minimumValues : Array.<Array.<number>>

Gets the minimum value per channel of the voxel data.
Gets the model matrix.

nearestSampling : boolean

Gets or sets the nearest sampling.
Gets the oriented bounding box.
Gets the VoxelProvider associated with this primitive.
Gets a value indicating whether or not the primitive is ready for use.

screenSpaceError : number

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.
Gets the shape type.
Gets or sets whether or not this primitive should be displayed.
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.

方法

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.

Once an object is destroyed, it should not be used; calling any function other than isDestroyed will result in a DeveloperError exception. Therefore, assign the return value (undefined) to the object as done in the example.
Throws:
  • DeveloperError : This object was destroyed, i.e., destroy() was called.
使用示例:
voxelPrimitive = voxelPrimitive && voxelPrimitive.destroy();
参考:

isDestroyed()boolean

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

If this object was destroyed, it should not be used; calling any function other than isDestroyed will result in a DeveloperError exception.
返回值:
true if this object was destroyed; otherwise, false.
参考: