Interactive Object to be displayed in the Viewer. This class stores a weak reference to the real object in memory identified by a string id. User might specify id explicitly at construction time or rely on an id generated from loaded file URL. Beware to use unique ids - creating multiple objects with the same id will result in logical issues!

Usual lifetime of the object:

Hierarchy (View Summary)

Constructors

  • Constructor.

    Parameters

    • theModule: OccViewer

      viewer object

    • OptionaltheId: string

      id of object (if it is not provided - will be generated automatically)

    • OptionalthePrefix: string

    Returns InteractiveObject

Properties

_myObjId: string
_myViewer: OccViewer

Accessors

  • get color(): string
  • Return object's global RGB color defined as OccViewer.ColorString

    Returns string

  • set color(theColor: string): void
  • Set object's global color or empty string to unset.

    Parameters

    • theColor: string

    Returns void

  • get id(): string
  • Get object id as string.

    Returns string

  • get isExist(): boolean
  • Return TRUE if object with specified Id exists.

    Returns boolean

  • get isLoaded(): boolean
  • Return TRUE if object with specified Id has deferred data loaded.

    Returns boolean

  • get selectable(): boolean
  • Return object's selectable status.

    Returns boolean

  • set selectable(theIsSelectable: boolean): void
  • Set object's selectable status.

    Parameters

    • theIsSelectable: boolean

    Returns void

  • get transparency(): number
  • Return object's transparency within [0.0, 1.0] range, or 0.0 if unspecified.

    Returns number

  • set transparency(theTransp: number): void
  • Set object's global transparency within [0.0, 1.0] range, or 0.0 to unset.

    Parameters

    • theTransp: number

    Returns void

  • get visible(): boolean
  • Return object visibility state.

    Returns boolean

  • set visible(theToShow: boolean): void
  • Set object visibility state.

    Parameters

    • theToShow: boolean

    Returns void

  • get visibleInView(): null | Subview
  • Return view in which object is visible or NULL if it is not displayed or displayed in multiple views.

    Returns null | Subview

  • set visibleInView(theView: null | Subview): void
  • Set object to be visible only within specific view or all views (NULL) - view affinity. Note that visible still has to be set independently.

    Parameters

    Returns void

  • get zLayer(): ZLayerId
  • Return z layer of object.

    Returns ZLayerId

  • set zLayer(theLayer: ZLayerId): void
  • Set z layer of object.

    Parameters

    Returns void

Methods

  • Clone

    Returns string

    cloned object id

  • Remove object and invalidates it's id.

    Returns boolean