3 #ifndef BOT3_CAMERA_NODE_HPP__
4 #define BOT3_CAMERA_NODE_HPP__
9 #include <sceneview/scene_node.hpp>
35 return SceneNodeType::kCameraNode; }
80 void SetManual(
const QMatrix4x4& proj_mat);
90 void LookAt(
const QVector3D& eye,
const QVector3D& look_at,
158 void SetRotation(
const QQuaternion& quat)
override;
165 void ComputeProjectionMatrix();
173 int viewport_width_ = 0;
174 int viewport_height_ = 0;
176 ProjectionType proj_type_;
183 QMatrix4x4 projection_matrix_;
188 #endif // SCENEVIEW_VISCAMERA_HPP__
void SetTranslation(const QVector3D &vec) override
Sets the translation component of the node transform.
void LookAt(const QVector3D &eye, const QVector3D &look_at, const QVector3D &up)
Rotate and translate the camera to look at the specified point.
double GetVFovDeg() const
Retrieve the vertical field of view, in degrees.
Definition: camera_node.hpp:96
Pure virtual class that all scene graph nodes inherit.
Definition: scene_node.hpp:41
QVector3D GetLookAt() const
Retrieve the look at point.
void SetRotation(const QQuaternion &quat) override
Sets the rotation component of the node to parent transform.
void CopyFrom(const CameraNode &other)
Copies parameters in from the specified camera.
void SetOrthographic(double vfov_deg, double z_near, double z_far)
Sets orthographic projection mode.
An axis-aligned box typically used for bounding box and intersection calculations.
Definition: axis_aligned_box.hpp:17
void SetViewportSize(int width, int height)
Sets the size of the viewport.
QVector3D GetUpDir() const
Retrieve the camera's up vector.
Camera.
Definition: camera_node.hpp:25
SceneNodeType NodeType() const override
Retrieve the node type.
Definition: camera_node.hpp:34
void SetManual(const QMatrix4x4 &proj_mat)
Sets a manual projection matrix.
double GetZFar() const
Retrieve the far clipping plane.
Definition: camera_node.hpp:106
const AxisAlignedBox & WorldBoundingBox() override
Retrieve the world-space bounding box of the node and all of its children (if applicable).
A scene graph.
Definition: scene.hpp:36
QSize GetViewportSize() const
Retrieve the viewport size.
ProjectionType GetProjectionType() const
Retrieve the current projection type.
Definition: camera_node.hpp:85
QVector3D GetLookDir() const
Retrieve the direction the camera is facing.
QVector3D Unproject(double x, double y)
Computes a world-space direction corresponding to the specified screen-space pixel.
QMatrix4x4 GetViewProjectionMatrix()
Gets the combined projection and view matrix.
double GetZNear() const
Retrieve the near clipping plane.
Definition: camera_node.hpp:101
SceneNodeType
Specifies a scene node type.
Definition: scene_node.hpp:19
void SetPerspective(double vfov_deg, double z_near, double z_far)
Sets perspective projection mode.
QMatrix4x4 GetViewMatrix()
Retrieve the camera view matrix.
QMatrix4x4 GetProjectionMatrix()
Retrieve the camera projection matrix.