このページでは

Q3DObject Class

Q3DObject クラスは、3D シーン内のすべてのオブジェクトに対するシンプルな基底クラスです。詳細...

ヘッダー: #include <Q3DObject>
CMake: find_package(Qt6 REQUIRED COMPONENTS DataVisualization)
target_link_libraries(mytarget PRIVATE Qt6::DataVisualization)
qmake: QT += datavisualization
バージョン: QtDataVisualization 1.0
QMLでの対応: Object3D
継承元: QObject
継承元:

Q3DCamera およびQ3DLight

ステータス: 非推奨

このクラスは非推奨です。新しいコードでの使用は強く推奨しません。

プロパティ

パブリック関数

Q3DObject(QObject *parent = nullptr)
virtual ~Q3DObject()
virtual void copyValuesFrom(const Q3DObject &source)
Q3DScene *parentScene()
QVector3D position() const
void setPosition(const QVector3D &position)

シグナル

void positionChanged(const QVector3D &position)

保護された関数

bool isDirty() const
void setDirty(bool dirty)

詳細な説明

3D シーン内のオブジェクトの位置情報を格納します。このオブジェクトは、寸法を持たない座標空間上の単一の点とみなされます。

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

[read-only] parentScene : Q3DScene*

このプロパティは、親シーンを読み取り専用値として保持します。

オブジェクトに親シーンがない場合、この値は 0 になります。

アクセス関数:

Q3DScene *parentScene()

position : QVector3D

このプロパティは、オブジェクトの3D位置を保持します。

注:現在 、Q3DCamera では位置情報が内部で処理されているため、このプロパティを設定しても効果はありません。

アクセス関数:

QVector3D position() const
void setPosition(const QVector3D &position)

通知シグナル:

void positionChanged(const QVector3D &position)

メンバ関数のドキュメント

[explicit] Q3DObject::Q3DObject(QObject *parent = nullptr)

デフォルトで原点に位置が設定された新しい3Dオブジェクトを作成します。オプションのparent パラメータを指定することができ、その場合はQObject コンストラクタに渡されます。

[virtual noexcept] Q3DObject::~Q3DObject()

3Dオブジェクトを削除します。

[virtual] void Q3DObject::copyValuesFrom(const Q3DObject &source)

指定されたsource の3Dオブジェクトの位置を、この3Dオブジェクトインスタンスにコピーします。

[protected] bool Q3DObject::isDirty() const

3Dオブジェクトに変更があったかどうかを返します。

[protected] void Q3DObject::setDirty(bool dirty)

前回の更新以降に3Dオブジェクトに変更があった場合、dirty をtrue に設定します。

isDirty()も参照してください 。

© 2026 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.