Options
All
  • Public
  • Public/Protected
  • All
Menu

Class ModelHandle

Hierarchy

  • ModelHandle

Index

Constructors

constructor

Properties

clippable

clippable: boolean = true

participates in clipping operation only if true

id

id: number

Session unique ID used to manipulate this handle/model

meter

meter: number

Conversion factor to one meter from model units

pickable

pickable: boolean = true

participates in picking operation only if true

tag

tag: any = null

Tag used to identify the model

wcs

wcs: vec3 = vec3.create()

local World Coordinate System origin

Accessors

changed

  • get changed(): boolean
  • Indicates if there are any changes to be drawn. This flag is checked by the viewer to see if redraw is necessary

    Returns boolean

clippingPlaneA

  • get clippingPlaneA(): number[]
  • set clippingPlaneA(plane: number[]): void

clippingPlaneB

  • get clippingPlaneB(): number[]
  • set clippingPlaneB(plane: number[]): void

empty

  • get empty(): boolean
  • Some models are empty - they don't contain any geometry

    Returns boolean

isolatedProducts

  • get isolatedProducts(): number[]
  • set isolatedProducts(value: number[]): void
  • If drawProductId is defined, only this single product is drawn

    Returns number[]

  • If drawProductId is defined, only this single product is drawn

    Parameters

    • value: number[]

    Returns void

stopped

  • get stopped(): boolean
  • set stopped(value: boolean): void
  • indicates if this model should be used in a rendering loop or not.

    Returns boolean

  • indicates if this model should be used in a rendering loop or not.

    Parameters

    • value: boolean

    Returns void

Methods

addState

  • addState(state: State, args: number | number[]): void

clearHighlighting

  • clearHighlighting(): void

draw

  • draw(mode?: DrawMode, percent?: number): void

getModelState

  • getModelState(): number[][]

getProductAnalysis

getProductId

  • getProductId(renderId: number): number

getProductMap

  • getProductMap(id: number, wcs?: vec3): ProductMap

getProductMaps

getProductsOfType

getProductsWithState

  • getProductsWithState(state: State): { id: number; model: number }[]

getRegion

  • getRegion(wcs: vec3): Region

getState

  • getState(id: number): State

getStates

  • getStates(): { id: number; states: State[] }[]

getStyle

  • getStyle(id: number): number

removeState

  • removeState(state: State, args: number | number[]): void

resetState

  • resetState(args?: number | number[]): void

resetStyles

  • resetStyles(): void

restoreModelState

  • restoreModelState(states: number[][]): void

setActive

setState

  • setState(state: State, args: number | number[]): void

setStyle

  • setStyle(styleId: number, args: number | number[]): void
  • Parameters

    • styleId: number
    • args: number | number[]

    Returns void

unload

  • unload(): any

Static bufferTexture

  • bufferTexture(gl: WebGLRenderingContext | WebGL2RenderingContext, pointer: WebGLTexture, data: Float32Array | Uint8Array, numberOfComponents?: number): number
  • Parameters

    • gl: WebGLRenderingContext | WebGL2RenderingContext
    • pointer: WebGLTexture
    • data: Float32Array | Uint8Array
    • Optional numberOfComponents: number

    Returns number

Generated using TypeDoc