QSurface3DSeries Class
QSurface3DSeries クラスは、3D サーフェスグラフのデータ系列を表します。詳細...
ヘッダー | #include <QSurface3DSeries> |
CMake: | find_package(Qt6 REQUIRED COMPONENTS DataVisualization) target_link_libraries(mytarget PRIVATE Qt6::DataVisualization) |
qmake: | QT += datavisualization |
以来: | QtDataVisualization 1.0 |
QML で: | Surface3DSeries |
継承: | QAbstract3DSeries |
パブリックな型
プロパティ
|
|
パブリック機能
QSurface3DSeries(QObject *parent = nullptr) | |
QSurface3DSeries(QSurfaceDataProxy *dataProxy, QObject *parent = nullptr) | |
virtual | ~QSurface3DSeries() |
QSurfaceDataProxy * | dataProxy() const |
QSurface3DSeries::DrawFlags | drawMode() const |
bool | isFlatShadingEnabled() const |
bool | isFlatShadingSupported() const |
QPoint | selectedPoint() const |
void | setDataProxy(QSurfaceDataProxy *proxy) |
void | setDrawMode(QSurface3DSeries::DrawFlags mode) |
void | setFlatShadingEnabled(bool enabled) |
void | setSelectedPoint(const QPoint &position) |
void | setTexture(const QImage &texture) |
void | setTextureFile(const QString &filename) |
void | setWireframeColor(const QColor &color) |
QImage | texture() const |
QString | textureFile() const |
QColor | wireframeColor() const |
シグナル
void | dataProxyChanged(QSurfaceDataProxy *proxy) |
void | drawModeChanged(QSurface3DSeries::DrawFlags mode) |
void | flatShadingEnabledChanged(bool enable) |
void | flatShadingSupportedChanged(bool enable) |
void | selectedPointChanged(const QPoint &position) |
void | textureChanged(const QImage &image) |
void | textureFileChanged(const QString &filename) |
void | wireframeColorChanged(const QColor &color) |
静的パブリックメンバ
QPoint | invalidSelectionPosition() |
詳細説明
このクラスは、シリーズ固有のビジュアルエレメントと(データプロキシを介した)シリーズデータを管理します。
データプロキシがシリーズに対して明示的に設定されていない場合、シリーズはデフォルトのプロキシを作成します。別のプロキシを設定すると、既存のプロキシとそれに追加されたすべてのデータが破棄される。
QAbstract3DSeries::mesh プロパティで設定されたオブジェクトメッシュは、サーフェスシリーズの選択ポインタ形状を定義します。
QSurface3DSeriesは、QAbstract3DSeries::setItemLabelFormat()で以下のフォーマットタグをサポートしています:
xTitle | x 軸からのタイトル |
yTitle | y 軸からのタイトル |
zTitle | z軸からのタイトル |
xLabel | x軸のフォーマットでフォーマットされた項目値。詳細については、QValue3DAxis::setLabelFormat()を参照。 |
yLabel | y 軸の書式を使用してフォーマットされた項目値。詳細については、QValue3DAxis::setLabelFormat()を参照。 |
zLabel | z 軸のフォーマットでフォーマットされた項目値。詳細は、QValue3DAxis::setLabelFormat() を参照。 |
シリーズ名 | 系列の名前。 |
例えば:
proxy->setItemLabelFormat(QStringLiteral("@valueTitle for (@rowLabel, @colLabel): %.1f"));
Qt Data Visualization データ処理も参照のこと 。
メンバ型ドキュメント
enum QSurface3DSeries::DrawFlag
flags QSurface3DSeries::DrawFlags
サーフェスの描画モード。この列挙の値は OR 演算子と組み合わせることができます。
定数 | 値 | 説明 |
---|---|---|
QSurface3DSeries::DrawWireframe | 1 | グリッドのみが描画されます。 |
QSurface3DSeries::DrawSurface | 2 | サーフェスのみが描画される。 |
QSurface3DSeries::DrawSurfaceAndWireframe | DrawWireframe | DrawSurface | サーフェスとグリッドの両方が描画される。 |
DrawFlags型はQFlags<DrawFlag>のtypedefである。DrawFlagの値のORの組み合わせを格納する。
プロパティ・ドキュメント
dataProxy : QSurfaceDataProxy*
このプロパティは、アクティブなデータプロキシを保持する。
この系列は、その系列に設定されているプロキシの所有権を引き受け、新しいプロキシが追加されると、以前に設定されていたプロキシは削除される。プロキシをNULLにしたり、他の系列に設定したりすることはできません。
アクセス関数:
QSurfaceDataProxy * | dataProxy() const |
void | setDataProxy(QSurfaceDataProxy *proxy) |
通知シグナル:
void | dataProxyChanged(QSurfaceDataProxy *proxy) |
drawMode : DrawFlags
描画モード。
設定可能な値は、DrawFlag の値である。 すべてのフラグをクリアすることはできない。
アクセス関数:
QSurface3DSeries::DrawFlags | drawMode() const |
void | setDrawMode(QSurface3DSeries::DrawFlags mode) |
通知シグナル:
void | drawModeChanged(QSurface3DSeries::DrawFlags mode) |
flatShadingEnabled : bool
このプロパティは、サーフェスフラットシェーディングが有効かどうかを保持する。
デフォルトではtrue
に設定されています。
無効にすると、サーフェスの法線が補間され、エッジが丸く見えます。有効にすると、法線は三角形上で同じまま保たれ、三角形の色はソリッドになります。これにより、モデルからデータがより読みやすくなります。
注意: フラットシェーディングサーフェスには、少なくともGLSLバージョン1.2とGL_EXT_gpu_shader4エクステンションが必要です。flatShadingSupported プロパティの値は、実行時にフラットシェーディングがサポートされているかどうかを示します。
アクセス関数
bool | isFlatShadingEnabled() const |
void | setFlatShadingEnabled(bool enabled) |
通知シグナル:
void | flatShadingEnabledChanged(bool enable) |
[read-only]
flatShadingSupported : const bool
このプロパティは、サーフェスのフラットシェーディングが現在のシステムでサポートされているかどうかを保持します。
サーフェスのフラットシェーディングには、少なくともGL_EXT_gpu_shader4エクステンションを持つGLSLバージョン1.2が必要です。true
の場合、サーフェスのフラットシェーディングがサポートされます。
注意: この読み取り専用プロパティは、最初のレンダーパスの後に正しい値に設定されます。それまでは常にtrue
です。
アクセス関数:
bool | isFlatShadingSupported() const |
通知シグナル:
void | flatShadingSupportedChanged(bool enable) |
selectedPoint : QPoint
このプロパティは、シリーズで選択されているサーフェスグリッドポイントを保持する。
アクセス関数
QPoint | selectedPoint() const |
void | setSelectedPoint(const QPoint &position) |
通知シグナル
void | selectedPointChanged(const QPoint &position) |
texture : QImage
このプロパティは、サーフェスのテクスチャをQImage として保持します。
空のQImage を設定すると、テクスチャはクリアされます。
アクセス関数
QImage | texture() const |
void | setTexture(const QImage &texture) |
通知シグナル:
void | textureChanged(const QImage &image) |
textureFile : QString
このプロパティは、サーフェスのテクスチャをファイルとして保持します。
空のファイル名を設定すると、テクスチャはクリアされます。
アクセス関数
QString | textureFile() const |
void | setTextureFile(const QString &filename) |
通知シグナル
void | textureFileChanged(const QString &filename) |
[since 6.3]
wireframeColor : QColor
このプロパティは、サーフェスのワイヤフレームの色を保持します。
このプロパティは Qt 6.3 で導入されました。
アクセス関数です:
QColor | wireframeColor() const |
void | setWireframeColor(const QColor &color) |
通知シグナル:
void | wireframeColorChanged(const QColor &color) |
メンバー関数ドキュメント
[explicit]
QSurface3DSeries::QSurface3DSeries(QObject *parent = nullptr)
サーフェス 3D 系列を親parent で構築する。
[explicit]
QSurface3DSeries::QSurface3DSeries(QSurfaceDataProxy *dataProxy, QObject *parent = nullptr)
データプロキシdataProxy と親parent でサーフェス 3D 系列を構築する。
[virtual noexcept]
QSurface3DSeries::~QSurface3DSeries()
サーフェス3Dシリーズを削除する。
[static]
QPoint QSurface3DSeries::invalidSelectionPosition()
無効な選択位置を示すQPoint を返す。これをselectedPoint プロパティに設定すると、このシリーズからの選択が解除されます。
QAbstract3DGraph::clearSelection()も参照してください 。
void QSurface3DSeries::setSelectedPoint(const QPoint &position)
行と列で指定された系列のデータ配列の位置position にあるサーフェスグリッド点を選択します。
一度に選択できる点は1点のみである。
この系列からの選択を解除するには、invalidSelectionPosition() をposition に設定します。この系列がグラフに追加された場合、グラフはユーザーの操作に応じて、または無効となった場合に選択を調整することができる。
選択されたポイントの行の前に、系列から行を削除したり、系列に行を挿入したりすると、同じポイントが選択されたままになるように、選択が調整される。
注: selectedPoint プロパティのセッター関数。
selectedPoint() およびQAbstract3DGraph::clearSelection()も参照のこと 。
© 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.