Qt 6.x
The Qt SDK
Loading...
Searching...
No Matches
qssgrendercamera.cpp File Reference
#include "qssgrendercamera_p.h"
#include <QtQuick3DRuntimeRender/private/qssgrendererutil_p.h>
#include <QtQuick3DUtils/private/qssgutils_p.h>
#include <QtGui/QVector2D>
#include <qmath.h>
+ Include dependency graph for qssgrendercamera.cpp:

Go to the source code of this file.

Namespaces

namespace  QT_BEGIN_NAMESPACE
 Combined button and popup list for selecting options.
 

Functions

float QT_BEGIN_NAMESPACE::getAspectRatio (const QRectF &inViewport)
 
static QQuaternion rotationQuaternionForLookAt (const QVector3D &sourcePosition, const QVector3D &sourceDirection, const QVector3D &targetPosition, const QVector3D &upDirection)
 
static float getZNear (const QMatrix4x4 &projection)
 
static QVector2D getViewportHalfExtents (const QMatrix4x4 &projection)
 

Function Documentation

◆ getViewportHalfExtents()

static QVector2D getViewportHalfExtents ( const QMatrix4x4 projection)
static

Definition at line 252 of file qssgrendercamera.cpp.

References QMatrix4x4::constData(), QVector3D::crossProduct(), QSSGPlane::d, QVector3D::dotProduct(), QSSGPlane::n, QSSGPlane::normalize(), qFuzzyIsNull(), QVector3D::x(), and QVector3D::y().

Referenced by QSSGRenderCamera::getLevelOfDetailMultiplier().

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

◆ getZNear()

static float getZNear ( const QMatrix4x4 projection)
static

Definition at line 244 of file qssgrendercamera.cpp.

References QMatrix4x4::constData(), QSSGPlane::d, and QSSGPlane::normalize().

Referenced by QSSGRenderCamera::getLevelOfDetailMultiplier().

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

◆ rotationQuaternionForLookAt()

static QQuaternion rotationQuaternionForLookAt ( const QVector3D sourcePosition,
const QVector3D sourceDirection,
const QVector3D targetPosition,
const QVector3D upDirection 
)
static

Definition at line 121 of file qssgrendercamera.cpp.

References QVector3D::crossProduct(), dot(), QVector3D::dotProduct(), QQuaternion::fromAxisAndAngle(), QVector3D::lengthSquared(), QVector3D::normalize(), QVector3D::normalized(), qAcos(), qFuzzyIsNull(), and qRadiansToDegrees().

Referenced by QSSGRenderCamera::lookAt().

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