QCullFace Class
class Qt3DRender::QCullFaceQCullFace クラスは、表と裏のどちらのカリングを有効にするかを指定します。詳細...
ヘッダー | #include <QCullFace> |
CMake: | find_package(Qt6 REQUIRED COMPONENTS 3drender) target_link_libraries(mytarget PRIVATE Qt6::3drender) |
qmake | QT += 3drender |
QML で | CullFace |
を継承しています: | Qt3DRender::QRenderState |
ステータス | 非推奨 |
パブリックな型
enum | CullingMode { NoCulling, Front, Back, FrontAndBack } |
プロパティ
- mode : CullingMode
パブリック機能
パブリックスロット
void | setMode(Qt3DRender::QCullFace::CullingMode mode) |
シグナル
void | modeChanged(Qt3DRender::QCullFace::CullingMode mode) |
詳細説明
QCullFace は、前面ファセットと背面ファセットのどちらをカリングするかを設定します。ファセットには、三角形、四角形、多角形、長方形が含まれます。
これは、QRenderPass で addRenderState() メソッドを呼び出すことで追加できます:
// using namespace Qt3DRender; QRenderPass *renderPass = new QRenderPass(); // Create a front face culling render state QCullFace *cullFront = new QCullFace(); cullFront->setMode(QCullFace::Front); // Add the render state to the render pass renderPass->addRenderState(cullFront);
または、QRenderStateSet の addRenderState() メソッドを呼び出すことで追加できます:
// using namespace Qt3DRender; QRenderStateSet *renderStateSet = new QRenderStateSet(); // Create a front face culling render state QCullFace *cullFront = new QCullFace(); cullFront->setMode(QCullFace::Front); // Add the render state to the render pass renderStateSet->addRenderState(cullFront);
QFrontFaceも参照 。
メンバ型ドキュメント
enum QCullFace::CullingMode
この列挙は、カリングモードの値を指定する。
定数 | 値 | 説明 |
---|---|---|
Qt3DRender::QCullFace::NoCulling | 0x0 | カリングは無効 |
Qt3DRender::QCullFace::Front | 0x0404 | 正面を向いたポリゴンに対してカリングが有効 |
Qt3DRender::QCullFace::Back | 0x0405 | 裏向きのポリゴンに対してカリングが有効 |
Qt3DRender::QCullFace::FrontAndBack | 0x0408 | すべてのポリゴンでカリングが有効、点と線が描画される |
プロパティの説明
mode : CullingMode
QCullFace で使用されるカリングモードを保持する。デフォルトはQCullFace に設定されています。
アクセス関数:
Qt3DRender::QCullFace::CullingMode | mode() const |
void | setMode(Qt3DRender::QCullFace::CullingMode mode) |
通知シグナル:
void | modeChanged(Qt3DRender::QCullFace::CullingMode mode) |
メンバ関数ドキュメント
[explicit]
QCullFace::QCullFace(Qt3DCore::QNode *parent = nullptr)
parent を親として新しいQCullFace::QCullFace インスタンスを構築する。
© 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.