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 IonSdkMeasurements.ClippingPlaneCollection({
planes : [
new IonSdkMeasurements.ClippingPlane(new Cesium.Cartesian3(1.0, 0.0, 0.0), 100),
new IonSdkMeasurements.ClippingPlane(new Cesium.Cartesian3(-1.0, 0.0, 0.0), 100),
new IonSdkMeasurements.ClippingPlane(new Cesium.Cartesian3(0.0, 1.0, 0.0), 100),
new IonSdkMeasurements.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 IonSdkMeasurements.ClippingPlanesEditor({
scene: viewer.scene,
clippingPlanes: tileset.clippingPlanes,
movePlanesToOrigin: false
});
clippingPlanesEditor.activate();
Demo:
Members
readonly active : Boolean
packages/ion-sdk-measurements/Source/ClippingPlanesEditor/ClippingPlanesEditor.js 150
Gets whether the clipping plane tool is active.
readonly clippingPlanes : ClippingPlaneCollection
packages/ion-sdk-measurements/Source/ClippingPlanesEditor/ClippingPlanesEditor.js 172
Gets the clipping plane collection.
readonly scene : Scene
packages/ion-sdk-measurements/Source/ClippingPlanesEditor/ClippingPlanesEditor.js 161
Gets the scene.
Methods
Activates mouse handlers.
Deactivates the mouse handlers.
Destroys the clipping planes tool.
isDestroyed() → Boolean
packages/ion-sdk-measurements/Source/ClippingPlanesEditor/ClippingPlanesEditor.js 546
Returns:
true if the object has been destroyed, false otherwise.
Resets the clipping planes to their start position.