class QSortPolicy#

Provides storage for the sort types to be used. More

Inheritance diagram of PySide6.Qt3DRender.Qt3DRender.QSortPolicy

Synopsis#

Properties#

Methods#

Slots#

Signals#

Note

This documentation may contain snippets that were automatically translated from C++ to Python. We always welcome contributions to the snippet translation. If you see an issue with the translation, you can also let us know by creating a ticket on https:/bugreports.qt.io/projects/PYSIDE

Detailed Description#

A QSortPolicy class stores the sorting type used by the FrameGraph. The sort types determine how drawable entities are sorted before drawing to determine the drawing order. When QSortPolicy is present in the FrameGraph, the sorting mechanism is determined by the sortTypes list. Multiple sort types can be used simultaneously. If QSortPolicy is not present in the FrameGraph, entities are drawn in the order they appear in the entity hierarchy.

class SortType#

This enum type describes the available sort types.

Constant

Description

Qt3DRender.QSortPolicy.StateChangeCost

sort the objects so as to minimize the cost of changing from the currently rendered state

Qt3DRender.QSortPolicy.BackToFront

sort the objects from back to front based on inverted z order. More accurately, the sorting key is the z component of the projection of the camera-to-object-center vector onto the camera’s view vector.

Qt3DRender.QSortPolicy.Material

sort the objects based on their material (shader) value.

Qt3DRender.QSortPolicy.FrontToBack

sort the objects from front to back. The opposite of BackToFront.

Qt3DRender.QSortPolicy.Texture

sort the objects to minimize texture changes.

Qt3DRender.QSortPolicy.Uniform

sort the objects to minimize uniform changes.

Note

Properties can be used directly when from __feature__ import true_property is used or via accessor functions otherwise.

property sortTypesᅟ: list of int#

Specifies the sorting types to be used.

Access functions:
__init__([parent=None])#
Parameters:

parentQNode

Constructs QSortPolicy with given parent.

setSortTypes(sortTypes)#
Parameters:

sortTypes – .list of Qt3DRender.QSortPolicy.SortType

See also

sortTypes()

Setter of property sortTypesᅟ .

setSortTypes(sortTypesInt)
Parameters:

sortTypesInt – .list of int

Setter of property sortTypesᅟ .

sortTypes()#
Return type:

.list of Qt3DRender.QSortPolicy.SortType

Returns the current sort types in use

See also

setSortTypes()

sortTypesChanged(sortTypes)#
Parameters:

sortTypes – .list of Qt3DRender.QSortPolicy.SortType

Notification signal of property sortTypesᅟ .

sortTypesChanged(sortTypes)
Parameters:

sortTypes – .list of int

Notification signal of property sortTypesᅟ .

sortTypesInt()#
Return type:

.list of int

Getter of property sortTypesᅟ .