0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

【Harmoware-VIS】移動体の方向

Posted at

Harmoware-VIS とは

移動体の方向

Harmoware-VIS で移動を可視化するアイコンの表示方向を指定することが出来ます。
移動体データの表示方向は2点間の位置から Harmoware-VIS で自動計算されます。
movedData 内の自動計算の結果を設定する予約の Key名は「direction」です。
この「direction」は北をゼロとして角度で自動計算します。

アイコンの方向をカスタマイズしたい場合は、予約 Key名の「direction」以外で指定してください。

方向の Key名を orientation とした場合の移動データ設定

[ //移動体データの配列
    {
        "operation": [
                {"elapsedtime": 99999,
                "position": [999.9999, 999.9999, 999.9999],
                "orientation": 999, //アイコンの表示方向
                ・・・ //その他の情報
                },・・・
        ] //移動経路データ配列
    },・・・
]

また、 MovesLayer の props でアクセサを変更する必要があります。
MovesLayer の方向データのアクセサは getOrientation で、デフォルト値を以下に示します。

getOrientation: x => x.direction ? [0,(x.direction * -1),90] : [0,0,90]

オブジェクトの向きは、オイラー角[ピッチ、ヨー、ロール]を度数で表した vec3 で定義されています。
このアクセサの変更例を以下に示します。

getOrientation: x => x.orientation ? [0,(x.orientation * -1),90] : [0,0,90]

アイコン自体の方向もあるのでこの限りではないです。
適切なアクセサを設定してください。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?