Namespace QAccelPlot::LineStroke¶
Namespace List > QAccelPlot > LineStroke
Building blocks for the line ribbon drawn by the line shaders, shared by the line renderers.
Classes¶
| Type | Name |
|---|---|
| struct | Uniforms Uniforms of a line material that do not depend on its shader variant. |
Public Functions¶
| Type | Name |
|---|---|
| void | applyUniforms (LineMaterial & material, const Uniforms & uniforms) Copies uniforms into__material . |
| std::vector< float > | arcLengths (const int pointCount, const PixelAt & pixelAt) Returns the cumulative pixel length at each of pointCount data points, for dash patterns. |
| QSGGeometryNode * | createNode (int vertexCount, QSGMaterial * material) Returns a triangle-strip node with vertexCount line vertices that owns__material . |
| const QSGGeometry::AttributeSet & | vertexAttributes () Returns the vertex attribute set matching LineVertex . |
| void | writeVertices (LineVertex * vertices, int pointCount, int cornerCount, const QColor & color, const std::vector< float > & arcLengths, int firstPoint=0) Writes two ribbon vertices per path point for data points [ firstPoint _,_pointCount ) of__cornerCount path points each into__vertices . |
Public Functions Documentation¶
function applyUniforms¶
Copies uniforms into__material .
function arcLengths¶
Returns the cumulative pixel length at each of pointCount data points, for dash patterns.
template<typename PixelAt>
std::vector< float > QAccelPlot::LineStroke::arcLengths (
const int pointCount,
const PixelAt & pixelAt
)
pixelAt returns the pixel position of a data point, or std::nullopt for an invalid data point. Segments touching an invalid data point add no length, so the dash phase continues across a gap.
function createNode¶
Returns a triangle-strip node with vertexCount line vertices that owns__material .
function vertexAttributes¶
Returns the vertex attribute set matching LineVertex .
function writeVertices¶
Writes two ribbon vertices per path point for data points [ firstPoint _,_pointCount ) of__cornerCount path points each into__vertices .
void QAccelPlot::LineStroke::writeVertices (
LineVertex * vertices,
int pointCount,
int cornerCount,
const QColor & color,
const std::vector< float > & arcLengths,
int firstPoint=0
)
vertices holds the vertices of all pointCount data points; those before firstPoint are left unchanged. arcLengths holds cumulative lengths of the leading path points, or is empty for solid lines. Path points past its end, such as vertices reserved for appended data, repeat its last length.
The documentation for this class was generated from the following file QAccelPlot/src/QAccelPlot/renderers/LineStroke.hpp