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
QSSGClipPlane Struct Reference

#include <qssgrenderclippingfrustum_p.h>

+ Collaboration diagram for QSSGClipPlane:

Classes

struct  BoxEdge
 

Public Types

enum  BoxEdgeID : quint8 { None = 0 , xMax = 1 , yMax = 1 << 1 , zMax = 1 << 2 }
 
using BoxEdgeFlag = std::underlying_type_t<BoxEdgeID>
 

Public Member Functions

constexpr float distance (const QVector3D &pt) const
 
QVector3D intersectWithLine (const QVector3D &p0, const QVector3D &p1) const
 
int intersect (const QSSGBounds3 &bounds) const
 
constexpr bool intersectSimple (const QSSGBounds3 &bounds) const
 
void calculateBBoxEdges ()
 

Static Public Member Functions

static constexpr QVector3D corner (const QSSGBounds3 &bounds, BoxEdgeFlag edge)
 

Public Attributes

QVector3D normal
 
float d
 
BoxEdge mEdges
 

Detailed Description

Definition at line 25 of file qssgrenderclippingfrustum_p.h.

Member Typedef Documentation

◆ BoxEdgeFlag

using QSSGClipPlane::BoxEdgeFlag = std::underlying_type_t<BoxEdgeID>

Definition at line 34 of file qssgrenderclippingfrustum_p.h.

Member Enumeration Documentation

◆ BoxEdgeID

Enumerator
None 
xMax 
yMax 
zMax 

Definition at line 27 of file qssgrenderclippingfrustum_p.h.

Member Function Documentation

◆ calculateBBoxEdges()

void QSSGClipPlane::calculateBBoxEdges ( )
inline

◆ corner()

static constexpr QVector3D QSSGClipPlane::corner ( const QSSGBounds3 & bounds,
BoxEdgeFlag edge )
inlinestaticconstexpr

Definition at line 75 of file qssgrenderclippingfrustum_p.h.

References QSSGBounds3::maximum, QSSGBounds3::minimum, xMax, yMax, and zMax.

Referenced by intersect(), and intersectSimple().

+ Here is the caller graph for this function:

◆ distance()

constexpr float QSSGClipPlane::distance ( const QVector3D & pt) const
inlineconstexpr

Definition at line 51 of file qssgrenderclippingfrustum_p.h.

References d, QVector3D::dotProduct(), and normal.

+ Here is the call graph for this function:

◆ intersect()

int QSSGClipPlane::intersect ( const QSSGBounds3 & bounds) const
inline

intersection test between plane and bounding sphere. return 1 if the bs is completely above plane, return 0 if the bs intersects the plane, return -1 if the bs is completely below the plane.

Definition at line 90 of file qssgrenderclippingfrustum_p.h.

References corner(), QSSGClipPlane::BoxEdge::lowerEdge, mEdges, and QSSGClipPlane::BoxEdge::upperEdge.

+ Here is the call graph for this function:

◆ intersectSimple()

constexpr bool QSSGClipPlane::intersectSimple ( const QSSGBounds3 & bounds) const
inlineconstexpr

Definition at line 105 of file qssgrenderclippingfrustum_p.h.

References corner(), QSSGClipPlane::BoxEdge::lowerEdge, mEdges, and QSSGClipPlane::BoxEdge::upperEdge.

+ Here is the call graph for this function:

◆ intersectWithLine()

QVector3D QSSGClipPlane::intersectWithLine ( const QVector3D & p0,
const QVector3D & p1 ) const
inline

Definition at line 54 of file qssgrenderclippingfrustum_p.h.

References d, dir, QVector3D::dotProduct(), normal, p1, Q_ASSERT, and qAbs().

+ Here is the call graph for this function:

Member Data Documentation

◆ d

float QSSGClipPlane::d

◆ mEdges

BoxEdge QSSGClipPlane::mEdges

Definition at line 47 of file qssgrenderclippingfrustum_p.h.

Referenced by calculateBBoxEdges(), intersect(), and intersectSimple().

◆ normal


The documentation for this struct was generated from the following file: