16void QQuickShapeStrokeNode::QQuickShapeStrokeNode::updateMaterial()
19 setMaterial(m_material.data());
42 float H = (3. *
a *
c -
b *
b) / (3. *
a *
a);
43 float G = (2. *
b *
b *
b - 9. *
a *
b *
c + 27. *
a *
a *
d) / (27. *
a *
a *
a);
62 auto abc = curveABC(p0,
p1,
p2);
67 auto hg = HGforPoint(abc[0], abc[1], abc[2],
p);
70 abc[0].x(), abc[0].y(), abc[1].x(), abc[1].y(), abc[2].x(), abc[2].y(),
91 auto hg = HGforPoint(
A,
B, C,
p);
93 A.x(),
A.y(),
B.x(),
B.y(), C.x(), C.y(),
114 memcpy(
g->vertexData(),
116 g->vertexCount() *
g->sizeOfVertex());
117 memcpy(
g->indexData(),
119 g->indexCount() *
g->sizeOfIndex());
void appendTriangle(const QVector2D &v0, const QVector2D &v1, const QVector2D &v2, const QVector2D &p0, const QVector2D &p1, const QVector2D &p2)
QVector< StrokeVertex > m_uncookedVertexes
static const QSGGeometry::AttributeSet & attributes()
QVector< quint32 > m_uncookedIndexes
const QSGGeometry * geometry() const
Returns this node's geometry.
void setGeometry(QSGGeometry *geometry)
Sets the geometry of this node to geometry.
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.
static constexpr float dotProduct(QVector2D v1, QVector2D v2) noexcept
Returns the dot product of v1 and v2.
The QVector3D class represents a vector or vertex in 3D space.
Combined button and popup list for selecting options.
static struct AttrInfo attrs[]
GLint GLfloat GLfloat GLfloat v2
GLboolean GLboolean GLboolean b
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.