Creates visual clipping planes and mouse handlers for adjusting the clipping planes added to a
Cesium3DTileset
, Model
or Globe
.
Name | Type | Description | ||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options |
Object |
An object with the following properties:
|
Example:
// Attach 4 clipping planes to a tileset
tileset.clippingPlanes = new Cesium.ClippingPlaneCollection({
planes : [
new Cesium.ClippingPlane(new Cesium.Cartesian3(1.0, 0.0, 0.0), 100),
new Cesium.ClippingPlane(new Cesium.Cartesian3(-1.0, 0.0, 0.0), 100),
new Cesium.ClippingPlane(new Cesium.Cartesian3(0.0, 1.0, 0.0), 100),
new Cesium.ClippingPlane(new Cesium.Cartesian3(0.0, -1.0, 0.0), 100),
],
unionClippingRegions: true,
edgeWidth : 1.0
});
// Create and activate the editor to visualize and move the planes.
var clippingPlanesEditor = new Cesium.ClippingPlanesEditor({
scene: viewer.scene,
clippingPlanes: tileset.clippingPlanes,
movePlanesToOrigin: false
});
clippingPlanesEditor.activate();
Demo:
Members
Gets whether the clipping plane tool is active.
readonly clippingPlanes : ClippingPlaneCollection
Gets the clipping plane collection.
readonly scene : Scene
Gets the scene.
Methods
Activates mouse handlers.
Deactivates the mouse handlers.
Destroys the clipping planes tool.
Returns:
true if the object has been destroyed, false otherwise.
Resets the clipping planes to their start position.