gdk-graphics 0b051eb9b5c1eaa0658babaa4463dd7a80aa9d2c
Loading...
Searching...
No Matches
gdk::webgl1es2_screen_camera Class Referencefinal

webgl1es2_screen_camera implementation of camera More...

#include <webgl1es2_screen_camera.h>

Inheritance diagram for gdk::webgl1es2_screen_camera:
gdk::screen_camera gdk::webgl1es2_camera gdk::camera

Public Member Functions

 webgl1es2_screen_camera (const webgl1es2_screen_camera &a)=default
 copy semantics
 
webgl1es2_screen_cameraoperator= (const webgl1es2_screen_camera &a)=default
 copy semantics
 
 webgl1es2_screen_camera (webgl1es2_screen_camera &&)=default
 move semantics
 
webgl1es2_screen_cameraoperator= (webgl1es2_screen_camera &&a)=default
 move semantics
 
 webgl1es2_screen_camera ()
 constructs with reasonable default values
 
external interface
virtual void set_viewport (const float aX, const float aY, const float aWidth, const float aHeight) override
 sets the normalized size and position of the viewport within of the window
 
virtual void set_perspective_projection (const float aFieldOfView, const float aNearClippingPlane, const float aFarClippingPlane, const float aViewportAspectRatio) override
 sets the projection matrix to a perspective projection
 
virtual void set_orthographic_projection (const float aWidth, const float aHeight, const float aNearClippingPlane, const float aFarClippingPlane, const float aViewportAspectRatio) override
 sets the projection matrix to an orthographic projection
 
virtual void set_transform (const gdk::graphics_vector3_type &aWorldPos, const gdk::graphics_quaternion_type &aRotation) override
 rebuilds the view matrix from a 3d position and rotation
 
virtual void set_transform (const gdk::graphics_matrix4x4_type &aMatrix) override
 
virtual void set_clear_color (const gdk::color &acolor) override
 sets the clear color, used to fill color buffer after it is cleared.
 
virtual void set_clear_mode (const gdk::camera::clear_mode aClearMode) override
 clear mode decides which buffers to clear. see enum
 
internal interface
void activate (const gdk::graphics_intvector2_type &aFrameBufferSize) const
 activates this camera; mutates gl according to this camera's state
 
- Public Member Functions inherited from gdk::webgl1es2_camera
 webgl1es2_camera (const webgl1es2_camera &a)=default
 copy semantics
 
webgl1es2_cameraoperator= (const webgl1es2_camera &a)=default
 copy semantics
 
 webgl1es2_camera (webgl1es2_camera &&)=default
 move semantics
 
webgl1es2_cameraoperator= (webgl1es2_camera &&a)=default
 move semantics
 
 webgl1es2_camera ()
 constructs with reasonable default values
 
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
 
graphics_matrix4x4_type get_projection_matrix () const
 gets the projection matrix
 

Additional Inherited Members

- Public Types inherited from gdk::camera
enum class  clear_mode { nothing , color_and_depth , depth_only }
 controls which buffers in the active frame buffer object to clear More...
 
- Protected Member Functions inherited from gdk::webgl1es2_camera
void set_perspective_projection (const float aFieldOfView, const float aNearClippingPlane, const float aFarClippingPlane, const float aViewportAspectRatio)
 
void set_orthographic_projection (const float aWidth, const float aHeight, const float aNearClippingPlane, const float aFarClippingPlane, const float aViewportAspectRatio)
 
void set_clear_color (const gdk::color &acolor)
 
void set_clear_mode (const gdk::camera::clear_mode aClearMode)
 
void set_transform (const gdk::graphics_vector3_type &aWorldPos, const gdk::graphics_quaternion_type &aRotation)
 
void set_transform (const gdk::graphics_matrix4x4_type &aMatrix)
 
void activate_clear_mode () const
 
camera::clear_mode get_clearmode () const
 
gdk::color get_clearcolor () const
 

Detailed Description

webgl1es2_screen_camera implementation of camera

Member Function Documentation

◆ set_clear_color()

virtual void gdk::webgl1es2_screen_camera::set_clear_color ( const gdk::color & acolor)
overridevirtual

sets the clear color, used to fill color buffer after it is cleared.

Implements gdk::camera.

◆ set_clear_mode()

virtual void gdk::webgl1es2_screen_camera::set_clear_mode ( const gdk::camera::clear_mode aClearMode)
overridevirtual

clear mode decides which buffers to clear. see enum

Implements gdk::camera.

◆ set_orthographic_projection()

virtual void gdk::webgl1es2_screen_camera::set_orthographic_projection ( const float aWidth,
const float aHeight,
const float aNearClippingPlane,
const float aFarClippingPlane,
const float aViewportAspectRatio )
overridevirtual

sets the projection matrix to an orthographic projection

Implements gdk::camera.

◆ set_perspective_projection()

virtual void gdk::webgl1es2_screen_camera::set_perspective_projection ( const float aFieldOfView,
const float aNearClippingPlane,
const float aFarClippingPlane,
const float aViewportAspectRatio )
overridevirtual

sets the projection matrix to a perspective projection

Implements gdk::camera.

◆ set_transform() [1/2]

virtual void gdk::webgl1es2_screen_camera::set_transform ( const gdk::graphics_matrix4x4_type & aMatrix)
overridevirtual

Implements gdk::camera.

◆ set_transform() [2/2]

virtual void gdk::webgl1es2_screen_camera::set_transform ( const gdk::graphics_vector3_type & aWorldPos,
const gdk::graphics_quaternion_type & aRotation )
overridevirtual

rebuilds the view matrix from a 3d position and rotation

Implements gdk::camera.

◆ set_viewport()

virtual void gdk::webgl1es2_screen_camera::set_viewport ( const float aX,
const float aY,
const float aWidth,
const float aHeight )
overridevirtual

sets the normalized size and position of the viewport within of the window

Implements gdk::screen_camera.


The documentation for this class was generated from the following file: