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:
|
Members
-
The maximum number of supported clipping planes.
-
edgeColor : Color
-
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
-
Returns the number of planes in this collection. This is commonly used with
ClippingPlaneCollection#get
to iterate over all the planes in the collection. -
modelMatrix : Matrix4
-
The 4x4 transformation matrix specifying an additional transform relative to the clipping planes original coordinate system.
-
Default Value:
Matrix4.IDENTITY
-
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
-
Determines if rendering with clipping planes is supported.
Returns:
true
if ClippingPlaneCollections are supported; otherwise, returnsfalse
-
Adds the specified
Plane
to the collection to be used to selectively disable rendering on the outside of each plane. UseClippingPlaneCollection#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.
-
-
clone(result) → ClippingPlaneCollection
-
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. -
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. -
get(index) → Plane
-
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. -
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. -
Removes all planes from the collection.