ClippingPlaneCollection

new Cesium.ClippingPlaneCollection(options)

Specifies a set of clipping planes. Clipping planes selectively disable rendering in a region on the outside of the specified list of Plane objects.
Name Type Description
options Object optional Object with the following properties:
Name Type Default Description
planes Array.<Plane> [] optional An array of up to 6 Plane objects used to selectively disable rendering on the outside of each plane.
enabled Boolean true optional Determines whether the clipping planes are active.
modelMatrix Matrix4 Matrix4.IDENTITY optional The 4x4 transformation matrix specifying an additional transform relative to the clipping planes original coordinate system.
unionClippingRegions Boolean false optional If true, a region will be clipped if included in any plane in the collection. Otherwise, the region to be clipped must intersect the regions defined by all planes in this collection.
edgeColor Color Color.WHITE optional The color applied to highlight the edge along which an object is clipped.
edgeWidth Number 0.0 optional The width, in pixels, of the highlight applied to the edge along which an object is clipped.

Members

staticconstantCesium.ClippingPlaneCollection.MAX_CLIPPING_PLANES : number

The maximum number of supported clipping planes.
The color applied to highlight the edge along which an object is clipped.
Default Value: Color.WHITE
The width, in pixels, of the highlight applied to the edge along which an object is clipped.
Default Value: 0.0
Determines whether the clipping planes are active.
Default Value: true

readonlylength : Number

Returns the number of planes in this collection. This is commonly used with ClippingPlaneCollection#get to iterate over all the planes in the collection.
The 4x4 transformation matrix specifying an additional transform relative to the clipping planes original coordinate system.
Default Value: Matrix4.IDENTITY

unionClippingRegions : Boolean

If true, a region will be clipped if included in any plane in the collection. Otherwise, the region to be clipped must intersect the regions defined by all planes in this collection.
Default Value: false

Methods

staticCesium.ClippingPlaneCollection.isSupported()Boolean

Determines if rendering with clipping planes is supported.
Returns:
true if ClippingPlaneCollections are supported; otherwise, returns false
Adds the specified Plane to the collection to be used to selectively disable rendering on the outside of each plane. Use ClippingPlaneCollection#unionClippingRegions to modify how modify the clipping behavior of multiple planes.
Name Type Description
plane Plane The plane to add to the collection.
Throws:
  • DeveloperError : The plane added exceeds the maximum number of supported clipping planes.
See:
Duplicates this ClippingPlaneCollection instance.
Name Type Description
result ClippingPlaneCollection optional The object onto which to store the result.
Returns:
The modified result parameter or a new ClippingPlaneCollection instance if one was not provided.

contains(plane)Boolean

Checks whether this collection contains the given plane.
Name Type Description
plane Plane optional The plane to check for.
Returns:
true if this collection contains the plane, false otherwise.
See:
Returns the plane in the collection at the specified index. Indices are zero-based and increase as planes are added. Removing a plane shifts all planes after it to the left, changing their indices. This function is commonly used with ClippingPlaneCollection#length to iterate over all the planes in the collection.
Name Type Description
index Number The zero-based index of the plane.
Returns:
The plane at the specified index.
See:

remove(plane)Boolean

Removes the first occurrence of the given plane from the collection.
Name Type Description
plane Plane
Returns:
true if the plane was removed; false if the plane was not found in the collection.
See:
Removes all planes from the collection.
See: