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
QSSGPlane Class Reference

Representation of a plane. More...

#include <qssgplane_p.h>

+ Collaboration diagram for QSSGPlane:

Public Member Functions

 QSSGPlane ()=default
 
Q_ALWAYS_INLINE QSSGPlane (float nx, float ny, float nz, float distance)
 Constructor from a normal and a distance.
 
Q_ALWAYS_INLINE QSSGPlane (const QVector3D &normal, float distance)
 Constructor from a normal and a distance.
 
Q_ALWAYS_INLINE QSSGPlane (const QVector3D &point, const QVector3D &normal)
 Constructor from a point on the plane and a normal.
 
Q_ALWAYS_INLINE QSSGPlane (const QVector3D &p0, const QVector3D &p1, const QVector3D &p2)
 Constructor from three points.
 
Q_ALWAYS_INLINE float distance (const QVector3D &p) const
 
Q_ALWAYS_INLINE bool contains (const QVector3D &p) const
 
Q_ALWAYS_INLINE QVector3D project (const QVector3D &p) const
 projects p into the plane
 
Q_ALWAYS_INLINE QVector3D pointInPlane () const
 find an arbitrary point in the plane
 
void normalize ()
 equivalent plane with unit normal
 

Public Attributes

QVector3D n
 The normal to the plane.
 
float d = 0.0f
 The distance from the origin.
 

Detailed Description

Representation of a plane.

Plane equation used: n.dot(v) + d = 0

Definition at line 30 of file qssgplane_p.h.

Constructor & Destructor Documentation

◆ QSSGPlane() [1/5]

QSSGPlane::QSSGPlane ( )
default

◆ QSSGPlane() [2/5]

Q_ALWAYS_INLINE QSSGPlane::QSSGPlane ( float nx,
float ny,
float nz,
float distance )
inline

Constructor from a normal and a distance.

Definition at line 38 of file qssgplane_p.h.

◆ QSSGPlane() [3/5]

Q_ALWAYS_INLINE QSSGPlane::QSSGPlane ( const QVector3D & normal,
float distance )
inline

Constructor from a normal and a distance.

Definition at line 43 of file qssgplane_p.h.

◆ QSSGPlane() [4/5]

Q_ALWAYS_INLINE QSSGPlane::QSSGPlane ( const QVector3D & point,
const QVector3D & normal )
inline

Constructor from a point on the plane and a normal.

Definition at line 48 of file qssgplane_p.h.

◆ QSSGPlane() [5/5]

Q_ALWAYS_INLINE QSSGPlane::QSSGPlane ( const QVector3D & p0,
const QVector3D & p1,
const QVector3D & p2 )
inline

Constructor from three points.

Definition at line 56 of file qssgplane_p.h.

References QVector3D::crossProduct(), d, QVector3D::dotProduct(), p1, and p2.

+ Here is the call graph for this function:

Member Function Documentation

◆ contains()

Q_ALWAYS_INLINE bool QSSGPlane::contains ( const QVector3D & p) const
inline

Definition at line 64 of file qssgplane_p.h.

References qAbs().

+ Here is the call graph for this function:

◆ distance()

Q_ALWAYS_INLINE float QSSGPlane::distance ( const QVector3D & p) const
inline

Definition at line 62 of file qssgplane_p.h.

References d, and QVector3D::dotProduct().

+ Here is the call graph for this function:

◆ normalize()

void QSSGPlane::normalize ( )

equivalent plane with unit normal

Definition at line 16 of file qssgplane.cpp.

References d.

Referenced by getZNear().

+ Here is the caller graph for this function:

◆ pointInPlane()

Q_ALWAYS_INLINE QVector3D QSSGPlane::pointInPlane ( ) const
inline

find an arbitrary point in the plane

Definition at line 74 of file qssgplane_p.h.

References d.

◆ project()

Q_ALWAYS_INLINE QVector3D QSSGPlane::project ( const QVector3D & p) const
inline

projects p into the plane

Definition at line 69 of file qssgplane_p.h.

Member Data Documentation

◆ d

float QSSGPlane::d = 0.0f

The distance from the origin.

Definition at line 83 of file qssgplane_p.h.

Referenced by getZNear(), and normalize().

◆ n

QVector3D QSSGPlane::n

The normal to the plane.

Definition at line 82 of file qssgplane_p.h.


The documentation for this class was generated from the following files: