The base class of scene nodes that can be aggregated by Qt3DCore::QEntity instances as a component. 更多...
QComponent (Qt3DCore::QNode * parent = nullptr) | |
virtual | ~QComponent () |
QVector<Qt3DCore::QEntity *> | entities () const |
bool | isShareable () const |
void | setShareable (bool isShareable ) |
void | addedToEntity (Qt3DCore::QEntity * entity ) |
void | removedFromEntity (Qt3DCore::QEntity * entity ) |
void | shareableChanged (bool isShareable ) |
const QMetaObject | staticMetaObject |
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 实例。
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 ,和 Qt3DRender::QMaterial components.
另请参阅 Qt3DCore::QEntity .
Holds the shareable flag of the
QComponent
。
QComponent
can be shared across several entities if
true
.
访问函数:
bool | isShareable () const |
void | setShareable (bool isShareable ) |
通知程序信号:
void | shareableChanged (bool isShareable ) |
构造新的 QComponent 实例与 parent as the parent.
注意: a QComponent should never be instanced directly, instance one of the subclasses instead.
[虚拟]
QComponent::
~QComponent
()
Destroys the instance of QComponent. The destructor is virtual.
[signal]
void
QComponent::
addedToEntity
(
Qt3DCore::QEntity
*
entity
)
Indicates that a reference has been added to entity .
返回 QVector containing all the entities that reference this component.
[signal]
void
QComponent::
removedFromEntity
(
Qt3DCore::QEntity
*
entity
)
Indicates that a reference has been removed from entity .