Encapsulates geometry. 更多...
| 頭: | #include <QGeometry> |
| CMake: |
find_package(Qt6 REQUIRED COMPONENTS 3dcore)
target_link_libraries(mytarget PRIVATE Qt6::3dcore) |
| qmake: | QT += 3dcore |
| 實例化: | 幾何體 |
| 繼承: | Qt3DCore::QNode |
| 繼承者: | Qt3DExtras::QConeGeometry , Qt3DExtras::QCuboidGeometry , Qt3DExtras::QCylinderGeometry , Qt3DExtras::QExtrudedTextGeometry , Qt3DExtras::QPlaneGeometry , Qt3DExtras::QSphereGeometry ,和 Qt3DExtras::QTorusGeometry |
| QGeometry (Qt3DCore::QNode * parent = nullptr) | |
| void | addAttribute (Qt3DCore::QAttribute * attribute ) |
| QList<Qt3DCore::QAttribute *> | attributes () const |
| Qt3DCore::QAttribute * | boundingVolumePositionAttribute () const |
| QVector3D | maxExtent () const |
| QVector3D | minExtent () const |
| void | removeAttribute (Qt3DCore::QAttribute * attribute ) |
| void | setBoundingVolumePositionAttribute (Qt3DCore::QAttribute * boundingVolumePositionAttribute ) |
| void | boundingVolumePositionAttributeChanged (Qt3DCore::QAttribute * boundingVolumePositionAttribute ) |
| void | maxExtentChanged (const QVector3D & maxExtent ) |
| void | minExtentChanged (const QVector3D & minExtent ) |
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.
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 .
訪問函數:
| Qt3DCore::QAttribute * | boundingVolumePositionAttribute () const |
| void | setBoundingVolumePositionAttribute (Qt3DCore::QAttribute * boundingVolumePositionAttribute ) |
通知程序信號:
| void | boundingVolumePositionAttributeChanged (Qt3DCore::QAttribute * boundingVolumePositionAttribute ) |
另請參閱 Qt3DCore::QAttribute .
[read-only]
maxExtent
: const
QVector3D
Holds the vertex with the highest x, y, z position values.
訪問函數:
| QVector3D | maxExtent () const |
通知程序信號:
| void | maxExtentChanged (const QVector3D & maxExtent ) |
[read-only]
minExtent
: const
QVector3D
Holds the vertex with the lowest x, y, z position values.
訪問函數:
| QVector3D | minExtent () const |
通知程序信號:
| void | minExtentChanged (const QVector3D & minExtent ) |
[explicit]
QGeometry::
QGeometry
(
Qt3DCore::QNode
*
parent
= nullptr)
Constructs a new QGeometry with parent .
[invokable]
void
QGeometry::
addAttribute
(
Qt3DCore::QAttribute
*
attribute
)
添加 attribute to this geometry.
注意: 此函數可以被援引,通過元對象係統和從 QML。見 Q_INVOKABLE .
Returns the list of attributes in this geometry.
[invokable]
void
QGeometry::
removeAttribute
(
Qt3DCore::QAttribute
*
attribute
)
移除給定 attribute from this geometry.
注意: 此函數可以被援引,通過元對象係統和從 QML。見 Q_INVOKABLE .