Q3DObject Class | Qt Data Visualization 5.9

Qt 5.9 | Qt Data Visualization | C++ Classes | Q3DObject

Qt 5.9.6 Reference Documentation

# Q3DObject Class

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

Header: | #include <Q3DObject>
Since: | QtDataVisualization 1.0
Instantiated By: | Object3D
Inherits: | QObject
Inherited By: | Q3DCamera and Q3DLight

- List of all members, including inherited members

## Properties

- parentScene : Q3DScene * const
- position : QVector3D

- 1 property inherited from QObject

## Public Functions

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

- 32 public functions inherited from QObject

## Signals

void | positionChanged(const QVector3D &position)

- 2 signals inherited from QObject

## Protected Functions

bool | isDirty() const
void | setDirty(bool dirty)

- 9 protected functions inherited from QObject

### Additional Inherited Members

- 1 public slot inherited from QObject
- 1 public variable inherited from QObject
- 10 static public members inherited from QObject
- 2 protected variables inherited from QObject

## Detailed Description

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.

## Property Documentation

### 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:

Q3DScene * | parentScene()

### position : QVector3D

This property holds the 3D position of the object.

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

Access functions:

QVector3D | position() const
void | setPosition(const QVector3D &position)

Notifier signal:

void | positionChanged(const QVector3D &position)

## Member Function Documentation

### Q3DObject::Q3DObject(QObject *parent = Q_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 isDirty().