Controls layers drawn in a frame graph branch. 更多 …
def
addLayer
(layer)
def
filterMode
()
def
layers
()
def
removeLayer
(layer)
def
setFilterMode
(filterMode)
def
filterModeChanged
(filterMode)
A
QLayerFiltercan be used to instruct the renderer as to which layer(s) to draw in that branch of the frame graph.QLayerFilterselects which entities to draw based on theQLayerinstance(s) added to theQLayerFilterand as components toQEntity.
QLayerFiltercan be configured to select or discard entities with a specificQLayer从属filterModeproperty. By default, entities referencing one of theQLayerobjects that are also being referenced by theQLayerFilterare selected (AcceptAnyMatchingLayers).Within the FrameGraph tree, multiple
QLayerFilternodes 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 secondQLayerFilterdeclared. This is then repeated until allQLayerFilternodes of the branch have been consumed.
PySide2.Qt3DRender.Qt3DRender.
QLayerFilter
(
[
parent=None
]
)
¶
- param parent
QNode
The constructor creates an instance with the specified
parent
.
PySide2.Qt3DRender.Qt3DRender.QLayerFilter.
FilterMode
¶
Specifies the rules for selecting entities to draw.
|
常量 |
描述 |
|---|---|
|
Qt3DRender.QLayerFilter.AcceptAnyMatchingLayers |
Accept entities that reference one or more
|
|
Qt3DRender.QLayerFilter.AcceptAllMatchingLayers |
Accept entities that reference all the
|
|
Qt3DRender.QLayerFilter.DiscardAnyMatchingLayers |
Discard entities that reference one or more
|
|
Qt3DRender.QLayerFilter.DiscardAllMatchingLayers |
Discard entities that reference all
|
PySide2.Qt3DRender.Qt3DRender.QLayerFilter.
addLayer
(
layer
)
¶
layer
–
QLayer
Add
layer
to the current list of layers
PySide2.Qt3DRender.Qt3DRender.QLayerFilter.
filterMode
(
)
¶
另请参阅
PySide2.Qt3DRender.Qt3DRender.QLayerFilter.
filterModeChanged
(
filterMode
)
¶
filterMode
–
FilterMode
PySide2.Qt3DRender.Qt3DRender.QLayerFilter.
layers
(
)
¶
Returns the current list of layers
PySide2.Qt3DRender.Qt3DRender.QLayerFilter.
removeLayer
(
layer
)
¶
layer
–
QLayer
移除
layer
from the current list of layers
PySide2.Qt3DRender.Qt3DRender.QLayerFilter.
setFilterMode
(
filterMode
)
¶
filterMode
–
FilterMode
另请参阅