QGeometry Class▲
-
Header: QGeometry
-
Since: Qt 5.7
-
CMake:
find_package(Qt6 REQUIRED COMPONENTS 3dcore)
target_link_libraries(mytarget PRIVATE Qt6::3dcore)
-
qmake: QT += 3dcore
-
Inherited By: Qt3DExtras::QConeGeometry, Qt3DExtras::QCuboidGeometry, Qt3DExtras::QCylinderGeometry, Qt3DExtras::QExtrudedTextGeometry, Qt3DExtras::QPlaneGeometry, Qt3DExtras::QSphereGeometry, and Qt3DExtras::QTorusGeometry
-
Instantiated By: qml-qt3d-core-geometry.xml
-
Inherits: Qt3DCore::QNode
-
Inherited By: Qt3DExtras::QConeGeometry, Qt3DExtras::QCuboidGeometry, Qt3DExtras::QCylinderGeometry, Qt3DExtras::QExtrudedTextGeometry, Qt3DExtras::QPlaneGeometry, Qt3DExtras::QSphereGeometry, and Qt3DExtras::QTorusGeometry
Detailed Description▲
A Qt3DCore::QGeometry class is used to group a list of Qt3DCore::QAttribute objects together to form a geometric shape Qt3D is able to render using Qt3DCore::QGeometryRenderer. Special attribute can be set in order to calculate bounding volume of the shape.
Property Documentation▲
boundingVolumePositionAttribute : Qt3DCore::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:
-
*boundingVolumePositionAttribute() const
-
void setBoundingVolumePositionAttribute( *boundingVolumePositionAttribute)
Notifier signal:
-
void boundingVolumePositionAttributeChanged( *boundingVolumePositionAttribute)
See Also▲
See also Qt3DCore::QAttribute
[read-only] maxExtent : const QVector3D▲
Holds the vertex with the highest x, y, z position values.
Access functions:
-
maxExtent() const
Notifier signal:
-
void maxExtentChanged(const &maxExtent)
[read-only] minExtent : const QVector3D▲
Holds the vertex with the lowest x, y, z position values.
Access functions:
-
minExtent() const
Notifier signal:
-
void minExtentChanged(const &minExtent)
Member Function Documentation▲
[explicit] QGeometry::QGeometry(Qt3DCore::QNode *parent = nullptr)▲
Constructs a new QGeometry with parent.
void QGeometry::addAttribute(Qt3DCore::QAttribute *attribute)▲
Adds an attribute to this geometry.
QList<Qt3DCore::QAttribute *> QGeometry::attributes() const▲
Returns the list of attributes in this geometry.
void QGeometry::removeAttribute(Qt3DCore::QAttribute *attribute)▲
Removes the given attribute from this geometry.