Documentation - v20.0.0-dev
    Preparing search index...

    The cutting planes of a Scene: what lies behind one of them is cut, neither drawn nor picked (the parts entirely behind not even culled in), except the objects that ignore them (MeshProxy.ignoreCuttingPlanes, SpriteProxy.ignoreCuttingPlanes). Meshes and sprites are cut pixel by pixel.

    A plane is in scene coordinates (those of the objects' matrices), its normal towards the side kept: a point is kept where normal ยท point + constant >= 0 for every plane. What is kept is convex: one plane, several, or a section box (six planes facing in).

    A plane is added with addPlane, which gives its proxy (CuttingPlaneProxy: its owner, moved, shown or hidden in the helper, removed). The scene's only writer of its planes, telling nobody: the renderers and the Raycaster read version when they use them. Ask for a frame after a change.

    Index

    Constructors

    • Parameters

      • maxPlanes: number

        Planes at most: the size of the shaders' plane arrays (the scene's settings.scene.maxCuttingPlanes).

      Returns CuttingPlanesController

    Properties

    maxPlanes: number

    Planes at most: the size of the shaders' plane arrays (the scene's settings.scene.maxCuttingPlanes).

    Accessors

    • get displayVersion(): number

      Changes with version and when a plane is shown or hidden: what the CuttingPlanesHelper draws.

      Returns number

    • get planes(): readonly Plane[]

      The planes, copies of those added: change them through their proxy.

      Returns readonly Plane[]

    • get version(): number

      Changes at each plane added, moved or removed.

      Returns number

    Methods

    • Cuts by plane too, copied (normalized), shown by the helper.

      Parameters

      Returns CuttingPlaneProxy

      Its proxy: set its owner, move it, show or hide it, remove it.

      With maxPlanes planes already, or a plane without a normal (zero length).

    • Removes every plane, their proxies no longer valid: nothing is cut.

      Returns void

    • The part of ray (scene coordinates) on the side kept: from target.x to target.y, as distances from its origin (in world units, whatever the length of its direction); from 0 to Infinity without planes.

      Parameters

      Returns boolean

      False when the whole ray is cut (target then meaningless).

    • Stops cutting by the plane of proxy, which is no longer valid; nothing when it is not.

      Parameters

      Returns void