Base class for OccViewer Module object.

Constructors

  • Main constructor.

    Parameters

    • theBaseDataPath: string

      path to folder that contains wasm and wasm32 folders with sources

    Returns OccViewer

Properties

AIS_RotationMode: typeof AIS_RotationMode

Implementation of AIS_RotationMode.

AIS_SelectionScheme: typeof AIS_SelectionScheme

Implementation of AIS_SelectionScheme.

Aspect_TypeOfLine: typeof Aspect_TypeOfLine

Implementation of Aspect_TypeOfLine.

canvas: HTMLCanvasElement

Canvas element for OpenGL context.

DisplayMode: typeof DisplayMode

Implementation of DisplayMode.

Graphic3d_TypeOfLightSource: typeof Graphic3d_TypeOfLightSource

Implementation of Graphic3d_TypeOfLightSource.

IObservableCallback: IObservableCallback

Implementation of IObservableCallback type.

IPromise: IPromise

Implementation of IPromise type.

Observable: typeof Observable

Implementation of Observable.

Slice_TypeOfPlane: typeof Slice_TypeOfPlane

Implementation of Slice_TypeOfPlane.

ViewCorner: typeof ViewCorner

Implementation of ViewCorner.

ViewManager: ViewManager

Implementation of ViewManager.

Accessors

  • get animationManager(): AnimationManager
  • Get animation manager.

    Returns AnimationManager

    animation manager

  • get camera(): Camera
  • Get camera controller - an interface for managing various camera view properties.

    Returns Camera

    camera controller

  • get clippingPlane(): ClippingPlane
  • Get clipping plane controller - a global clipping plane object that could be applied to entire view or specific objects. Global clipping plane object is always defined, but disabled by default.

    Returns ClippingPlane

    clipping plane controller.

  • get eventManager(): EventManager
  • Get event manager - an interface for subscribing and unsubscribing to various callbacks (like selection changes).

    Returns EventManager

    selection manager.

  • get explodeView(): ExplodeViewController
  • Get explode view controller - a global explode view object that could be applied to entire view or specific objects. Global explode view object is always defined, but disabled by default.

    Returns ExplodeViewController

    explode view controller.

  • get focusView(): Subview
  • Get view object receiving focus.

    Returns Subview

    View object

  • get ground(): Ground
  • Get ground controller - a manager of a global ground presentation object (hidden by default).

    Returns Ground

    ground controller.

  • get interactiveLineController(): InteractiveLineController
  • Get interactive line controller

    Returns InteractiveLineController

    interactive line controller

  • get interactiveRotationButtonController(): InteractiveRotationButtonController
  • Get interactive line controller

    Returns InteractiveRotationButtonController

    interactive line controller

  • get isPthreadLoaded(): boolean
  • Check if pthread version of viewer is loaded.

    Returns boolean

  • get isWasmLoaded(): boolean
  • Check if WASM module has been loaded.

    Returns boolean

  • get lights(): LightsController
  • Get lights controller - an interface for managing list of active light sources and other lighting properties.

    Returns LightsController

    lights controller.

  • get manipulator(): Manipulator
  • Returns manipulator object - an auxiliary presentation object for interactive movements of presentations in the Viewer.

    Returns Manipulator

  • get rayCast(): RayCastController
  • Get Ray casting controller.

    Returns RayCastController

  • get renderingParams(): RenderingParams
  • Get renderingParams controller - an interface for querying and changing various rendering properties.

    Returns RenderingParams

    rendering controller

  • get rootView(): Subview
  • Get root view object (either main view itself or composer of subviews).

    Returns Subview

    View object

  • get selectionManager(): SelectionManager
  • Get selection manager - an interface for managing the list of selected objects and various selection properties.

    Returns SelectionManager

    selection manager.

  • get sitmap(): SitMap
  • Gets sitmap controller - an interface for managing sitmap objects.

    Returns SitMap

    sitmap controller.

  • get slicer(): Slicer
  • Get Slicer controller - an interface for managing creating slices.

    Returns Slicer

    view cube controller

  • get traceLevel(): Message_Gravity
  • Get gravity level for logging messages. Consider increasing the level within production application environment to log only critical errors.

    Returns Message_Gravity

    lower message gravity to log

  • set traceLevel(theGravity: Message_Gravity): void
  • Set gravity level for logging messages.

    Parameters

    Returns void

  • get viewCube(): ViewCube
  • Get View Cube controller - an interface for managing properties of auxiliary View Cube interactive object displayed at View corner.

    Returns ViewCube

    view cube controller

Methods

  • Download file.

    Parameters

    • theFilename: string

      name of file

    • theBuffer: string | Uint8Array

      buffer to download

    • theType: string = "application/octet-stream"

      MIME type of file

    Returns void

  • Return module by name.

    Parameters

    • moduleName: string

    Returns IModule

  • Init OccViewer Module and load WASM file.

    Returns Promise<void>

  • Check if multithreading is allowed.

    Returns boolean

  • Check browser support.

    Returns boolean

    TRUE if WASM supported

  • Check browser support for WebGL.

    Returns boolean

    TRUE if WebGL supported

  • Callback returning file path for loading WebAssembly components.

    Parameters

    • thePath: string

      file path to locate

    • thePrefix: string

      default file prefix

    Returns string

    full path to the resource

  • Make screenshot and download.

    Parameters

    • theFilename: string

      of screenshot which will be downloaded

    • theWidth: number

      of screenshot (-1 - take size of canvas)

    • theHeight: number

      of screenshot (-1 - take size of canvas)

    • theViewId: number = -1

      view ID (-1 for active view)

    • theIsGrayscale: boolean = false

      final image will be in grayscale (false as default)

    Returns boolean

    true if success

  • Make screenshot image.

    Parameters

    • theWidth: number

      of screenshot (-1 - take size of canvas)

    • theHeight: number

      of screenshot (-1 - take size of canvas)

    • theViewId: number = -1

      view ID (-1 for active view)

    • theIsGrayscale: boolean = false

      final image will be in grayscale (false as default)

    • theToBase64: boolean = false

      return image as base64 string (false as default)

    Returns null | string | Uint8Array

    Uint8Array or base64 string of image or null if failed

  • Pick 3d point by 2d coordinates and store.

    Parameters

    • theX: number

      x coordinate of canvas

    • theY: number

      y coordinate of canvas

    • theToStickToPickRay: boolean

      when TRUE, the result point will lie on picking ray

    • theView: null | Subview = null

      view to pick in (null for main view)

    Returns null | WasmVector3d

    3d coordinate or null in case if nothing picked

  • C++ Message::Send() callback redirecting to Terminal.

    Parameters

    • theText: string

      text to print

    • theGravity: Message_Gravity

      message gravity within 0..4 range

    Returns void

  • Register font (file in TTF format). This should be done before displaying text labels using this font, otherwise a fallback font will be used instead.

    Parameters

    • theFontURl: string
    • theFontName: string = ""

      font name or empty string to keep name from file itself

    • theToOverride: boolean = false

      override existing font family

    Returns Promise<void>

  • Resize rendering window.

    Returns void

  • Update Offset of canvas relative to window.

    Returns void

  • Update View.

    Returns void

  • Parameters

    Returns void