QSortPolicy Class

(Qt3DRender::QSortPolicy)

Provides storage for the sort types to be used 更多...

头文件: #include <QSortPolicy>
qmake: QT += 3drender
开始支持版本: Qt 5.7
Instantiated By: SortPolicy
基类: Qt3DRender::QFrameGraphNode

公有类型

enum SortType { StateChangeCost, BackToFront, Material }

属性

公有函数

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

公有槽函数

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

信号

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

受保护的函数

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

其他继承的成员

  • 1 个公有变量继承自 QObject
  • 10 个静态公有成员继承自 QObject
  • 2 个受保护的变量继承自 QObject

详细描述

Provides storage for the sort types to be used

A Qt3DRender::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.

成员类型

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

属性

sortTypes : QVector<int>

Specifies the sorting types to be used.

访问函数:

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)

成员函数

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

参见 setSortTypes().