![]() |
Qt 6.x
The Qt SDK
|
Representation of a plane. More...
#include <qssgplane_p.h>
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. | |
Representation of a plane.
Plane equation used: n.dot(v) + d = 0
Definition at line 30 of file qssgplane_p.h.
|
default |
|
inline |
Constructor from a normal and a distance.
Definition at line 38 of file qssgplane_p.h.
|
inline |
Constructor from a normal and a distance.
Definition at line 43 of file qssgplane_p.h.
|
inline |
Constructor from a point on the plane and a normal.
Definition at line 48 of file qssgplane_p.h.
|
inline |
Constructor from three points.
Definition at line 56 of file qssgplane_p.h.
References QVector3D::crossProduct(), d, QVector3D::dotProduct(), QVector3D::normalized(), p1, and p2.
|
inline |
Definition at line 64 of file qssgplane_p.h.
References qAbs().
|
inline |
Definition at line 62 of file qssgplane_p.h.
References d, and QVector3D::dotProduct().
Referenced by QSSGLayerRenderData::prepareModelsForRender().
void QSSGPlane::normalize | ( | ) |
equivalent plane with unit normal
Definition at line 16 of file qssgplane.cpp.
References d.
Referenced by getViewportHalfExtents(), and getZNear().
|
inline |
|
inline |
projects p into the plane
Definition at line 69 of file qssgplane_p.h.
float QSSGPlane::d = 0.0f |
The distance from the origin.
Definition at line 83 of file qssgplane_p.h.
Referenced by getViewportHalfExtents(), getZNear(), QSSGRenderRay::intersect(), and normalize().
QVector3D QSSGPlane::n |
The normal to the plane.
Definition at line 82 of file qssgplane_p.h.
Referenced by getViewportHalfExtents(), and QSSGRenderRay::intersect().