|qmake:||QT += 3drender|
- recursive : bool
- 1 property inherited from Qt3DCore::QComponent
- 3 properties inherited from Qt3DCore::QNode
- 1 property inherited from QObject
- 2 public functions inherited from Qt3DCore::QComponent
- 13 public functions inherited from Qt3DCore::QNode
- 32 public functions inherited from QObject
- 3 signals inherited from Qt3DCore::QComponent
- 4 signals inherited from Qt3DCore::QNode
- 2 signals inherited from QObject
|QLayer(QLayerPrivate &dd, Qt3DCore::QNode *parent = nullptr)|
Additional Inherited Members
- 1 public slot inherited from Qt3DCore::QComponent
- 3 public slots inherited from Qt3DCore::QNode
- 1 public slot inherited from QObject
- 11 static public members inherited from QObject
The QLayer class provides a way of filtering which entities will be rendered.
A QLayer can be applied to a subtree of entities by setting the recursive property to true.
#include <Qt3DCore/QEntity> #include <Qt3DRender/QGeometryRenderer> #include <Qt3DRender/QLayer> #include <Qt3DRender/QLayerFilter> #include <Qt3DRender/QViewport> // Scene Qt3DCore::QEntity *rootEntity = new Qt3DCore::Qt3DCore::QEntity; Qt3DCore::QEntity *renderableEntity = new Qt3DCore::Qt3DCore::QEntity(rootEntity); Qt3DRender::QGeometryRenderer *geometryRenderer = new Qt3DCore::QGeometryRenderer(renderableEntity); Qt3DRender::QLayer *layer1 = new Qt3DCore::QLayer(renderableEntity); layer1->setRecursive(true); renderableEntity->addComponent(geometryRenderer); renderableEntity->addComponent(layer1); ... // FrameGraph Qt3DRender::QViewport *viewport = new Qt3DRender::QViewport; Qt3DRender::QLayerFilter *layerFilter = new Qt3DRender::QLayerFilter(viewport); layerFilter->addLayer(layer1); ...
See also Qt3DRender::QLayerFilter.
Specifies if the layer is also applied to the entity subtree.
Member Function Documentation
Constructs a new QLayer with the specified parent.
© 2018 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.