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

    Controller owning every ClippingPlane in the scene: creates them and cuts the scene by their planes, adding each to the engine scene's cuttingPlanesController (its proxy given to the ClippingPlane, which moves and shows it), drawn by the engine scene's cuttingPlanesHelper across the scene's bounds. Its visible shows or hides that helper; the planes cut either way.

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    _objects: Map<string, ClippingPlane> = ...
    _viewer: Viewer
    isClippingPlaneController: true
    isSceneObjectController: true
    signals: {
        onObjectAdded: Signal<(object: ClippingPlane) => void>;
        onObjectRemoved: Signal<(object: ClippingPlane) => void>;
        onObjectSelectedChanged: Signal<(object: ClippingPlane) => void>;
        onObjectUpdated: Signal<(object: ClippingPlane) => void>;
        onObjectVisibilityChanged: Signal<(object: ClippingPlane) => void>;
        onVisibilityChanged: Signal<() => void>;
    } = ...

    Type Declaration

    Accessors

    • get count(): number

      Controller objects count

      Returns number

    • get firstObject(): TObject | null

      Returns TObject | null

    • get uuids(): MapIterator<string>

      Iterator over all the uuids contained in the controller.

      Returns MapIterator<string>

    • get visible(): boolean

      Returns boolean

    • set visible(value: boolean): void

      Controller visibility (independant from object own visibility).

      Hiding a controller will hide all its children without modifying their own visibility.

      Parameters

      • value: boolean

      Returns void

    Methods

    • To be implemented by controllers to set global visibility (at controller level)

      Parameters

      • value: boolean

      Returns void

    • Adds the plane and cuts the scene by it: its engine plane added.

      Parameters

      Returns void

      When it holds the most planes the engine cuts by (see canAddObjects), the plane not added.

    • Whether count planes more can be added: the engine cuts by maxCuttingPlanes at most.

      Parameters

      • count: number

      Returns boolean

    • Clears all objects from the controller

      Returns void

    • Disposes the controller and destroy its data

      Returns void

    • Releases an object out of the scene for good (e.g. once its deletion can no longer be undone).

      Parameters

      • object: ClippingPlane

        An object of this controller, removed from it.

      Returns void

    • The uuids of the hidden objects of this controller.

      Returns string[]

    • The uuids of the objects of this controller: the iterator of its map, no copy.

      Returns MapIterator<string>

    • The uuids of the visible objects of this controller.

      Returns string[]

    • The bounds of the plane as the engine draws it: a square on it, centred on the scene's bounds projected on it, as wide as their sphere; its position alone without bounds.

      Parameters

      Returns Box3

    • Returns whether the controller has the given uuid

      Parameters

      • uuid: string

      Returns boolean

    • Returns Generator<Plane, void, unknown>

    • Appends where a ray hits its objects drawn outside the engine to target, those options.filter keeps; none by default. Its engine objects (meshes, sprites, planes) are hit by ViewerRaycaster.raycast, which calls it: a controller drawing objects of its own overrides it.

      Parameters

      • ray: Ray

        World frame.

      • camera: Camera

        The camera the ray goes through, its world matrices as last drawn.

      • options: ViewerRaycastOptions

        The query's options.

      • target: SceneIntersection[]

        The hits of the query, appended to (the raycaster sorts them).

      Returns void