QLayerFilter¶
Controls layers drawn in a frame graph branch. More…
Synopsis¶
Functions¶
def
addLayer
(layer)def
filterMode
()def
layers
()def
removeLayer
(layer)def
setFilterMode
(filterMode)
Signals¶
def
filterModeChanged
(filterMode)
Detailed Description¶
A
QLayerFilter
can be used to instruct the renderer as to which layer(s) to draw in that branch of the frame graph.QLayerFilter
selects which entities to draw based on theQLayer
instance(s) added to theQLayerFilter
and as components toQEntity
.
QLayerFilter
can be configured to select or discard entities with a specificQLayer
depending on thefilterMode
property. By default, entities referencing one of theQLayer
objects that are also being referenced by theQLayerFilter
are selected (AcceptAnyMatchingLayers
).Within the FrameGraph tree, multiple
QLayerFilter
nodes can be nested within a branch going from root to a leaf. In that case the filtering will first operate on all entities of the scene using the filtering method specified by the first declaredQLayerFilter
. Then the filtered subset of entities will be filtered again based on the filtering method set on the secondQLayerFilter
declared. This is then repeated until allQLayerFilter
nodes of the branch have been consumed.
- class PySide2.Qt3DRender.Qt3DRender.QLayerFilter([parent=None])¶
- param parent:
The constructor creates an instance with the specified
parent
.
- PySide2.Qt3DRender.Qt3DRender.QLayerFilter.FilterMode¶
Specifies the rules for selecting entities to draw.
Constant
Description
Qt3DRender.QLayerFilter.AcceptAnyMatchingLayers
Accept entities that reference one or more
QLayer
objects added to thisQLayerFilter
. This is the defaultQt3DRender.QLayerFilter.AcceptAllMatchingLayers
Accept entities that reference all the
QLayer
objects added to thisQLayerFilter
Qt3DRender.QLayerFilter.DiscardAnyMatchingLayers
Discard entities that reference one or more
QLayer
objects added to thisQLayerFilter
Qt3DRender.QLayerFilter.DiscardAllMatchingLayers
Discard entities that reference all
QLayer
objects added to thisQLayerFilter
- PySide2.Qt3DRender.Qt3DRender.QLayerFilter.addLayer(layer)¶
- Parameters:
Add
layer
to the current list of layers
- PySide2.Qt3DRender.Qt3DRender.QLayerFilter.filterMode()¶
- Return type:
Holds the filter mode specifying the entities to select for drawing.
The default value is AcceptMatchingLayers.
- PySide2.Qt3DRender.Qt3DRender.QLayerFilter.filterModeChanged(filterMode)¶
- Parameters:
filterMode –
FilterMode
- PySide2.Qt3DRender.Qt3DRender.QLayerFilter.layers()¶
- Return type:
Returns the current list of layers
- PySide2.Qt3DRender.Qt3DRender.QLayerFilter.removeLayer(layer)¶
- Parameters:
Remove
layer
from the current list of layers
- PySide2.Qt3DRender.Qt3DRender.QLayerFilter.setFilterMode(filterMode)¶
- Parameters:
filterMode –
FilterMode
Holds the filter mode specifying the entities to select for drawing.
The default value is AcceptMatchingLayers.
© 2022 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.