3#ifndef GDK_GFX_WEBGL1ES2_CAMERA_H
4#define GDK_GFX_WEBGL1ES2_CAMERA_H
8#include <gdk/graphics_types.h>
9#include <gdk/webgl1es2_texture.h>
10#include <jfc/unique_handle.h>
56 void set_perspective_projection(
const float aFieldOfView,
57 const float aNearClippingPlane,
58 const float aFarClippingPlane,
59 const float aViewportAspectRatio);
61 void set_orthographic_projection(
const float aWidth,
63 const float aNearClippingPlane,
64 const float aFarClippingPlane,
65 const float aViewportAspectRatio);
67 void set_clear_color(
const gdk::color& acolor);
71 void set_transform(
const gdk::graphics_vector3_type& aWorldPos,
72 const gdk::graphics_quaternion_type& aRotation);
73 void set_transform(
const gdk::graphics_matrix4x4_type &aMatrix);
75 void activate_clear_mode()
const;
83 graphics_matrix4x4_type m_WorldMatrix = graphics_matrix4x4_type::identity;
84 graphics_matrix4x4_type m_ViewMatrix = graphics_matrix4x4_type::identity;
85 graphics_matrix4x4_type m_ProjectionMatrix = graphics_matrix4x4_type::identity;
clear_mode
controls which buffers in the active frame buffer object to clear
Definition camera.h:13
@ color_and_depth
Clear the color and depth buffers.
Definition camera.h:15
represents an observable 3d object.
Definition entity.h:13
webgl1es2_camera & operator=(const webgl1es2_camera &a)=default
copy semantics
webgl1es2_camera(webgl1es2_camera &&)=default
move semantics
graphics_matrix4x4_type get_projection_matrix() const
gets the projection matrix
graphics_matrix4x4_type get_world_matrix() const
position and rotation of the camera in worldspace, same as an entity model matrix
graphics_matrix4x4_type get_view_matrix() const
gets the view matrix
webgl1es2_camera()
constructs with reasonable default values
webgl1es2_camera & operator=(webgl1es2_camera &&a)=default
move semantics
webgl1es2_camera(const webgl1es2_camera &a)=default
copy semantics
Represents a 4 channel color: {Red, Green, Blue, Alpha}. TODO: channel values should be limited to th...
Definition color.h:11
static const color cornflower_blue
an opaque pastel blue color
Definition color.h:67