QGeometry Class
(Qt3DRender::QGeometry)Encapsulates geometry. More...
Header: | #include <QGeometry> |
qmake: | QT += 3drender |
Since: | Qt 5.7 |
Instantiated By: | Geometry |
Inherits: | Qt3DCore::QNode |
Inherited By: | Qt3DExtras::QConeGeometry, Qt3DExtras::QCuboidGeometry, Qt3DExtras::QCylinderGeometry, Qt3DExtras::QExtrudedTextGeometry, Qt3DExtras::QPlaneGeometry, Qt3DExtras::QSphereGeometry, and Qt3DExtras::QTorusGeometry |
This class was introduced in Qt 5.7.
Properties
- boundingVolumePositionAttribute : Qt3DRender::QAttribute*
- maxExtent : const QVector3D
- minExtent : const QVector3D
- 3 properties inherited from Qt3DCore::QNode
- 1 property inherited from QObject
Public Functions
QGeometry(Qt3DCore::QNode *parent = nullptr) | |
void | addAttribute(Qt3DRender::QAttribute *attribute) |
QVector<Qt3DRender::QAttribute *> | attributes() const |
Qt3DRender::QAttribute * | boundingVolumePositionAttribute() const |
QVector3D | maxExtent() const |
QVector3D | minExtent() const |
void | removeAttribute(Qt3DRender::QAttribute *attribute) |
- 13 public functions inherited from Qt3DCore::QNode
- 30 public functions inherited from QObject
Public Slots
void | setBoundingVolumePositionAttribute(Qt3DRender::QAttribute *boundingVolumePositionAttribute) |
- 3 public slots inherited from Qt3DCore::QNode
- 1 public slot inherited from QObject
Signals
void | boundingVolumePositionAttributeChanged(Qt3DRender::QAttribute *boundingVolumePositionAttribute) |
void | maxExtentChanged(const QVector3D &maxExtent) |
void | minExtentChanged(const QVector3D &minExtent) |
- 4 signals inherited from Qt3DCore::QNode
- 2 signals inherited from QObject
Related Non-Members
typedef | QNodePtr |
typedef | QNodeVector |
typedef | QObjectList |
QList<T> | qFindChildren(const QObject *obj, const QRegExp ®Exp) |
Qt3DCore::QNodeId | qIdForNode(Qt3DCore::QNode *node) |
Qt3DCore::QNodeIdVector | qIdsForNodes(const T &nodes) |
T | qobject_cast(QObject *object) |
T | qobject_cast(const QObject *object) |
Macros
QT_NO_NARROWING_CONVERSIONS_IN_CONNECT | |
Q_CLASSINFO(Name, Value) | |
Q_DISABLE_COPY(Class) | |
Q_DISABLE_COPY_MOVE(Class) | |
Q_DISABLE_MOVE(Class) | |
Q_EMIT | |
Q_ENUM(...) | |
Q_ENUM_NS(...) | |
Q_FLAG(...) | |
Q_FLAG_NS(...) | |
Q_GADGET | |
Q_INTERFACES(...) | |
Q_INVOKABLE | |
Q_NAMESPACE | |
Q_OBJECT | |
Q_PROPERTY(...) | |
Q_REVISION | |
Q_SET_OBJECT_NAME(Object) | |
Q_SIGNAL | |
Q_SIGNALS | |
Q_SLOT | |
Q_SLOTS |
Additional Inherited Members
- 9 static public members inherited from QObject
- 2 protected functions inherited from Qt3DCore::QNode
- 9 protected functions inherited from QObject
Detailed Description
A Qt3DRender::QGeometry class is used to group a list of Qt3DRender::QAttribute objects together to form a geometric shape Qt3D is able to render using Qt3DRender::QGeometryRenderer. Special attribute can be set in order to calculate bounding volume of the shape.
Property Documentation
boundingVolumePositionAttribute : Qt3DRender::QAttribute*
Holds the attribute used to compute the bounding volume. The bounding volume is used internally for picking and view frustum culling.
If unspecified, the system will look for the attribute using the name returned by QAttribute::defaultPositionAttributeName.
Access functions:
Qt3DRender::QAttribute * | boundingVolumePositionAttribute() const |
void | setBoundingVolumePositionAttribute(Qt3DRender::QAttribute *boundingVolumePositionAttribute) |
Notifier signal:
void | boundingVolumePositionAttributeChanged(Qt3DRender::QAttribute *boundingVolumePositionAttribute) |
See also Qt3DRender::QAttribute.
maxExtent : const QVector3D
Holds the vertex with the highest x, y, z position values.
Access functions:
QVector3D | maxExtent() const |
Notifier signal:
void | maxExtentChanged(const QVector3D &maxExtent) |
minExtent : const QVector3D
Holds the vertex with the lowest x, y, z position values.
Access functions:
QVector3D | minExtent() const |
Notifier signal:
void | minExtentChanged(const QVector3D &minExtent) |
Member Function Documentation
QGeometry::QGeometry(Qt3DCore::QNode *parent = nullptr)
Constructs a new QGeometry with parent.
void QGeometry::addAttribute(Qt3DRender::QAttribute *attribute)
Adds an attribute to this geometry.
Note: This function can be invoked via the meta-object system and from QML. See Q_INVOKABLE.
QVector<Qt3DRender::QAttribute *> QGeometry::attributes() const
Returns the list of attributes in this geometry.
void QGeometry::removeAttribute(Qt3DRender::QAttribute *attribute)
Removes the given attribute from this geometry.
Note: This function can be invoked via the meta-object system and from QML. See Q_INVOKABLE.