LCCObject::getBounds
LCC モデルシーンの AABB バウンディングボックスを取得します。
バージョン要件
SDK v0.4.0+
エンジンサポート
Three.js / CesiumJS
API
LCCObject::getBounds(): BoundingBox
パラメータ
なし
戻り値
以下のプロパティを持つバウンディングボックスオブジェクトを返します:
Three.js
| プロパティ | 型 | 説明 |
|---|---|---|
min | { x: number, y: number, z: number } | バウンディングボックスの最小点。 |
max | { x: number, y: number, z: number } | バウンディングボックスの最大点。 |
CesiumJS
| プロパティ | 型 | 説明 |
|---|---|---|
min | { x: number, y: number, z: number } | バウンディングボックスの最小点。 |
max | { x: number, y: number, z: number } | バウンディングボックスの最大点。 |
origin | { x: number, y: number, z: number } | シーン原点座標(WGS84 デカルト座標系)。 |
使用例
Three.js
const box = lccObject.getBounds();
console.log('min: ', box.min.x, box.min.y, box.min.z);
console.log('max: ', box.max.x, box.max.y, box.max.z);
CesiumJS
const box = lccObject.getBounds();
console.log('min: ', box.min.x, box.min.y, box.min.z);
console.log('max: ', box.max.x, box.max.y, box.max.z);
console.log('origin: ', box.origin.x, box.origin.y, box.origin.z);
注意事項
- このメソッドは
LCCRender.load()の成功コールバックが発生した後に呼び出す必要があります。 - Three.js では、バウンディングボックスは LCC モデルのローカル座標系に基づいています。
- CesiumJS では、非 RTK データの場合は LCC モデルのローカル座標系に基づき、RTK データの場合は投影座標系に基づきます。
originは WGS84 デカルト座標系を使用します。
関連 API
LCCObject::getProjectionCoordinateSystemInfos()