76 float getFov()
const {
return mFov; }
177 void updateOpenGLViewMatrix();
181 float mTransformScale = 1.0f;
185 QRectF mViewportWorldBounds;
189 std::unique_ptr<QSGNode> mPaintNode;
193 constexpr
static const float VIEWPORT_CULL_PADDING = 0.5f;
195 Q_DECLARE_METATYPE(
Camera*)
float getFov() const
Returns fov.
Definition: Camera.h:76
void fovChanged()
Emitted when fov changes.
QPointF getLookAt() const
Returns lookAt.
Definition: Camera.h:85
float aspectRatio
Read only property containing the aspect ratio of the viewport.
Definition: Camera.h:63
void updateTransform()
Computes new transforms, but does not move Items visually, or update the GL transform.
QPointF getParallaxOrigin() const
Returns the current parallax origin.
Definition: Camera.h:101
void applyTransform()
Copies the computed transforms, updating Items visually and updates the GL transform.
QPointF getParallaxOffset() const
Returns the Camera's offset from the parallax origin.
Definition: Camera.h:114
const QMatrix4x4 & getOpenGLViewMatrix() const
Returns the matrix transform used to project world coordinates into normalized device coordinates...
Definition: Camera.h:119
QPointF lookAt
Point in world coordinates that the Camera is centered around.
Definition: Camera.h:59
void lookAtChanged()
Emitted when lookAt changes.
void setFov(float fov)
Sets fov.
void transformApplied()
Signals the current frame's update is complete and that the camera's transform now points at its new ...
const QRectF & getViewportWorldBounds() const
Get the viewport rectangle in world space coordinates.
Definition: Camera.h:125
const QRectF & getWorldCullBounds() const
Gets the world space rectangle encompassing the viewport, outside of which objects should be culled...
Definition: Camera.h:132
virtual QSGNode * updatePaintNode(QSGNode *oldNode, UpdatePaintNodeData *data) override
Override of QQuickItem::updatePaintNode() which forces Qt's renderer to continue rendering.
void setLookAt(const QPointF &lookAt)
Sets lookAt.
QQuickItem which represents the Camera into the game world.
Definition: Camera.h:42
float getAspectRatio() const
Returns aspectRatio.
float fov
Zoom level of the Camera, as a field of view.
Definition: Camera.h:53
void setParallaxOrigin(const QPointF &value)
Sets the current parallax origin.