QSortPolicy Class

(Qt3DRender::QSortPolicy)

Provides storage for the sort types to be used More...

Header: #include <QSortPolicy>
qmake: QT += 3drender
Since: Qt 5.7
Instantiated By: SortPolicy
Inherits: QFrameGraphNode

Public Types

enum SortType { StateChangeCost, BackToFront, Material }

Properties

Public Functions

QSortPolicy(Qt3DCore::QNode *parent = nullptr)
QVector<SortType> sortTypes() const
QVector<int> sortTypesInt() const

Public Slots

void setSortTypes(const QVector<SortType> &sortTypes)
void setSortTypes(const QVector<int> &sortTypesInt)

Signals

void sortTypesChanged(const QVector<SortType> &sortTypes)
void sortTypesChanged(const QVector<int> &sortTypes)

Protected Functions

QSortPolicy(QSortPolicyPrivate &dd, Qt3DCore::QNode *parent = nullptr)

Detailed Description

Provides storage for the sort types to be used

Member Type Documentation

enum QSortPolicy::SortType

This enum type describes sort types that can be employed

ConstantValueDescription
Qt3DRender::QSortPolicy::StateChangeCost( 1<<0 )sort the objects so as to minimize the cost of changing from the currently rendered state
Qt3DRender::QSortPolicy::BackToFront( 1<<1 )sort the objects from back to front inverted z order
Qt3DRender::QSortPolicy::Material( 1<<2 )sort the objects based on their material value

Property Documentation

sortTypes : QVector<int>

Specifies the sorting types to be used.

Access functions:

QVector<int> sortTypesInt() const
void setSortTypes(const QVector<SortType> &sortTypes)
void setSortTypes(const QVector<int> &sortTypesInt)

Notifier signal:

void sortTypesChanged(const QVector<SortType> &sortTypes)
void sortTypesChanged(const QVector<int> &sortTypes)

Member Function Documentation

QSortPolicy::QSortPolicy(Qt3DCore::QNode *parent = nullptr)

Default constructs an instance of QSortPolicy.

[protected] QSortPolicy::QSortPolicy(QSortPolicyPrivate &dd, Qt3DCore::QNode *parent = nullptr)

Copy constructor.

QVector<SortType> QSortPolicy::sortTypes() const

Returns the current sort types in use

See also setSortTypes().