IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)

QComponent Class

The base class of scene nodes that can be aggregated by Qt3DCore::QEntity instances as a component.

This class was introduced in Qt 5.5.

Article lu   fois.

L'auteur

Liens sociaux

Viadeo Twitter Facebook Share on Google+   

QComponent Class

Detailed Description

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.

See Also

Property Documentation

 

isShareable : bool

Holds the shareable flag of the QComponent. The QComponent can be shared across several entities if true.

Access functions:

  • bool isShareable() const

  • void setShareable(bool isShareable)

Notifier signal:

  • void shareableChanged(bool isShareable)

Member Function Documentation

 

[explicit] QComponent::QComponent(Qt3DCore::QNode *parent = nullptr)

Constructs a new QComponent instance with parent as the parent.

a QComponent should never be instanced directly, instance one of the subclasses instead.

void QComponent::addedToEntity(Qt3DCore::QEntity *entity)

Indicates that a reference has been added to entity.

QList<Qt3DCore::QEntity *> QComponent::entities() const

Returns a QList containing all the entities that reference this component.

void QComponent::removedFromEntity(Qt3DCore::QEntity *entity)

Indicates that a reference has been removed from entity.

Vous avez aimé ce tutoriel ? Alors partagez-le en cliquant sur les boutons suivants : Viadeo Twitter Facebook Share on Google+