a point of view a scene is drawn from. A camera starts at the origin looking down -Z, clearing colour and depth, its clear colour opaque black
More...
#include <camera.h>
|
| virtual void | set_perspective_projection (const floating_point_type aFieldOfView, const floating_point_type aNearClippingPlane, const floating_point_type aFarClippingPlane, const floating_point_type aViewportAspectRatio)=0 |
| | use a perspective projection with the given view volume
|
| virtual void | set_perspective_projection (const floating_point_type aFieldOfView, const floating_point_type aNearClippingPlane, const floating_point_type aFarClippingPlane, const floating_point_type aViewportAspectRatio, const vector2_type &aShift)=0 |
| | use a perspective projection whose window is off the view's axis: an asymmetric frustum, as an eye of a stereo pair sees a screen both eyes converge on, or a panel of a tiled display sees its share
|
| virtual void | set_orthographic_projection (const gdk::graphics::vector2_type &aOrthographicSize, const floating_point_type aNearClippingPlane, const floating_point_type aFarClippingPlane, const floating_point_type aViewportAspectRatio)=0 |
| | use an orthographic projection with the given view volume aOrthographicSize is the full extent of the volume, not its half extents
|
| virtual void | set_transform (const gdk::graphics::matrix4x4_type &aMatrix)=0 |
| | sets the camera's world and view matrix
|
|
virtual void | set_transform (const gdk::graphics::vector3_type &aWorldPos, const gdk::graphics::quaternion_type &aRotation)=0 |
| virtual void | set_clear_color (const gdk::graphics::color &acolor)=0 |
| | sets the clear color, used to fill color buffer after it is cleared.
|
| virtual void | set_clear_mode (const clear_mode aClearMode)=0 |
| | clear mode decides which buffers to clear. see enum
|
a point of view a scene is drawn from. A camera starts at the origin looking down -Z, clearing colour and depth, its clear colour opaque black
◆ clear_mode
controls which buffers in the active frame buffer object to clear
| Enumerator |
|---|
| nothing | Do not clear any buffers.
|
| color_and_depth | Clear the color and depth buffers.
|
| depth_only | Clear the Depth buffer.
|
◆ set_clear_color()
◆ set_clear_mode()
| virtual void gdk::graphics::camera::set_clear_mode |
( |
const clear_mode | aClearMode | ) |
|
|
pure virtual |
◆ set_orthographic_projection()
| virtual void gdk::graphics::camera::set_orthographic_projection |
( |
const gdk::graphics::vector2_type & | aOrthographicSize, |
|
|
const floating_point_type | aNearClippingPlane, |
|
|
const floating_point_type | aFarClippingPlane, |
|
|
const floating_point_type | aViewportAspectRatio ) |
|
pure virtual |
◆ set_perspective_projection() [1/2]
| virtual void gdk::graphics::camera::set_perspective_projection |
( |
const floating_point_type | aFieldOfView, |
|
|
const floating_point_type | aNearClippingPlane, |
|
|
const floating_point_type | aFarClippingPlane, |
|
|
const floating_point_type | aViewportAspectRatio ) |
|
pure virtual |
use a perspective projection with the given view volume
- Parameters
-
| aFieldOfView | vertical field of view, in radians |
| aNearClippingPlane | distance to the near plane; must be > 0 |
| aFarClippingPlane | distance to the far plane; must be > aNearClippingPlane |
| aViewportAspectRatio | width divided by height |
Implemented in gdk::graphics::null_camera, and gdk::graphics::null_texture_camera.
◆ set_perspective_projection() [2/2]
| virtual void gdk::graphics::camera::set_perspective_projection |
( |
const floating_point_type | aFieldOfView, |
|
|
const floating_point_type | aNearClippingPlane, |
|
|
const floating_point_type | aFarClippingPlane, |
|
|
const floating_point_type | aViewportAspectRatio, |
|
|
const vector2_type & | aShift ) |
|
pure virtual |
use a perspective projection whose window is off the view's axis: an asymmetric frustum, as an eye of a stereo pair sees a screen both eyes converge on, or a panel of a tiled display sees its share
- Parameters
-
| aShift | how far the window's centre is from the axis, as a share of the window's half extents: {0, 0} is the symmetric projection above; {0.25, 0} moves the window a quarter of its half width to the right, so what is on the axis is drawn that far left of the centre |
Implemented in gdk::graphics::null_camera, and gdk::graphics::null_texture_camera.
◆ set_transform()
| virtual void gdk::graphics::camera::set_transform |
( |
const gdk::graphics::matrix4x4_type & | aMatrix | ) |
|
|
pure virtual |
The documentation for this class was generated from the following file:
- /home/runner/work/gdk-graphics/gdk-graphics/include/gdk/graphics/camera.h