このページでは

Qt3DRender::QViewport Class

class Qt3DRender::QViewport

Qt3Dシーンのビューポート。詳細...

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

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

プロパティ

パブリック関数

QViewport(Qt3DCore::QNode *parent = nullptr)
float gamma() const
QRectF normalizedRect() const

パブリックスロット

void setGamma(float gamma)
void setNormalizedRect(const QRectF &normalizedRect)

シグナル

void gammaChanged(float gamma)
void normalizedRectChanged(const QRectF &normalizedRect)

詳細な説明

Qt3DRender::QViewport シーンの「領域」は、Qt3D がレンダリングを行うレンダリング面のどの部分を指定するかを決定します。ビューポートの外側の領域はそのまま残されます。また、ガンマなど、そのビューポートでのレンダリングに関するグローバルパラメータも制御します。

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

gamma : float

ビューポートのガンマ係数を指定します。デフォルトは 2.2 で、ほとんどの画面で適切な結果が得られます。

アクセス関数:

float gamma() const
void setGamma(float gamma)

Notifierシグナル:

void gammaChanged(float gamma)

normalizedRect : QRectF

ビューポートの正規化された矩形を指定します。つまり、ビューポートの矩形は、レンダリング面のサイズを基準として指定されます。面全体をビューポートとする場合は [0.0, 0.0, 1.0, 1.0] と指定され、これがデフォルト設定です。

アクセス関数:

QRectF normalizedRect() const
void setNormalizedRect(const QRectF &normalizedRect)

通知シグナル:

void normalizedRectChanged(const QRectF &normalizedRect)

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

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

指定されたparent を使用して、QViewportを構築します。

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