Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
qssgshadowmaphelpers.cpp File Reference

(dd78bf80046946c53e4c3b3b89082e22c141d921)

+ Include dependency graph for qssgshadowmaphelpers.cpp:

Go to the source code of this file.

Classes

struct  Vertex
 \qmltype MapCircle \instantiates QDeclarativeCircleMapItem \inqmlmodule QtLocation More...
 

Functions

static bool lineLineIntersection (QVector2D a, QVector2D b, QVector2D c, QVector2D d)
 
static QList< QVector3DsliceBoxByPlanes (const QList< std::array< QVector3D, 2 > > &planes, const QSSGBoxPoints &castingBox, QSSGDebugDrawSystem *debugDrawSystem, const QColor &color)
 

Variables

static QT_BEGIN_NAMESPACE constexpr std::array< std::array< int, 2 >, 12 > BOX_LINE_INDICES
 

Function Documentation

◆ lineLineIntersection()

static bool lineLineIntersection ( QVector2D a,
QVector2D b,
QVector2D c,
QVector2D d )
static

Definition at line 85 of file qssgshadowmaphelpers.cpp.

References a1, a2, c2, d, qFuzzyCompare(), qMax(), qMin(), QVector2D::x(), and QVector2D::y().

Referenced by sliceBoxByPlanes().

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

◆ sliceBoxByPlanes()

static QList< QVector3D > sliceBoxByPlanes ( const QList< std::array< QVector3D, 2 > > & planes,
const QSSGBoxPoints & castingBox,
QSSGDebugDrawSystem * debugDrawSystem,
const QColor & color )
static

Definition at line 152 of file qssgshadowmaphelpers.cpp.

References Vertex::active, BOX_LINE_INDICES, QVector3D::crossProduct(), d, QVector3D::dotProduct(), QSSGDebugDrawSystem::drawLine(), i, QSSGRenderRay::intersect(), j, line, lineLineIntersection(), Vertex::neighbors, position(), Vertex::position, Q_ASSERT, QSSGDebugDrawSystem::setEnabled(), QVector3D::x(), and QVector3D::y().

Referenced by ShadowmapHelpers::intersectBoxByBox().

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

Variable Documentation

◆ BOX_LINE_INDICES

QT_BEGIN_NAMESPACE constexpr std::array<std::array<int, 2>, 12> BOX_LINE_INDICES
staticconstexpr
Initial value:
= {
std::array<int, 2> { 0, 1 }, std::array<int, 2> { 1, 2 }, std::array<int, 2> { 2, 3 }, std::array<int, 2> { 3, 0 },
std::array<int, 2> { 4, 5 }, std::array<int, 2> { 5, 6 }, std::array<int, 2> { 6, 7 }, std::array<int, 2> { 7, 4 },
std::array<int, 2> { 0, 4 }, std::array<int, 2> { 1, 5 }, std::array<int, 2> { 2, 6 }, std::array<int, 2> { 3, 7 },
}

Definition at line 12 of file qssgshadowmaphelpers.cpp.

Referenced by ShadowmapHelpers::addDebugBox(), and sliceBoxByPlanes().