Tatooine
Public Types | Public Member Functions | List of all members
tatooine::rendering::orthographic_camera< Real > Struct Template Reference

#include <orthographic_camera.h>

Inheritance diagram for tatooine::rendering::orthographic_camera< Real >:
[legend]
Collaboration diagram for tatooine::rendering::orthographic_camera< Real >:
[legend]

Public Types

using real_type = Real
 
using this_type = orthographic_camera< Real >
 
using parent_type = camera_interface< Real >
 
using vec3 = vec< Real, 3 >
 
using mat4 = mat< Real, 4, 4 >
 
- Public Types inherited from tatooine::rendering::camera_interface< Real >
using real_type = Real
 
using this_type = camera_interface< Real >
 
using vec2 = Vec2< Real >
 
using vec3 = Vec3< Real >
 
using vec4 = Vec4< Real >
 
using mat4 = Mat4< Real >
 
using ray_type = tatooine::ray< real_type, 3 >
 

Public Member Functions

constexpr orthographic_camera (vec3 const &eye, vec3 const &lookat, vec3 const &up, Real const left, Real const right, Real const bottom, Real const top, Real const near, Real const far, Vec4< std::size_t > const &viewport)
 
constexpr orthographic_camera (vec3 const &eye, vec3 const &lookat, vec3 const &up, Real const left, Real const right, Real const bottom, Real const top, Real const near, Real const far, std::size_t const res_x, std::size_t const res_y)
 
constexpr orthographic_camera (vec3 const &eye, vec3 const &lookat, Real const left, Real const right, Real const bottom, Real const top, Real const near, Real const far, Vec4< std::size_t > const &viewport)
 
constexpr orthographic_camera (vec3 const &eye, vec3 const &lookat, Real const left, Real const right, Real const bottom, Real const top, Real const near, Real const far, std::size_t const res_x, std::size_t const res_y)
 
constexpr orthographic_camera (vec3 const &eye, vec3 const &lookat, vec3 const &up, Real const height, Real const near, Real const far, Vec4< std::size_t > const &viewport)
 
constexpr orthographic_camera (vec3 const &eye, vec3 const &lookat, vec3 const &up, Real const height, Real const near, Real const far, std::size_t const res_x, std::size_t const res_y)
 
 orthographic_camera (vec3 const &eye, vec3 const &lookat, Real const height, Real const near, Real const far, Vec4< std::size_t > const &viewport)
 
 orthographic_camera (vec3 const &eye, vec3 const &lookat, Real const height, Real const near, Real const far, std::size_t const res_x, std::size_t const res_y)
 
 ~orthographic_camera ()=default
 
auto constexpr set_projection_matrix (Real const left, Real const right, Real const bottom, Real const top, Real const near, Real const far)
 
auto constexpr set_projection_matrix (Real const height, Real const near=100, Real const far=-100)
 
auto width () const
 
auto height () const
 
auto depth () const
 
auto set_projection_matrix (mat4 const &projection_matrix) -> void
 
auto constexpr viewport () const -> auto const &
 Returns number of pixels of plane in x-direction. More...
 
auto constexpr viewport (std::size_t const i) const -> auto const &
 
- Public Member Functions inherited from tatooine::rendering::camera_interface< Real >
constexpr camera_interface (vec3 const &eye, vec3 const &lookat, vec3 const &up, Vec4< std::size_t > const &viewport)
 
constexpr camera_interface (vec3 const &eye, vec3 const &lookat, vec3 const &up, Vec4< std::size_t > const &viewport, mat4 const &p)
 
virtual ~camera_interface ()=default
 
auto constexpr viewport () const -> auto const &
 Returns number of pixels of plane in x-direction. More...
 
auto constexpr viewport (std::size_t const i) const -> auto const &
 
auto constexpr plane_width () const
 Returns number of pixels of plane in x-direction. More...
 
auto constexpr plane_height () const
 Returns number of pixels of plane in y-direction. More...
 
auto constexpr aspect_ratio () const
 
auto constexpr eye () const -> auto
 
auto constexpr right_direction () const
 
auto constexpr up_direction () const
 
auto constexpr view_direction () const
 
auto constexpr set_viewport_without_update (std::size_t const bottom, std::size_t const left, std::size_t const width, std::size_t const height)
 
auto constexpr set_viewport (std::size_t const bottom, std::size_t const left, std::size_t const width, std::size_t const height)
 
auto constexpr set_resolution_without_update (std::size_t const width, std::size_t const height)
 
auto constexpr set_resolution (std::size_t const width, std::size_t const height)
 
auto set_gl_viewport () const
 
auto constexpr look_at (vec3 const &eye, vec3 const &lookat, vec3 const &up={0, 1, 0}) -> void
 
auto constexpr look_at (vec3 const &eye, arithmetic auto const pitch, arithmetic auto const yaw) -> void
 
auto constexpr transform_matrix () const -> auto const &
 
auto constexpr view_matrix () const
 
auto constexpr projection_matrix () const -> auto const &
 
auto view_projection_matrix () const
 
auto unproject (vec2 const &p) const
 Projects a screen coordinates to world coordinates. More...
 
auto unproject (vec3 const &p) const
 Projects a screen coordinates to world coordinates. More...
 
auto unproject (vec4 p) const
 Projects a homogeneous screen coordinates to world coordinates. More...
 
auto project (vec2 const &p) const
 Projects a world coordinate to screen coordinates. More...
 
auto project (vec3 const &p) const
 Projects a world coordinate to screen coordinates. More...
 
auto project (vec4 p) const
 Projects a homogeneous world coordinate to screen coordinates. More...
 
auto ray (Real const x, Real const y) const -> ray_type
 Gets a ray through plane at pixel with coordinate [x,y]. More...
 

Additional Inherited Members

- Protected Member Functions inherited from tatooine::rendering::camera_interface< Real >
auto set_projection_matrix (mat4 const &projection_matrix) -> void
 

Member Typedef Documentation

◆ mat4

template<arithmetic Real>
using tatooine::rendering::orthographic_camera< Real >::mat4 = mat<Real, 4, 4>

◆ parent_type

template<arithmetic Real>
using tatooine::rendering::orthographic_camera< Real >::parent_type = camera_interface<Real>

◆ real_type

template<arithmetic Real>
using tatooine::rendering::orthographic_camera< Real >::real_type = Real

◆ this_type

template<arithmetic Real>
using tatooine::rendering::orthographic_camera< Real >::this_type = orthographic_camera<Real>

◆ vec3

template<arithmetic Real>
using tatooine::rendering::orthographic_camera< Real >::vec3 = vec<Real, 3>

Constructor & Destructor Documentation

◆ orthographic_camera() [1/8]

template<arithmetic Real>
constexpr tatooine::rendering::orthographic_camera< Real >::orthographic_camera ( vec3 const &  eye,
vec3 const &  lookat,
vec3 const &  up,
Real const  left,
Real const  right,
Real const  bottom,
Real const  top,
Real const  near,
Real const  far,
Vec4< std::size_t > const &  viewport 
)
inlineconstexpr

Constructor generates bottom left image plane pixel position and pixel offset size.

◆ orthographic_camera() [2/8]

template<arithmetic Real>
constexpr tatooine::rendering::orthographic_camera< Real >::orthographic_camera ( vec3 const &  eye,
vec3 const &  lookat,
vec3 const &  up,
Real const  left,
Real const  right,
Real const  bottom,
Real const  top,
Real const  near,
Real const  far,
std::size_t const  res_x,
std::size_t const  res_y 
)
inlineconstexpr

Constructor generates bottom left image plane pixel position and pixel offset size.

◆ orthographic_camera() [3/8]

template<arithmetic Real>
constexpr tatooine::rendering::orthographic_camera< Real >::orthographic_camera ( vec3 const &  eye,
vec3 const &  lookat,
Real const  left,
Real const  right,
Real const  bottom,
Real const  top,
Real const  near,
Real const  far,
Vec4< std::size_t > const &  viewport 
)
inlineconstexpr

Constructor generates bottom left image plane pixel position and pixel offset size.

◆ orthographic_camera() [4/8]

template<arithmetic Real>
constexpr tatooine::rendering::orthographic_camera< Real >::orthographic_camera ( vec3 const &  eye,
vec3 const &  lookat,
Real const  left,
Real const  right,
Real const  bottom,
Real const  top,
Real const  near,
Real const  far,
std::size_t const  res_x,
std::size_t const  res_y 
)
inlineconstexpr

Constructor generates bottom left image plane pixel position and pixel offset size.

◆ orthographic_camera() [5/8]

template<arithmetic Real>
constexpr tatooine::rendering::orthographic_camera< Real >::orthographic_camera ( vec3 const &  eye,
vec3 const &  lookat,
vec3 const &  up,
Real const  height,
Real const  near,
Real const  far,
Vec4< std::size_t > const &  viewport 
)
inlineconstexpr

Constructor generates bottom left image plane pixel position and pixel offset size.

◆ orthographic_camera() [6/8]

template<arithmetic Real>
constexpr tatooine::rendering::orthographic_camera< Real >::orthographic_camera ( vec3 const &  eye,
vec3 const &  lookat,
vec3 const &  up,
Real const  height,
Real const  near,
Real const  far,
std::size_t const  res_x,
std::size_t const  res_y 
)
inlineconstexpr

Constructor generates bottom left image plane pixel position and pixel offset size.

◆ orthographic_camera() [7/8]

template<arithmetic Real>
tatooine::rendering::orthographic_camera< Real >::orthographic_camera ( vec3 const &  eye,
vec3 const &  lookat,
Real const  height,
Real const  near,
Real const  far,
Vec4< std::size_t > const &  viewport 
)
inline

Constructor generates bottom left image plane pixel position and pixel offset size.

◆ orthographic_camera() [8/8]

template<arithmetic Real>
tatooine::rendering::orthographic_camera< Real >::orthographic_camera ( vec3 const &  eye,
vec3 const &  lookat,
Real const  height,
Real const  near,
Real const  far,
std::size_t const  res_x,
std::size_t const  res_y 
)
inline

Constructor generates bottom left image plane pixel position and pixel offset size.

◆ ~orthographic_camera()

template<arithmetic Real>
tatooine::rendering::orthographic_camera< Real >::~orthographic_camera ( )
default

Member Function Documentation

◆ depth()

template<arithmetic Real>
auto tatooine::rendering::orthographic_camera< Real >::depth ( ) const
inline

◆ height()

template<arithmetic Real>
auto tatooine::rendering::orthographic_camera< Real >::height ( ) const
inline

◆ set_projection_matrix() [1/3]

template<arithmetic Real>
auto tatooine::rendering::camera_interface< Real >::set_projection_matrix ( mat4 const &  projection_matrix) -> void
inline

◆ set_projection_matrix() [2/3]

template<arithmetic Real>
auto constexpr tatooine::rendering::orthographic_camera< Real >::set_projection_matrix ( Real const  height,
Real const  near = 100,
Real const  far = -100 
)
inlineconstexpr

◆ set_projection_matrix() [3/3]

template<arithmetic Real>
auto constexpr tatooine::rendering::orthographic_camera< Real >::set_projection_matrix ( Real const  left,
Real const  right,
Real const  bottom,
Real const  top,
Real const  near,
Real const  far 
)
inlineconstexpr

◆ viewport() [1/2]

template<arithmetic Real>
auto constexpr tatooine::rendering::camera_interface< Real >::viewport ( ) const -> auto const&
inlineconstexpr

Returns number of pixels of plane in x-direction.

◆ viewport() [2/2]

template<arithmetic Real>
auto constexpr tatooine::rendering::camera_interface< Real >::viewport ( std::size_t const  i) const -> auto const&
inlineconstexpr

◆ width()

template<arithmetic Real>
auto tatooine::rendering::orthographic_camera< Real >::width ( ) const
inline

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