Q3DObject Class

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

头: #include <Q3DObject>
Since: QtDataVisualization 1.0
实例化: Object3D
继承: QObject
继承者: Q3DCamera and Q3DLight

特性

公共函数

Q3DObject (QObject * parent = nullptr)
virtual ~Q3DObject ()
virtual void copyValuesFrom (const Q3DObject & source )
Q3DScene * parentScene ()
QVector3D position () const
void setPosition (const QVector3D & position )

信号

void positionChanged (const QVector3D & position )

静态公共成员

const QMetaObject staticMetaObject

保护函数

bool isDirty () const
void setDirty (bool dirty )

额外继承成员

详细描述

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

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.

特性文档编制

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.

访问函数:

Q3DScene * 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.

访问函数:

QVector3D 位置 () const
void setPosition (const QVector3D & position )

通知程序信号:

void positionChanged (const QVector3D & position )

成员函数文档编制

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 构造函数。

[虚拟] Q3DObject:: ~Q3DObject ()

Destroys the 3D object.

[虚拟] 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 )

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

另请参阅 isDirty ().