このページでは

Qt3DRender::QMesh Class

class Qt3DRender::QMesh

カスタムメッシュローダー。詳細はこちら...

ヘッダー: #include <Qt3DRender/QMesh>
CMake: find_package(Qt6 REQUIRED COMPONENTS 3drender)
target_link_libraries(mytarget PRIVATE Qt6::3drender)
qmake: QT += 3drender
QML内: Mesh
継承元: Qt3DRender::QGeometryRenderer
ステータス: 非推奨

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

パブリック型

enum Status { None, Loading, Ready, Error }

プロパティ

パブリック関数

QMesh(Qt3DCore::QNode *parent = nullptr)
QString meshName() const
QUrl source() const
Qt3DRender::QMesh::Status status() const

パブリックスロット

void setMeshName(const QString &meshName)
void setSource(const QUrl &source)

シグナル

void meshNameChanged(const QString &meshName)
void sourceChanged(const QUrl &source)
void statusChanged(Qt3DRender::QMesh::Status status)

詳細な説明

さまざまな形式の外部ファイルからメッシュデータを読み込みます。Qt3DRender::QMesh は、データを単一のメッシュに読み込みます。

Qt3D 5.9 において、QMesh は以下の形式をサポートしています:

  • Wavefront OBJ
  • スタンフォード・トライアングル・フォーマット (PLY)
  • STL (STereoLithography)

また、SDKがインストールされており、fbxジオメトリローダープラグインがビルドされ、検出されている場合、QMeshは以下の形式もサポートします:

  • Autodesk FBX

複数のオブジェクトで構成されるシーン全体を読み込む場合は、代わりにQt3DRender::QSceneLoader を使用することをお勧めします。

「Qt3DRender::QSceneLoader」も参照してください 。

メンバー型のドキュメント

enum QMesh::Status

この列挙型は、使用されるシェーダーの状態を識別します。

定数値説明
Qt3DRender::QMesh::None0ソースメッシュにまだソースが割り当てられていません
Qt3DRender::QMesh::Loading1メッシュのジオメトリを読み込み中です
Qt3DRender::QMesh::Ready2メッシュのジオメトリが正常に読み込まれました
Qt3DRender::QMesh::Error3メッシュの読み込み中にエラーが発生しました

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

meshName : QString

メッシュの名前を保持します。

アクセス関数:

QString meshName() const
void setMeshName(const QString &meshName)

通知シグナル:

void meshNameChanged(const QString &meshName)

source : QUrl

カスタムメッシュを含むファイルへのsource のURLを保持します。

アクセス関数:

QUrl source() const
void setSource(const QUrl &source)

通知シグナル:

void sourceChanged(const QUrl &source)

[read-only] status : Status

メッシュの読み込み状況を保持します。

アクセス関数:

Qt3DRender::QMesh::Status status() const

通知シグナル:

void statusChanged(Qt3DRender::QMesh::Status status)

Qt3DRender::QMesh::Statusも参照してください 。

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

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

parent を使用して、新しいQMeshを構築します。

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