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

Q3DObject Class

The Q3DObject class is a simple base class for all the objects in a 3D scene.

This class was introduced in QtDataVisualization 1.0.

Article lu   fois.

L'auteur

Liens sociaux

Viadeo Twitter Facebook Share on Google+   

Q3DObject Class

  • Header: Q3DObject

  • Since: QtDataVisualization 1.0

  • CMake:

    find_package(Qt6 REQUIRED COMPONENTS DataVisualization)

    target_link_libraries(mytarget PRIVATE Qt6::DataVisualization)

  • qmake: QT += datavisualization

  • Inherited By: Q3DCamera and Q3DLight

  • Instantiated By: qml-qtdatavisualization-object3d.xml

  • Inherits: QObject

  • Inherited By: Q3DCamera and Q3DLight

Detailed Description

Contains position information for an object in a 3D scene. The object is considered to be a single point in the coordinate space without dimensions.

Property Documentation

 

[read-only] parentScene : Q3DScene* const

This property holds the parent scene as a read only value.

If the object has no parent scene, the value is 0.

Access functions:

  • *parentScene()

position : QVector3D

This property holds the 3D position of the object.

Currently setting this property has no effect for Q3DCamera, as the position is handled internally.

Access functions:

  • position() const

  • void setPosition(const &position)

Notifier signal:

  • void positionChanged(const &position)

Member Function Documentation

 

[explicit] Q3DObject::Q3DObject(QObject *parent = nullptr)

Constructs a new 3D object with the position set to origin by default. An optional parent parameter can be given and is then passed to the QObject constructor.

[virtual] Q3DObject::~Q3DObject()

Destroys the 3D object.

[virtual] void Q3DObject::copyValuesFrom(const Q3DObject &source)

Copies the 3D object position from the given source 3D object to this 3D object instance.

[protected] bool Q3DObject::isDirty() const

Returns whether the 3D object has changed.

[protected] void Q3DObject::setDirty(bool dirty)

Sets dirty to true if the 3D object has changed since the last update.

See Also

See also isDirty()

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