16void QSGCurveStrokeNode::QSGCurveStrokeNode::updateMaterial()
19 setMaterial(m_material.data());
24std::array<QVector2D, 3> QSGCurveStrokeNode::curveABC(
const std::array<QVector2D, 3> &
p)
35 const std::array<QVector2D, 3> &
p,
36 const std::array<QVector2D, 3> &
n)
38 auto abc = curveABC(
p);
42 for (
int i = 0;
i < 3; ++
i) {
44 abc[0].
x(), abc[0].
y(), abc[1].
x(), abc[1].
y(), abc[2].
x(), abc[2].
y(),
52 const std::array<QVector2D, 2> &
p,
53 const std::array<QVector2D, 3> &
n)
66 for (
int i = 0;
i < 3; ++
i) {
68 A.x(),
A.y(),
B.x(),
B.y(), C.x(), C.y(),
69 n[
i].x(),
n[
i].y() } );
88 memcpy(
g->vertexData(),
90 g->vertexCount() *
g->sizeOfVertex());
91 memcpy(
g->indexData(),
93 g->indexCount() *
g->sizeOfIndex());
const QSGGeometry * geometry() const
Returns this node's geometry.
void setGeometry(QSGGeometry *geometry)
Sets the geometry of this node to geometry.
QVector< quint32 > m_uncookedIndexes
QVector< StrokeVertex > m_uncookedVertexes
static const QSGGeometry::AttributeSet & attributes()
void cookGeometry() override
void appendTriangle(const std::array< QVector2D, 3 > &v, const std::array< QVector2D, 3 > &p, const std::array< QVector2D, 3 > &n)
The QSGGeometry class provides low-level storage for graphics primitives in the \l{Qt Quick Scene Gra...
void setFlag(Flag, bool=true)
Sets the flag f on this node if enabled is true; otherwise clears the flag.
The QVector2D class represents a vector or vertex in 2D space.
Combined button and popup list for selecting options.
static struct AttrInfo attrs[]
GLboolean GLboolean GLboolean b
GLsizei const GLfloat * v
[13]
GLint GLint GLint GLint GLint x
[0]
GLboolean GLboolean GLboolean GLboolean a
[7]
GLint GLsizei GLsizei GLenum GLenum GLsizei void * data
The QSGGeometry::AttributeSet describes how the vertices in a QSGGeometry are built up.
The QSGGeometry::Attribute describes a single vertex attribute in a QSGGeometry.
static Attribute createWithAttributeType(int pos, int tupleSize, int primitiveType, AttributeType attributeType)
Creates a new QSGGeometry::Attribute for attribute register pos with tupleSize.