![]() |
Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
|
#include <qssgrendercamera_p.h>
Classes | |
| class | ClipPlanes |
| struct | Frustum |
| class | Magnification |
Public Types | |
| enum class | DirtyFlag : quint8 { CameraDirty = 0x1 , LayerMaskDirty = 0x2 } |
| using | Configuration = QSSGRenderCameraConfiguration |
| using | FieldOfView = QSSGRenderCameraFieldOfView |
| using | FlagT = std::underlying_type_t<DirtyFlag> |
| Public Types inherited from QSSGRenderNode | |
| enum class | LocalState : quint8 { Active = 1 << 0 , Pickable = 1 << 1 , Imported = 1 << 2 } |
| enum class | GlobalState : quint8 { Active = 1 << 3 , Pickable = 1 << 4 , Imported = 1 << 5 } |
| enum class | DirtyFlag : quint32 { TransformDirty = 1 << 6 , OpacityDirty = 1 << 7 , ActiveDirty = 1 << 8 , PickableDirty = 1 << 9 , TagDirty = 1 << 10 , ImportDirty = 1 << 11 , SubNodeDirty = 1 << 12 , StickyDirty = 1 << 13 , GlobalValuesDirty = TransformDirty | OpacityDirty | ActiveDirty | PickableDirty | ImportDirty , SubtreeUpdateMask = GlobalValuesDirty | StickyDirty , DirtyMask = GlobalValuesDirty | SubNodeDirty } |
| using | FlagT = std::underlying_type_t<DirtyFlag> |
| using | ChildList = QSSGInvasiveLinkedList<QSSGRenderNode, &QSSGRenderNode::previousSibling, &QSSGRenderNode::nextSibling> |
| Public Types inherited from QSSGRenderGraphObject | |
| enum | BaseType : quint32 { Node = 0x1000 , Light = 0x2000 , Camera = 0x4000 , Renderable = 0x8000 , Resource = 0x10000 , Material = 0x20000 , Texture = 0x40000 , Extension = 0x80000 , User = 0x80000000 } |
| enum class | Type : quint32 { Unknown = 0 , Node = BaseType::Node , Root , Layer , Joint , Skeleton , ImportScene , ReflectionProbe , DirectionalLight = BaseType::Light | BaseType::Node , PointLight , SpotLight , OrthographicCamera = BaseType::Camera | BaseType::Node , PerspectiveCamera , CustomFrustumCamera , CustomCamera , Model = BaseType::Renderable | BaseType::Node , Item2D , Particles , SceneEnvironment = BaseType::Resource , Effect , Geometry , TextureData , MorphTarget , ModelInstance , ModelBlendParticle , ResourceLoader , DefaultMaterial = BaseType::Material | BaseType::Resource , PrincipledMaterial , CustomMaterial , SpecularGlossyMaterial , Skin , Image2D = BaseType::Texture | BaseType::Resource , ImageCube , RenderExtension = BaseType::Extension , TextureProvider } |
| enum class | Flags : quint32 { HasGraphicsResources = 0x1 } |
| using | TypeT = std::underlying_type_t<Type> |
| using | FlagT = std::underlying_type_t<Flags> |
Static Public Member Functions | |
| static bool | calculateProjectionInternal (QSSGRenderCamera &camera, const QRectF &inViewport, Configuration config={}) |
| Convenience function intended for use with internal cameras that's not part of the scene graph! | |
| static bool | computeFrustumOrtho (QRectF inViewport, QSSGRenderCamera::ClipPlanes clipPlanes, QSSGRenderCamera::Magnification magnification, Configuration config, QMatrix4x4 &outProjection) |
| static bool | computeFrustumPerspective (QRectF inViewport, FieldOfView fov, QSSGRenderCamera::ClipPlanes clipPlanes, QMatrix4x4 &outProjection) |
| static bool | computeCustomFrustum (QSSGRenderCamera::Frustum frustum, QSSGRenderCamera::ClipPlanes clipPlanes, QMatrix4x4 &outProjection) |
| static void | calculateViewProjectionMatrix (const QMatrix4x4 &globalTransform, const QMatrix4x4 &projection, QMatrix4x4 &outMatrix) |
| Static Public Member Functions inherited from QSSGRenderNode | |
| static QMatrix4x4 | calculateTransformMatrix (QVector3D position, QVector3D scale, QVector3D pivot, QQuaternion rotation) |
| static QVector3D | getGlobalPos (const QMatrix4x4 &globalTransform) |
| static QVector3D | getDirection (const QMatrix4x4 &globalTransform) |
| static QVector3D | getScalingCorrectDirection (const QMatrix4x4 &globalTransform) |
| static void | calculateMVP (const QMatrix4x4 &globalTransform, const QMatrix4x4 &inViewProjection, QMatrix4x4 &outMVP) |
| static void | calculateNormalMatrix (const QMatrix4x4 &globalTransform, QMatrix3x3 &outNormalMatrix) |
| static void | calculateMVPAndNormalMatrix (const QMatrix4x4 &globalTransfor, const QMatrix4x4 &inViewProjection, QMatrix4x4 &outMVP, QMatrix3x3 &outNormalMatrix) |
| static float | signedSquared (float val) |
| Static Public Member Functions inherited from QSSGRenderGraphObject | |
| static constexpr bool | isNodeType (Type type) noexcept |
| static constexpr bool | isLight (Type type) noexcept |
| static constexpr bool | isCamera (Type type) noexcept |
| static constexpr bool | isMaterial (Type type) noexcept |
| static constexpr bool | isTexture (Type type) noexcept |
| static constexpr bool | isRenderable (Type type) noexcept |
| static constexpr bool | isResource (Type type) noexcept |
| static constexpr bool | isExtension (Type type) noexcept |
| static constexpr bool | isUserType (Type type) noexcept |
Public Attributes | |
| ClipPlanes | clipPlanes |
| FieldOfView | fov |
| Frustum | customFrustum |
| Magnification | magnification |
| QMatrix4x4 | projection |
| float | levelOfDetailPixelThreshold = 1.0 |
| quint32 | layerMask = LayerMaskAll |
| bool | enableFrustumClipping = true |
| Public Attributes inherited from QSSGRenderNode | |
| QVector3D | pivot |
| int | staticFlags = 0 |
| float | localOpacity = 1.0f |
| FlagT | flags { FlagT(DirtyFlag::GlobalValuesDirty) | FlagT(LocalState::Active) } |
| QMatrix4x4 | localTransform |
| QSSGRenderRoot ** | rootNodeRef = nullptr |
| QSSGRenderNode * | parent = nullptr |
| QSSGRenderNode * | nextSibling = nullptr |
| QSSGRenderNode * | previousSibling = nullptr |
| QSSGRenderNode * | instanceRoot = nullptr |
| QSSGRenderNodeHandle | h |
| QSSGRenderNodeTag | tag |
| ChildList | children |
| QString | debugObjectName |
| Public Attributes inherited from QSSGRenderGraphObject | |
| const Type | type |
| FlagT | flags { 0 } |
Static Public Attributes | |
| static constexpr DirtyFlag | DirtyMask { std::numeric_limits<FlagT>::max() } |
| static constexpr quint32 | LayerMaskAll = 0xFFFFFFFF |
| Static Public Attributes inherited from QSSGRenderNode | |
| static constexpr QVector3D | initScale { 1.0f, 1.0f, 1.0f } |
Additional Inherited Members | |
| Protected Member Functions inherited from QSSGRenderGraphObject | |
| QSSGRenderGraphObject (QSSGRenderGraphObject::Type inType) | |
| QSSGRenderGraphObject (QSSGRenderGraphObject::Type inType, FlagT inFlags) | |
Definition at line 109 of file qssgrendercamera_p.h.
Definition at line 112 of file qssgrendercamera_p.h.
Definition at line 113 of file qssgrendercamera_p.h.
| using QSSGRenderCamera::FlagT = std::underlying_type_t<DirtyFlag> |
Definition at line 122 of file qssgrendercamera_p.h.
|
strong |
| Enumerator | |
|---|---|
| CameraDirty | |
| LayerMaskDirty | |
Definition at line 117 of file qssgrendercamera_p.h.
|
explicit |
Definition at line 24 of file qssgrendercamera.cpp.
| bool QSSGRenderCamera::calculateProjection | ( | const QRectF & | inViewport, |
| Configuration | config = {} ) |
calculateProjection
| inViewport | |
| config |
This function will calculate the projection matrix for the camera.
NOTE: This function will not update the camera's global transform. It is the caller's responsibility to ensure that the camera's global transform has been calculated prior to calling this function.
Definition at line 38 of file qssgrendercamera.cpp.
|
static |
Convenience function intended for use with internal cameras that's not part of the scene graph!
This function will NOT ensure that the camera's global transform, projection matrix, or state is updated!.
Definition at line 31 of file qssgrendercamera.cpp.
|
static |
Definition at line 104 of file qssgrendercamera.cpp.
| void QSSGRenderCamera::calculateViewProjectionMatrix | ( | const QMatrix4x4 & | globalTransform, |
| QMatrix4x4 & | outMatrix ) const |
Definition at line 169 of file qssgrendercamera.cpp.
| void QSSGRenderCamera::calculateViewProjectionWithoutTranslation | ( | const QMatrix4x4 & | globalTransform, |
| float | near, | ||
| float | far, | ||
| QMatrix4x4 & | outMatrix ) const |
Definition at line 179 of file qssgrendercamera.cpp.
Definition at line 241 of file qssgrendercamera.cpp.
|
static |
Definition at line 95 of file qssgrendercamera.cpp.
|
static |
Compute the outProjection matrix for a orthographic camera
Definition at line 121 of file qssgrendercamera.cpp.
|
static |
Compute the projection matrix for a perspective camera
Definition at line 83 of file qssgrendercamera.cpp.
|
inline |
Definition at line 227 of file qssgrendercamera_p.h.
| float QSSGRenderCamera::getLevelOfDetailMultiplier | ( | ) | const |
Definition at line 277 of file qssgrendercamera.cpp.
Definition at line 217 of file qssgrendercamera_p.h.
| void QSSGRenderCamera::lookAt | ( | const QVector3D & | inCameraPos, |
| const QVector3D & | inUpDir, | ||
| const QVector3D & | inTargetPos, | ||
| const QVector3D & | pivot ) |
Definition at line 162 of file qssgrendercamera.cpp.
Definition at line 235 of file qssgrendercamera.cpp.
| void QSSGRenderCamera::setCustomProjection | ( | const QMatrix4x4 & | proj | ) |
| QSSGRenderRay QSSGRenderCamera::unproject | ( | const QMatrix4x4 & | globalTransform, |
| const QVector2D & | inLayerRelativeMouseCoords, | ||
| const QRectF & | inViewport ) const |
Definition at line 197 of file qssgrendercamera.cpp.
| ClipPlanes QSSGRenderCamera::clipPlanes |
Definition at line 230 of file qssgrendercamera_p.h.
| Frustum QSSGRenderCamera::customFrustum |
Definition at line 232 of file qssgrendercamera_p.h.
Definition at line 124 of file qssgrendercamera_p.h.
| bool QSSGRenderCamera::enableFrustumClipping = true |
Definition at line 237 of file qssgrendercamera_p.h.
| FieldOfView QSSGRenderCamera::fov |
Definition at line 231 of file qssgrendercamera_p.h.
| quint32 QSSGRenderCamera::layerMask = LayerMaskAll |
Definition at line 236 of file qssgrendercamera_p.h.
|
staticconstexpr |
Definition at line 126 of file qssgrendercamera_p.h.
| float QSSGRenderCamera::levelOfDetailPixelThreshold = 1.0 |
Definition at line 235 of file qssgrendercamera_p.h.
| Magnification QSSGRenderCamera::magnification |
Definition at line 233 of file qssgrendercamera_p.h.
| QMatrix4x4 QSSGRenderCamera::projection |
Definition at line 234 of file qssgrendercamera_p.h.