QComponent Class
(Qt3DCore::QComponent)The base class of scene nodes that can be aggregated by Qt3DCore::QEntity instances as a component. 更多...
属性
- isShareable : bool
- 3 个属性继承自 Qt3DCore::QNode
- 1 个属性继承自 QObject
公有函数
QComponent(QNode *parent = nullptr) | |
~QComponent() | |
QVector<QEntity *> | entities() const |
bool | isShareable() const |
- 11 个公有函数继承自 Qt3DCore::QNode
- 32 个公有函数继承自 QObject
公有槽函数
void | setShareable(bool isShareable) |
- 3 个公有槽函数继承自 Qt3DCore::QNode
- 1 个公有槽函数继承自 QObject
信号
void | addedToEntity(QEntity *entity) |
void | removedFromEntity(QEntity *entity) |
void | shareableChanged(bool isShareable) |
- 4 个信号继承自 Qt3DCore::QNode
- 2 个信号继承自 QObject
其他继承的成员
- 1 个公有变量继承自 QObject
- 10 个静态公有成员继承自 QObject
- 2 个受保护的函数继承自 Qt3DCore::QNode
- 9 个受保护的函数继承自 QObject
- 2 个受保护的变量继承自 QObject
详细描述
The base class of scene nodes that can be aggregated by Qt3DCore::QEntity instances as a component.
A Qt3DCore::QComponent provides a vertical slice of behavior that can be assigned to and sometimes shared across Qt3DCore::QEntity instances.
Qt3DCore::QComponent subclasses are often aggregated in groups that impart useful behavior to the aggregating entity. For example, to have an Entity that gets drawn by the Qt3D renderer aspect, an entity would most likely aggregate Qt3DCore::QTransform, Qt3DRender::QMesh, and Qt3DRender::QMaterial components.
属性
isShareable : bool
Holds the shareable flag of the QComponent. The QComponent can be shared across several entities if true
.
访问函数:
bool | isShareable() const |
void | setShareable(bool isShareable) |
Notifier signal:
void | shareableChanged(bool isShareable) |
成员函数
QComponent::QComponent(QNode *parent = nullptr)
Constructs a new QComponent instance with parent as the parent.
Note: a QComponent should never be instanced directly, instance one of the subclasses instead.
QComponent::~QComponent()
Destroys the instance of QComponent.
[signal]
void QComponent::addedToEntity(QEntity *entity)
QVector<QEntity *> QComponent::entities() const
Returns a QVector containing all the entities that reference this component.