Options
All
  • Public
  • Public/Protected
  • All
Menu

Class B3dCollection

summary

B3dScene インスタンスを管理

classdesc

Viewer で表示する複数の B3dScene インスタンスを管理する。

see

{@link mapray.Viewer#b3d_collection}

see

mapray.B3dScene

see

mapray.B3dProvider

memberof

mapray

hideconstructor

Hierarchy

  • B3dCollection

Index

Constructors

Properties

$debug: { clip_coloring: boolean; render_mode: number }

Type declaration

  • clip_coloring: boolean
  • render_mode: number
_b3d_scenes: Set<any>
_shader_cache: {}

Type declaration

    _viewer: any
    _wa_module: any

    Accessors

    • get num_scenes(): number
    • get shader_cache(): object
    • get viewer(): any

    Methods

    • _loadWasmModule(): void
    • summary

      b3dtile wasm モジュールの生成

      b3dtile wasm モジュールの生成を開始する。

      モジュールの生成が完了したとき this._wa_module を設定する。

      その後、各 B3dScene インスタンスに通知する。

      Returns void

    • clearScenes(): void
    • summary

      すべての B3dScene インスタンスを削除

      desc

      this に含まれるすべての B3dScene インスタンスを削除する。

      このメソッドを呼び出した後は、以前に this から取得した B3dScene インスタンスに アクセスすることができない。

      Returns void

    • createScene(provider: any): any
    • summary

      B3dScene インスタンスを作成して追加

      desc

      provider に対応する B3dScene インスタンスを生成して this に追加する。

      Parameters

      • provider: any

        B3dScene に対応する B3D プロバイダ

      Returns any

      this に追加された B3dScene インスタンス

    • draw(stage: any): void
    • endFrame(): void
    • getIterator(): object
    • summary

      B3dScene インスタンスの反復子を取得

      desc

      このメソッドが返したオブジェクトを it とするとき、example の (A) のコメント位置で、個々の B3dScene インスタンスを取得することができる。

      このとき B3dScene インスタンスの反復順序は決まっていない。

      また、反復中に B3dScene インスタンスを追加または削除したときの動作は未定義である。

      example

      while ( it.value !== null ) { // (A): ここで it.value の値が B3dScene インスタンス it.next(); }

      Returns object

      反復子

    • getRayIntersection(ray: any, limit: number): null | object
    • summary

      すべての B3D シーンとレイとの交点を探す

      desc

      線分 (ray.position を始点とし、そこから ray.direction 方向に limit 距離 未満にある点) と this 全体の三角形との交点の中で、始点から最も近い交点の情 報を返す。ただし線分と交差する三角形が見つからないときは null を返す。

      戻り値のオブジェクト形式は次のようになる。ここで uint32 は 0 から 2^32 - 1 の整数値である。

      {
          b3d_scene:  B3dScene,
          distance:   number,
          feature_id: [uint32, uint32]
      }
      

      戻り値のオブジェクトと、そこから参照できるオブジェクトは変更しても問 題ない。

      package

      Parameters

      • ray: any

        半直線を表すレイ (GOCS)

      • limit: number

        制限距離 (ray.direction の長さを単位)

      Returns null | object

      交点の情報

    • getWasmModule(): null | Module
    • summary

      wasm モジュールを取得

      B3dScene が必要とする wasm モジュールを返す。まだモジュールがロードされていない ときは null を返す。

      package

      Returns null | Module

    • removeScene(scene: any): void
    • summary

      B3dScene インスタンスを削除

      desc

      this に含まれる scene を this から削除する。

      このメソッドを呼び出した後は scene にアクセスすることはできない。

      Parameters

      • scene: any

        削除する B3dScene インスタンス

      Returns void