Object3D

ClippingPlaneObject

An object which represents clipping plane.

Clipping in Verge3D is quite complex as you require several objects to render it correctly:

Stencil and cross-section objects are marked by the special .isAuxClippingMesh = true flag.

Constructor

ClippingPlaneObject()

Creates a new ClippingPlaneObject.

Properties

See the base Object3D class for common properties.

.isClippingPlaneObject : Boolean

Read-only flag to check if a given object is of type ClippingPlaneObject.

.type : String

Set to 'ClippingPlaneObject', this can be used to find all clipping planes in a scene.

Methods

See the base Object3D class for common methods.

.needsClippingPlane(objToClip : Object3D) → Boolean

objToClip — object to clip.

Checks if the given mesh object can be clipped.

.assignToObject(objToClip : Object3D, renderOrder : Float = 0)

objToClip — object to clip.
renderOrder — (optional) rendering order assigned on the auxiliary stencil objects.

Assigns clipping parameters and auxiliary stencil meshes on the mesh object.

.createCrossSectionPlane(planes : Array, renderOrder : Float = 0)

planes — array with all clipping planes located on the scene.
renderOrder — (optional) rendering order assigned on the auxiliary cross-section plane object.

Creates and assigns auxiliary cross-section plane on the ClippingPlaneObject.

.cleanupAuxMeshes(objToClip : Object3D = null)

objToClip — (optional) object to clip.

Cleanup auxiliary meshes from objToClip or the clipping plane itself if objToClip=null.

Source

For more info on how to obtain the source code of this module see this page.