QBoundingVolume Class

class Qt3DCore::QBoundingVolume

は、エンティティのバウンディングボリュームをオーバーライドするために使用できます。詳細...

ヘッダー #include <Qt3DCore/QBoundingVolume>
CMake: find_package(Qt6 REQUIRED COMPONENTS 3DCore)
target_link_libraries(mytarget PRIVATE Qt6::3DCore)
qmake: QT += 3dcore
以来:Qt 6.0
QML で BoundingVolume
を継承: Qt3DCore::QComponent
によって継承される:

Qt3DRender::QGeometryRenderer そしてQt3DRender::QPickingProxy

ステータス非推奨

プロパティ

パブリック機能

QBoundingVolume(Qt3DCore::QNode *parent = nullptr)
bool areImplicitPointsValid() const
QVector3D implicitMaxPoint() const
QVector3D implicitMinPoint() const
QVector3D maxPoint() const
QVector3D minPoint() const
Qt3DCore::QGeometryView *view() const

パブリックスロット

void setMaxPoint(const QVector3D &maxPoint)
void setMinPoint(const QVector3D &minPoint)
void setView(Qt3DCore::QGeometryView *view)
bool updateImplicitBounds()

シグナル

void implicitMaxPointChanged(const QVector3D &implicitMaxPoint)
void implicitMinPointChanged(const QVector3D &implicitMinPoint)
void implicitPointsValidChanged(bool implicitPointsValid)
void maxPointChanged(QVector3D maxPoint)
void minPointChanged(QVector3D minPoint)
void viewChanged(Qt3DCore::QGeometryView *view)

詳細説明

エンティティのバウンディングボリュームは、ピッキングやビューのフラストラムカリングなど、多くの操作に使用されます。これは通常、レンダリングされたジオメトリをトラバースすることによって計算されます。

QBoundingVolume は、ジオメトリの範囲がアプリケーションで既知の場合に使用でき、Qt 3D で計算する必要がなくなります。

バウンディングボリュームは、最小エクステント座標と最大エクステント座標として提供することも、レンダリングされたメッシュを近似する別の、通常はより単純なジオメトリとして提供することもできます。

最小および最大エクステントを使用する場合、これらは、ジオメトリのローカル座標系で、軸合わせされたバウンディングボックスの対向する角とみなされます。

QBoundingVolume は、GeometryView の計算されたバウンディングボリュームを照会するために使用することもできます。ジオメトリが変更されると、implicitMinPointimplicitMaxPoint プロパティが更新されます。これはバックグラウンドのスレッドで非同期に行われるため、implicitPointsValid の値を確認してから読み込む必要があります。

暗黙のエクステントを強制的に更新するには、updateImplicitBounds を呼び出します。これは、結果が利用可能になるまで、呼び出し元のスレッドでブロックされる。

注意: GeometryRendererBoundingVolume を継承しているため、暗黙的な境界の読み取りや明示的な境界の設定にも対応しています。

プロパティのドキュメント

[read-only] implicitMaxPoint : const QVector3D

* 指定されたビューから計算されたバウンディングボリュームの最大範囲を保持します。

アクセス関数

QVector3D implicitMaxPoint() const

通知シグナル

void implicitMaxPointChanged(const QVector3D &implicitMaxPoint)

[read-only] implicitMinPoint : const QVector3D

* 指定されたビューから計算されたバウンディングボリュームの最小範囲を保持します。

アクセス関数

QVector3D implicitMinPoint() const

通知シグナル

void implicitMinPointChanged(const QVector3D &implicitMinPoint)

[read-only] implicitPointsValid : const bool

* * ビューが割り当てられ、暗黙のエクステント・プロパティが最新である場合、True が返されます。* *

アクセス関数:

bool areImplicitPointsValid() const

ノーティファイア・シグナル:

void implicitPointsValidChanged(bool implicitPointsValid)

updateImplicitBoundsも参照してください

maxPoint : QVector3D

* ユーザが指定する境界ボリュームの最大範囲。最小エクステントと共に)設定されると、ジオメトリからボリュームを計算しないように内部的に使用されます。

アクセス関数:

QVector3D maxPoint() const
void setMaxPoint(const QVector3D &maxPoint)

通知シグナル:

void maxPointChanged(QVector3D maxPoint)

minPoint : QVector3D

* ユーザーが指定した境界ボリュームの最小範囲。(最大範囲とともに) 設定されると、ジオメトリからボリュームを計算しないように内部的に使用されます。

アクセス関数:

QVector3D minPoint() const
void setMinPoint(const QVector3D &minPoint)

通知シグナル:

void minPointChanged(QVector3D minPoint)

view : QGeometryView*

* バウンディングボリュームの計算に使用されるQGeometryView インスタンスへのポインタを保持します。

アクセス関数:

Qt3DCore::QGeometryView *view() const
void setView(Qt3DCore::QGeometryView *view)

通知シグナル:

void viewChanged(Qt3DCore::QGeometryView *view)

メンバ関数ドキュメント

[explicit] QBoundingVolume::QBoundingVolume(Qt3DCore::QNode *parent = nullptr)

parent で新しい QBoundingVolume を構築する。

[slot] bool QBoundingVolume::updateImplicitBounds()

* 指定されたビューの暗黙の境界を更新します。計算が成功した場合はtrue を、そうでない場合は false を返します。* *

注意: 計算は呼び出しスレッドで行われるため、大きなメッシュではかなりの時間がかかる可能性があります。

© 2025 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.