Qt 5.7 | Qt 3D | C++ Classes | QGeometryRenderer

Qt 5.7.1 Reference Documentation

# QGeometryRenderer Class

(Qt3DRender::QGeometryRenderer)

Header: | #include <QGeometryRenderer>
qmake: | QT += 3drender
Instantiated By: | GeometryRenderer
Inherits: | Qt3DCore::QComponent
Inherited By: | Qt3DExtras::QConeMesh, Qt3DExtras::QCuboidMesh, Qt3DExtras::QCylinderMesh, Qt3DExtras::QPlaneMesh, Qt3DExtras::QSphereMesh, Qt3DExtras::QTorusMesh, and Qt3DRender::QMesh

- List of all members, including inherited members

## Public Types

enum | PrimitiveType { Points, Lines, LineLoop, LineStrip, ..., Patches }

## Properties

- firstInstance : int
- firstVertex : int
- geometry : Qt3DRender::QGeometry *
- indexOffset : int
- instanceCount : int

- primitiveRestartEnabled : bool
- primitiveType : PrimitiveType
- restartIndexValue : int
- vertexCount : int
- verticesPerPatch : int

- 1 property inherited from Qt3DCore::QComponent
- 2 properties inherited from Qt3DCore::QNode

## Public Functions

| QGeometryRenderer(Qt3DCore::QNode *parent = nullptr)
int | firstInstance() const
int | firstVertex() const
QGeometry * | geometry() const
QGeometryFactoryPtr | geometryFactory() const
int | indexOffset() const
int | instanceCount() const
bool | primitiveRestartEnabled() const
PrimitiveType | primitiveType() const
int | restartIndexValue() const
void | setGeometryFactory(const QGeometryFactoryPtr &factory)
int | vertexCount() const
int | verticesPerPatch() const

- 2 public functions inherited from Qt3DCore::QComponent
- 6 public functions inherited from Qt3DCore::QNode

## Public Slots

void | setFirstInstance(int firstInstance)
void | setFirstVertex(int firstVertex)
void | setGeometry(QGeometry *geometry)
void | setIndexOffset(int indexOffset)
void | setInstanceCount(int instanceCount)
void | setPrimitiveRestartEnabled(bool enabled)
void | setPrimitiveType(PrimitiveType primitiveType)
void | setRestartIndexValue(int index)
void | setVertexCount(int vertexCount)
void | setVerticesPerPatch(int verticesPerPatch)

- 1 public slot inherited from Qt3DCore::QComponent
- 2 public slots inherited from Qt3DCore::QNode

## Signals

void | firstInstanceChanged(int firstInstance)
void | firstVertexChanged(int firstVertex)
void | geometryChanged(QGeometry *geometry)
void | indexOffsetChanged(int indexOffset)
void | instanceCountChanged(int instanceCount)
void | primitiveRestartEnabledChanged(bool primitiveRestartEnabled)
void | primitiveTypeChanged(PrimitiveType primitiveType)
void | restartIndexValueChanged(int restartIndexValue)
void | vertexCountChanged(int vertexCount)
void | verticesPerPatchChanged(int verticesPerPatch)

- 1 signal inherited from Qt3DCore::QComponent
- 3 signals inherited from Qt3DCore::QNode

## Protected Functions

| QGeometryRenderer(QGeometryRendererPrivate &dd, Qt3DCore::QNode *parent = nullptr)

- 2 protected functions inherited from Qt3DCore::QNode

## Detailed Description

## Member Type Documentation

### enum QGeometryRenderer::PrimitiveType

The type of the primitive.

Constant | Value
--- | ---
`Qt3DRender::QGeometryRenderer::Points` | `0x0000`
`Qt3DRender::QGeometryRenderer::Lines` | `0x0001`
`Qt3DRender::QGeometryRenderer::LineLoop` | `0x0002`
`Qt3DRender::QGeometryRenderer::LineStrip` | `0x0003`
`Qt3DRender::QGeometryRenderer::Triangles` | `0x0004`
`Qt3DRender::QGeometryRenderer::TriangleStrip` | `0x0005`
`Qt3DRender::QGeometryRenderer::TriangleFan` | `0x0006`
`Qt3DRender::QGeometryRenderer::LinesAdjacency` | `0x000A`
`Qt3DRender::QGeometryRenderer::TrianglesAdjacency` | `0x000C`
`Qt3DRender::QGeometryRenderer::LineStripAdjacency` | `0x000B`
`Qt3DRender::QGeometryRenderer::TriangleStripAdjacency` | `0x000D`
`Qt3DRender::QGeometryRenderer::Patches` | `0x000E`

## Property Documentation

### firstInstance : int

Holds the base instance.

Access functions:

int | firstInstance() const
void | setFirstInstance(int firstInstance)

Notifier signal:

void | firstInstanceChanged(int firstInstance)

### firstVertex : int

Holds the base vertex.

Access functions:

int | firstVertex() const
void | setFirstVertex(int firstVertex)

Notifier signal:

void | firstVertexChanged(int firstVertex)

### geometry : Qt3DRender::QGeometry *

Holds the geometry.

Access functions:

QGeometry * | geometry() const
void | setGeometry(QGeometry *geometry)

Notifier signal:

void | geometryChanged(QGeometry *geometry)

### indexOffset : int

Holds the base vertex.

Access functions:

int | indexOffset() const
void | setIndexOffset(int indexOffset)

Notifier signal:

void | indexOffsetChanged(int indexOffset)

### instanceCount : int

Holds the instance count.

Access functions:

int | instanceCount() const
void | setInstanceCount(int instanceCount)

Notifier signal:

void | instanceCountChanged(int instanceCount)

### primitiveRestartEnabled : bool

Holds the primitive restart flag.

Access functions:

bool | primitiveRestartEnabled() const
void | setPrimitiveRestartEnabled(bool enabled)

Notifier signal:

void | primitiveRestartEnabledChanged(bool primitiveRestartEnabled)

### primitiveType : PrimitiveType

Holds the primitive type.

Access functions:

PrimitiveType | primitiveType() const
void | setPrimitiveType(PrimitiveType primitiveType)

Notifier signal:

void | primitiveTypeChanged(PrimitiveType primitiveType)

### restartIndexValue : int

Holds the restart index.

Access functions:

int | restartIndexValue() const
void | setRestartIndexValue(int index)

Notifier signal:

void | restartIndexValueChanged(int restartIndexValue)

### vertexCount : int

Holds the primitive count.

Access functions:

int | vertexCount() const
void | setVertexCount(int vertexCount)

Notifier signal:

void | vertexCountChanged(int vertexCount)

### verticesPerPatch : int

Holds vertices per patch.

Access functions:

int | verticesPerPatch() const
void | setVerticesPerPatch(int verticesPerPatch)

Notifier signal:

void | verticesPerPatchChanged(int verticesPerPatch)

## Member Function Documentation

### QGeometryRenderer::QGeometryRenderer(Qt3DCore::QNode *parent = nullptr)

Default constructs an instance of QGeometryRenderer.

### `[protected]` QGeometryRenderer::QGeometryRenderer(QGeometryRendererPrivate &dd, Qt3DCore::QNode *parent = nullptr)

Copy constructor.

### QGeometryFactoryPtr QGeometryRenderer::geometryFactory() const

Returns the geometry functor.

See also setGeometryFactory().

### void QGeometryRenderer::setGeometryFactory(const QGeometryFactoryPtr &factory)

Sets the geometry factory.

See also geometryFactory().