Vertex Viewer SDK
    Preparing search index...

    Class StencilBufferManager

    The StencilBufferManager manages the stencil buffer state for the viewer. Stencil buffers are represented as images and contain additional information related to the rendered frame. Examples of information contained within a stencil buffer include: cross section and feature edge positions.

    This class contains methods for fetching a stencil buffer for the currently rendered frame, as well as helpers that components can use to get an up-to-date stencil buffer after any interactions are performed.

    Index

    Constructors

    Methods

    • Fetches a stencil buffer for the last rendered frame. Returns undefined if the last frame does not have stencil information.

      Returns Promise<StencilBuffer | undefined>

    • Returns a promise that resolves with the last generated stencil buffer, or fetches a new stencil buffer if the frame has changed since the last stencil buffer was fetched. Because the stencil buffer is cached by the manager, this method can be called multiple times without performing a network request.

      Returns Promise<StencilBuffer | undefined>

      StencilBufferManager.latestAfterInteraction to wait for requesting a stencil buffer after an interaction has finished.

    • Returns a promise that resolves with the latest stencil buffer, once any interaction is being performed. If no interaction is being performed, then the promise will resolve immediately with the latest stencil buffer.

      This method is useful for components to fetch the most up-to-date stencil buffer. Because the stencil buffer is cached by the manager, components can call this method multiple times without performing a network request.

      Returns Promise<StencilBuffer | undefined>

      StencilBufferManager.latest - used internally by this method.