Qt 5.8 | Qt 3D | C++ Classes | QCuboidGeometry

Qt 5.8.0 Reference Documentation

# QCuboidGeometry Class

(Qt3DExtras::QCuboidGeometry)

The QCuboidGeometry class allows creation of a cuboid in 3D space. More...

Header: | #include <QCuboidGeometry>
qmake: | QT += 3dextras
Since: | Qt 5.7
Instantiated By: | CuboidGeometry
Inherits: | Qt3DRender::QGeometry

- List of all members, including inherited members

## Properties

- indexAttribute : Qt3DRender::QAttribute * const
- normalAttribute : Qt3DRender::QAttribute * const
- positionAttribute : Qt3DRender::QAttribute * const
- tangentAttribute : Qt3DRender::QAttribute * const
- texCoordAttribute : Qt3DRender::QAttribute * const
- xExtent : float

- xyMeshResolution : QSize
- xzMeshResolution : QSize
- yExtent : float
- yzMeshResolution : QSize
- zExtent : float

- 1 property inherited from Qt3DRender::QGeometry
- 2 properties inherited from Qt3DCore::QNode

## Public Functions

| QCuboidGeometry(QNode *parent = nullptr)
Qt3DRender::QAttribute * | indexAttribute() const
Qt3DRender::QAttribute * | normalAttribute() const
Qt3DRender::QAttribute * | positionAttribute() const
Qt3DRender::QAttribute * | tangentAttribute() const
Qt3DRender::QAttribute * | texCoordAttribute() const
void | updateIndices()
void | updateVertices()
float | xExtent() const
QSize | xyMeshResolution() const
QSize | xzMeshResolution() const
float | yExtent() const
QSize | yzMeshResolution() const
float | zExtent() const

- 4 public functions inherited from Qt3DRender::QGeometry
- 6 public functions inherited from Qt3DCore::QNode

## Public Slots

void | setXExtent(float xExtent)
void | setXYMeshResolution(const QSize &resolution)
void | setXZMeshResolution(const QSize &resolution)
void | setYExtent(float yExtent)
void | setYZMeshResolution(const QSize &resolution)
void | setZExtent(float zExtent)

- 1 public slot inherited from Qt3DRender::QGeometry
- 2 public slots inherited from Qt3DCore::QNode

## Signals

void | xExtentChanged(float xExtent)
void | xyMeshResolutionChanged(const QSize &xyMeshResolution)
void | xzMeshResolutionChanged(const QSize &xzMeshResolution)
void | yExtentChanged(float yExtent)
void | yzMeshResolutionChanged(const QSize &yzMeshResolution)
void | zExtentChanged(float zExtent)

- 1 signal inherited from Qt3DRender::QGeometry
- 3 signals inherited from Qt3DCore::QNode

### Additional Inherited Members

- 2 protected functions inherited from Qt3DCore::QNode

## Detailed Description

The QCuboidGeometry class allows creation of a cuboid in 3D space.

The QCuboidGeometry class is most commonly used internally by the QCuboidMesh but can also be used in custom Qt3DRender::QGeometryRenderer subclasses.

## Property Documentation

### indexAttribute : Qt3DRender::QAttribute * const

Holds the geometry index attribute.

Access functions:

Qt3DRender::QAttribute * | indexAttribute() const

### normalAttribute : Qt3DRender::QAttribute * const

Holds the geometry normal attribute.

Access functions:

Qt3DRender::QAttribute * | normalAttribute() const

### positionAttribute : Qt3DRender::QAttribute * const

Holds the geometry position attribute.

Access functions:

Qt3DRender::QAttribute * | positionAttribute() const

### tangentAttribute : Qt3DRender::QAttribute * const

Holds the geometry tangent attribute.

Access functions:

Qt3DRender::QAttribute * | tangentAttribute() const

### texCoordAttribute : Qt3DRender::QAttribute * const

Holds the geometry texture coordinate attribute.

Access functions:

Qt3DRender::QAttribute * | texCoordAttribute() const

### xExtent : float

Holds the x extent of the geometry.

Access functions:

float | xExtent() const
void | setXExtent(float xExtent)

Notifier signal:

void | xExtentChanged(float xExtent)

### xyMeshResolution : QSize

Holds the x-y resolution. The width and height values of this property specify the number of vertices generated for the x-y faces of the mesh.

Access functions:

QSize | xyMeshResolution() const
void | setXYMeshResolution(const QSize &resolution)

Notifier signal:

void | xyMeshResolutionChanged(const QSize &xyMeshResolution)

### xzMeshResolution : QSize

Holds the x-z resolution. The width and height values of this property specify the number of vertices generated for the x-z faces of the mesh.

Access functions:

QSize | xzMeshResolution() const
void | setXZMeshResolution(const QSize &resolution)

Notifier signal:

void | xzMeshResolutionChanged(const QSize &xzMeshResolution)

### yExtent : float

Holds the y extent of the geometry.

Access functions:

float | yExtent() const
void | setYExtent(float yExtent)

Notifier signal:

void | yExtentChanged(float yExtent)

### yzMeshResolution : QSize

Holds the y-z resolution. The width and height values of this property specify the number of vertices generated for the y-z faces of the mesh.

Access functions:

QSize | yzMeshResolution() const
void | setYZMeshResolution(const QSize &resolution)

Notifier signal:

void | yzMeshResolutionChanged(const QSize &yzMeshResolution)

### zExtent : float

Holds the z extent of the geometry.

Access functions:

float | zExtent() const
void | setZExtent(float zExtent)

Notifier signal:

void | zExtentChanged(float zExtent)

## Member Function Documentation

### QCuboidGeometry::QCuboidGeometry(QNode *parent = nullptr)

Constructs a new QCuboidGeometry with parent.

### void QCuboidGeometry::updateIndices()

Updates indices based on mesh resolutions.

### void QCuboidGeometry::updateVertices()

Updates vertices based on mesh resolutions.