QGeometryRenderer Class

class Qt3DRender::QGeometryRenderer

Encapsulates geometry rendering. More...

This class was introduced in Qt 5.7.

Public Types

enum PrimitiveType { Points, Lines, LineLoop, LineStrip, Triangles, …, Patches }

Public Functions

QGeometryRenderer(Qt3DCore::QNode *parent = nullptr)
Qt3DRender::QGeometryFactoryPtr geometryFactory() const
void setGeometryFactory(const Qt3DRender::QGeometryFactoryPtr &factory)

Detailed Description

A Qt3DRender::QGeometryRenderer holds all the information necessary to draw a Qt3DRender::QGeometry. A QGeometry holds the coordinates of the geometry data - QGeometryRenderer specifies how to interpret that data.

Member Type Documentation

enum QGeometryRenderer::PrimitiveType

The type of the primitive.

ConstantValueDescription
Qt3DRender::QGeometryRenderer::Points0x0000List of points
Qt3DRender::QGeometryRenderer::Lines0x0001List of lines
Qt3DRender::QGeometryRenderer::LineLoop0x0002Connected group of lines connected at ends forming a loop
Qt3DRender::QGeometryRenderer::LineStrip0x0003Connected group of lines
Qt3DRender::QGeometryRenderer::Triangles0x0004List of triangles
Qt3DRender::QGeometryRenderer::TriangleStrip0x0005List of connected triangles
Qt3DRender::QGeometryRenderer::TriangleFan0x0006List of connected triagles where all triangles share the first vertex
Qt3DRender::QGeometryRenderer::LinesAdjacency0x000AAllows geometry shader to access adjacent lines in a line list
Qt3DRender::QGeometryRenderer::TrianglesAdjacency0x000CAllows geometry shader to access adjacent triangles in a triangle list
Qt3DRender::QGeometryRenderer::LineStripAdjacency0x000BAllows geometry shader to access adjacent lines in a line strip
Qt3DRender::QGeometryRenderer::TriangleStripAdjacency0x000DAllows geometry shader to access adjacent triangles in a triangle strip
Qt3DRender::QGeometryRenderer::Patches0x000EOnly primitive type accepted by tesselation shader where a patch consists of arbitrary number of vertices

Member Function Documentation

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

Constructs a new QGeometryRenderer with parent.

Qt3DRender::QGeometryFactoryPtr QGeometryRenderer::geometryFactory() const

Returns the geometry functor.

See also setGeometryFactory().

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

Sets the geometry factory.

See also geometryFactory().