Qt 6.x
The Qt SDK
Loading...
Searching...
No Matches
qquickshapecurverenderer.cpp File Reference
#include "qquickshapecurverenderer_p.h"
#include "qquickshapecurverenderer_p_p.h"
#include "qquickshapecurvenode_p.h"
#include "qquickshapestrokenode_p.h"
#include <QtGui/qvector2d.h>
#include <QtGui/qvector4d.h>
#include <QtGui/private/qtriangulator_p.h>
#include <QtGui/private/qtriangulatingstroker_p.h>
#include <QtGui/private/qrhi_p.h>
#include <QtQuick/qsgmaterial.h>
#include <QThread>
+ Include dependency graph for qquickshapecurverenderer.cpp:

Go to the source code of this file.

Classes

class  ElementCutter
 

Macros

#define QQUICKSHAPECURVERENDERER_CONVEX_CHECK_ERROR_MARGIN   (1.0f / 32.0f)
 

Functions

QT_BEGIN_NAMESPACE Q_LOGGING_CATEGORY (lcShapeCurveRenderer, "qt.shape.curverenderer")
 
static float crossProduct (const QVector2D &sp, const QVector2D &p, const QVector2D &ep)
 
static void printElement (QDebug stream, const QuadPath::Element &element)
 
QDebug operator<< (QDebug stream, const QuadPath::Element &element)
 
QDebug operator<< (QDebug stream, const QuadPath &path)
 
static QVector2D uvForPoint (QVector2D v1, QVector2D v2, QVector2D p)
 
static QVector2D curveUv (QVector2D p0, QVector2D p1, QVector2D p2, QVector2D p)
 
static QVector2D calcNormalVector (QVector2D a, QVector2D b)
 
static float testSideOfLineByNormal (QVector2D a, QVector2D n, QVector2D p)
 
template<typename Func >
void iteratePath (const QuadPath &path, int index, Func &&lambda)
 
static void handleOverlap (QuadPath &path, qsizetype e1, qsizetype e2, int recursionLevel=0)
 
static void handleOverlap (QuadPath &path, qsizetype e1, const QVector2D vertex, int recursionLevel=0)
 

Macro Definition Documentation

◆ QQUICKSHAPECURVERENDERER_CONVEX_CHECK_ERROR_MARGIN

#define QQUICKSHAPECURVERENDERER_CONVEX_CHECK_ERROR_MARGIN   (1.0f / 32.0f)

Definition at line 24 of file qquickshapecurverenderer.cpp.

Function Documentation

◆ calcNormalVector()

static QVector2D calcNormalVector ( QVector2D  a,
QVector2D  b 
)
inlinestatic

Definition at line 968 of file qquickshapecurverenderer.cpp.

◆ crossProduct()

static float crossProduct ( const QVector2D sp,
const QVector2D p,
const QVector2D ep 
)
static

Definition at line 173 of file qquickshapecurverenderer.cpp.

References sp.

Referenced by QVector3D::normal(), and QVector3D::normal().

+ Here is the caller graph for this function:

◆ curveUv()

static QVector2D curveUv ( QVector2D  p0,
QVector2D  p1,
QVector2D  p2,
QVector2D  p 
)
inlinestatic

Definition at line 952 of file qquickshapecurverenderer.cpp.

References p1, p2, and uvForPoint().

Referenced by QuadPath::Element::uvForPoint().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ handleOverlap() [1/2]

static void handleOverlap ( QuadPath path,
qsizetype  e1,
const QVector2D  vertex,
int  recursionLevel = 0 
)
static

Definition at line 2103 of file qquickshapecurverenderer.cpp.

References handleOverlap(), and qDebug.

+ Here is the call graph for this function:

◆ handleOverlap() [2/2]

static void handleOverlap ( QuadPath path,
qsizetype  e1,
qsizetype  e2,
int  recursionLevel = 0 
)
static

Definition at line 2043 of file qquickshapecurverenderer.cpp.

References handleOverlap(), and qDebug.

Referenced by handleOverlap(), and handleOverlap().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ iteratePath()

template<typename Func >
void iteratePath ( const QuadPath path,
int  index,
Func &&  lambda 
)

Definition at line 982 of file qquickshapecurverenderer.cpp.

References QuadPath::Element::childCount(), i, QuadPath::Element::indexOfChild(), and iteratePath().

Referenced by iteratePath().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ operator<<() [1/2]

QDebug operator<< ( QDebug  stream,
const QuadPath path 
)

Definition at line 716 of file qquickshapecurverenderer.cpp.

◆ operator<<() [2/2]

QDebug operator<< ( QDebug  stream,
const QuadPath::Element element 
)

Definition at line 706 of file qquickshapecurverenderer.cpp.

◆ printElement()

static void printElement ( QDebug  stream,
const QuadPath::Element element 
)
static

Definition at line 695 of file qquickshapecurverenderer.cpp.

References QuadPath::Element::controlPoint(), QuadPath::Element::endPoint(), QuadPath::Element::isConvex(), QuadPath::Element::isLine(), QuadPath::Element::isSubpathEnd(), QuadPath::Element::isSubpathStart(), and QuadPath::Element::startPoint().

+ Here is the call graph for this function:

◆ Q_LOGGING_CATEGORY()

QT_BEGIN_NAMESPACE Q_LOGGING_CATEGORY ( lcShapeCurveRenderer  ,
"qt.shape.curverenderer"   
)

◆ testSideOfLineByNormal()

static float testSideOfLineByNormal ( QVector2D  a,
QVector2D  n,
QVector2D  p 
)
inlinestatic

Definition at line 975 of file qquickshapecurverenderer.cpp.

References dot(), and QVector2D::dotProduct().

+ Here is the call graph for this function:

◆ uvForPoint()

static QVector2D uvForPoint ( QVector2D  v1,
QVector2D  v2,
QVector2D  p 
)
inlinestatic

Definition at line 940 of file qquickshapecurverenderer.cpp.

References QVector2D::x().

Referenced by QQuickShapeCurveNode::appendTriangle(), QQuickShapeCurveNode::appendVertex(), and curveUv().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: