QGeometry Class

( Qt3DRender::QGeometry )

封裝幾何體 更多...

頭: #include <QGeometry>
qmake: QT += 3drender
Since: Qt 5.7
實例化: 幾何體
繼承: Qt3DCore::QNode
繼承者: Qt3DExtras::QConeGeometry , Qt3DExtras::QCuboidGeometry , Qt3DExtras::QCylinderGeometry , Qt3DExtras::QExtrudedTextGeometry , Qt3DExtras::QPlaneGeometry , Qt3DExtras::QSphereGeometry ,和 Qt3DExtras::QTorusGeometry

特性

公共函數

QGeometry (Qt3DCore::QNode * parent = nullptr)
void addAttribute (Qt3DRender::QAttribute * attribute )
QVector<QAttribute *> attributes () const
QAttribute * boundingVolumePositionAttribute () const
void removeAttribute (Qt3DRender::QAttribute * attribute )

公共槽

void setBoundingVolumePositionAttribute (QAttribute * boundingVolumePositionAttribute )

信號

void boundingVolumePositionAttributeChanged (QAttribute * boundingVolumePositionAttribute )

保護函數

QGeometry (QGeometryPrivate & dd , Qt3DCore::QNode * parent = nullptr)

額外繼承成員

詳細描述

封裝幾何體

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.

特性文檔編製

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 .

訪問函數:

QAttribute * boundingVolumePositionAttribute () const
void setBoundingVolumePositionAttribute (QAttribute * boundingVolumePositionAttribute )

通知程序信號:

void boundingVolumePositionAttributeChanged (QAttribute * boundingVolumePositionAttribute )

另請參閱 Qt3DRender::QAttribute .

成員函數文檔編製

QGeometry:: QGeometry ( Qt3DCore::QNode * parent = nullptr)

Default constructs an instance of QGeometry.

[protected] QGeometry:: QGeometry ( QGeometryPrivate & dd , Qt3DCore::QNode * parent = nullptr)

Copy constructor.

void QGeometry:: addAttribute ( Qt3DRender::QAttribute * attribute )

添加 attribute to this geometry.

QVector < QAttribute *> QGeometry:: attributes () const

Returns the list of attributes in this geometry.

void QGeometry:: removeAttribute ( Qt3DRender::QAttribute * attribute )

移除給定 attribute from this geometry.