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.
This property holds the parent scene as a read only value.
If the object has no parent scene, the value is 0.
访问函数:
Q3DScene * | parentScene () |
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 ) |
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 ().