Combined view-projection matrix, defining a 3D perspective to render from.
More...
#include <GREM/graphics_3d/Camera3D.hpp>
Combined view-projection matrix, defining a 3D perspective to render from.
◆ ParameterBuffer
Shader buffer for 3D camera parameters.
◆ Camera3D()
Construct a camera.
- Parameters
-
| device | device to create the camera for. Must outlive the camera. |
| projection | projection matrix or configuration options for the camera projection, see Projection3D. |
| view | view matrix or configuration options for the camera view, see View3D. |
| options | camera options, see Camera3DOptions. |
- Exceptions
-
| graphics::Error | if resource creation failed. |
| std::length_error | if an internal size limit was exceeded. |
| std::bad_array_new_length | if an internal size limit was exceeded. |
| std::bad_alloc | on allocation failure. |
◆ setProjection()
| void grem::graphics::Camera3D::setProjection |
( |
const Projection3D & | newProjection | ) |
|
|
inline |
Set the projection of the camera.
- Parameters
-
| newProjection | new projection matrix or configuration options for the camera projection, see Projection3D. |
- Exceptions
-
| graphics::Error | if resource creation failed. |
| std::length_error | if an internal size limit was exceeded. |
| std::bad_array_new_length | if an internal size limit was exceeded. |
| std::bad_alloc | on allocation failure. |
◆ setView()
| void grem::graphics::Camera3D::setView |
( |
const View3D & | newView | ) |
|
|
inline |
Set the view of the camera.
- Parameters
-
| newView | new view matrix or configuration options for the camera view, see View3D. |
- Exceptions
-
| graphics::Error | if resource creation failed. |
| std::length_error | if an internal size limit was exceeded. |
| std::bad_array_new_length | if an internal size limit was exceeded. |
| std::bad_alloc | on allocation failure. |
◆ setOptions()
| void grem::graphics::Camera3D::setOptions |
( |
const Camera3DOptions & | newOptions | ) |
|
|
inline |
Set the configuration options of the camera.
- Parameters
-
- Exceptions
-
| graphics::Error | if resource creation failed. |
| std::length_error | if an internal size limit was exceeded. |
| std::bad_array_new_length | if an internal size limit was exceeded. |
| std::bad_alloc | on allocation failure. |
◆ setProjectionAndView()
| void grem::graphics::Camera3D::setProjectionAndView |
( |
const Projection3D & | newProjection, |
|
|
const View3D & | newView ) |
|
inline |
Set both the projection and view of the camera.
- Parameters
-
| newProjection | new projection matrix or configuration options for the camera projection, see Projection3D. |
| newView | new view matrix or configuration options for the camera view, see View3D. |
- Exceptions
-
| graphics::Error | if resource creation failed. |
| std::length_error | if an internal size limit was exceeded. |
| std::bad_array_new_length | if an internal size limit was exceeded. |
| std::bad_alloc | on allocation failure. |
◆ setViewAndOptions()
| void grem::graphics::Camera3D::setViewAndOptions |
( |
const View3D & | newView, |
|
|
const Camera3DOptions & | newOptions ) |
|
inline |
Set both the view and configuration options of the camera.
- Parameters
-
| newView | new view matrix or configuration options for the camera view, see View3D. |
| newOptions | new configuration options, see Camera3DOptions. |
- Exceptions
-
| graphics::Error | if resource creation failed. |
| std::length_error | if an internal size limit was exceeded. |
| std::bad_array_new_length | if an internal size limit was exceeded. |
| std::bad_alloc | on allocation failure. |
◆ setProjectionAndViewAndOptions()
Set both the projection and view of the camera, as well as its configuration options.
- Parameters
-
| newProjection | new projection matrix or configuration options for the camera projection, see Projection3D. |
| newView | new view matrix or configuration options for the camera view, see View3D. |
| newOptions | new configuration options, see Camera3DOptions. |
- Exceptions
-
| graphics::Error | if resource creation failed. |
| std::length_error | if an internal size limit was exceeded. |
| std::bad_array_new_length | if an internal size limit was exceeded. |
| std::bad_alloc | on allocation failure. |
◆ getParameterBuffer()
| const ParameterBuffer & grem::graphics::Camera3D::getParameterBuffer |
( |
| ) |
const |
|
inlinenodiscardnoexcept |
Get the parameter buffer of the camera.
- Returns
- a read-only reference to the camera's parameter buffer.
◆ getProjectionMatrix()
| const mat4 & grem::graphics::Camera3D::getProjectionMatrix |
( |
| ) |
const |
|
inlinenodiscardnoexcept |
Get the projection matrix of the camera.
- Returns
- a read-only reference to the camera's current projection matrix.
◆ getViewMatrix()
| const mat4 & grem::graphics::Camera3D::getViewMatrix |
( |
| ) |
const |
|
inlinenodiscardnoexcept |
Get the view matrix of the camera.
- Returns
- a read-only reference to the camera's current view matrix.
◆ getOptions()
Get the configuration options of the camera.
- Returns
- the camera's current options.
The documentation for this class was generated from the following file: