Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Clipping

Manages general clipping planes in a View.

Anything behind (on the opposite side of the plane normal) the given planes is hidden.

Note: The ug.RemoteModel has clipping support connect to cutting planes. These are handled separately, and the clipping planes for cutting planes will not show up here.

Bounded clipping planes

C3 supports bounded clipping planes. This allows for cutting out parts of the model in many different ways. By default a clipping plane will clip an object/fragment if it is behind the specified plane (on the opposite side of the plane normal). Bounded clipping planes can be created by assigning all the wanted planes the same group ID when adding them, and then setting the clipping criteria for the group to ClippingCriteria.BehindAllPlanes.

You can access the clipping object with the View.clipping property.

Hierarchy

  • Clipping

Index

Accessors

Readonly planeCount

planeCount: number

The number of clipping planes in the view

Methods

addPlane

  • addPlane(plane: Plane, groupId?: number): void
  • Adds a clipping plane to the view.

    By default the plane clips anything behind the plane (on the opposite side of the plane normal). This can be changed by specifying the clipping criteria for the plane group to which this plane belongs using Clipping.setGroupClippingCriteria

    Parameters

    • plane: Plane
    • Default value groupId: number = -1

    Returns void

getGroupId

  • getGroupId(index: number): number
  • Return the group id of the plane at the specified index

    Parameters

    • index: number

    Returns number

getPlane

  • getPlane(index: number): Plane
  • Return the Plane at the given index

    Parameters

    • index: number

    Returns Plane

getPlaneArray

  • getPlaneArray(): ReadonlyArray<Plane>
  • Returns a readonly array of all the planes in the view

    Returns ReadonlyArray<Plane>

removeAllPlanes

  • removeAllPlanes(): void
  • Removes all clipping planes in the view

    Also clears any plane groups and clipping criteria that has been specified

    Returns void

removePlane

  • removePlane(index: number): void
  • Remove the clipping plane at the given index

    Parameters

    • index: number

    Returns void

setGroupClippingCriteria

  • setGroupClippingCriteria(groupId: number, groupClippingCriteria: ClippingCriteria): void
  • Sets clipping criteria for the specified group of planes

    Parameters

    Returns void

setPlane

  • setPlane(index: number, plane: Plane): void
  • Sets a clipping plane at the given index.

    By default the plane clips anything behind the plane (on the opposite side of the plane normal).

    Parameters

    • index: number
    • plane: Plane

    Returns void

Generated using TypeDoc