Loading [MathJax]/extensions/tex2jax.js
Tatooine
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Modules Pages Concepts
Namespaces | Classes | Concepts | Functions | Variables
tatooine::rendering Namespace Reference

Namespaces

namespace  detail
 
namespace  interactive
 
namespace  raytracing
 

Classes

struct  camera_controller
 
struct  camera_controller_interface
 
struct  camera_interface
 Interface for camera implementations. More...
 
struct  first_person_window
 
struct  fps_camera_controller
 
struct  is_camera_impl
 
struct  line_loop
 
struct  line_shader
 
struct  orthographic_camera
 
struct  orthographic_camera_controller
 
struct  perspective_camera
 Perspective cameras are able to cast rays from one point called 'eye' through an image plane. More...
 
struct  pointset
 

Concepts

concept  camera
 

Functions

template<camera Camera, arithmetic IsoReal, typename Dim0 , typename Dim1 , typename Dim2 , typename Field , typename Shader >
requires invocable< Shader, vec<typename rectilinear_grid<Dim0, Dim1, Dim2>::real_type, 3>, IsoReal, vec<typename rectilinear_grid<Dim0, Dim1, Dim2>::real_type, 3>, vec<typename Camera::real_type, 3>, vec<std::size_t, 2>>
auto direct_isosurface (Camera const &cam, rectilinear_grid< Dim0, Dim1, Dim2 > const &g, Field &&field, std::vector< IsoReal > const &isovalues, Shader &&shader)
 
template<typename IsoReal , typename Dim0 , typename Dim1 , typename Dim2 , typename Field , typename FieldReal , typename Shader >
auto direct_isosurface (camera auto const &cam, rectilinear_grid< Dim0, Dim1, Dim2 > const &g, scalarfield< Field, FieldReal, 3 > const &field, IsoReal const isovalue, Shader &&shader)
 
template<camera Camera, typename GridVertexProperty , typename Shader , arithmetic Iso>
requires invocable< Shader, vec<typename GridVertexProperty::grid_type::real_type, 3>, Iso, vec<typename GridVertexProperty::grid_type::real_type, 3>, vec<typename Camera::real_type, 3>, vec<std::size_t, 2>>
auto direct_isosurface (Camera const &cam, tatooine::detail::rectilinear_grid::vertex_property_sampler< GridVertexProperty, interpolation::linear, interpolation::linear, interpolation::linear > const &linear_field, Iso const isovalue, Shader &&shader)
 
template<typename DistOnRay , typename AABBReal , typename DataEvaluator , typename Isovalue , typename DomainCheck , typename Shader >
auto direct_isosurface (camera auto const &cam, axis_aligned_bounding_box< AABBReal, 3 > const &aabb, DataEvaluator &&data_evaluator, DomainCheck &&domain_check, Isovalue isovalue, DistOnRay const distance_on_ray, Shader &&shader)
 
template<arithmetic DistOnRay, arithmetic CameraReal, arithmetic AABBReal, regular_invocable< vec< AABBReal, 3 > > DomainCheck, typename Shader >
auto direct_volume (camera< CameraReal > const &cam, axis_aligned_bounding_box< AABBReal, 3 > const &aabb, DomainCheck &&domain_check, DistOnRay const distance_on_ray, Shader &&shader)
 
template<typename Real >
auto to_gpu (line< Real, 3 > const &l)
 
template<typename Real >
auto to_gpu (std::vector< line< Real, 3 > > const &lines)
 
template<typename Real , size_t N>
auto interactive (std::vector< line< Real, N > > const &lines)
 
template<typename Real , size_t N>
auto interactive (line< Real, N > const &l)
 
template<typename Real >
auto constexpr translation_matrix (Real const x, Real const y, Real const z)
 
template<typename Real >
auto constexpr translation_matrix (Vec3< Real > const &t)
 
template<typename Real >
auto constexpr scale_matrix (Real s)
 
template<typename Real >
auto constexpr scale_matrix (Real x, Real y, Real z)
 
template<typename Real >
auto constexpr scale_matrix (Vec3< Real > const &s)
 
template<typename Real >
auto constexpr rotation_matrix (Real angle, Real u, Real v, Real w) -> Mat4< Real >
 
template<typename Real >
auto constexpr rotation_matrix (Real angle, Vec3< Real > const &axis)
 
template<typename Real >
auto constexpr orthographic_matrix (Real const left, Real const right, Real const bottom, Real const top, Real const near, Real const far)
 
template<typename Real >
auto constexpr look_at_matrix_left_hand (Vec3< Real > const &eye, Vec3< Real > const &center, Vec3< Real > const &up={0, 1, 0}) -> Mat4< Real >
 Can be used as transform matrix of an object. More...
 
template<typename Real >
auto constexpr inv_look_at_matrix_left_hand (Vec3< Real > const &eye, Vec3< Real > const &center, Vec3< Real > const &up={0, 1, 0})
 Can be used as view matrix of a camera. More...
 
template<typename Real >
auto constexpr look_at_matrix_right_hand (Vec3< Real > const &eye, Vec3< Real > const &center, Vec3< Real > const &up={0, 1, 0})
 Can be used as transform matrix of an object. More...
 
template<typename Real >
auto constexpr inv_look_at_matrix_right_hand (Vec3< Real > const &eye, Vec3< Real > const &center, Vec3< Real > const &up={0, 1, 0})
 Can be used as view matrix of a camera. More...
 
template<typename Real >
auto constexpr look_at_matrix (Vec3< Real > const &eye, Vec3< Real > const &center, Vec3< Real > const &up={0, 1, 0}) -> Mat4< Real >
 
template<typename Real >
auto constexpr inv_look_at_matrix (Vec3< Real > const &eye, Vec3< Real > const &center, Vec3< Real > const &up={0, 1, 0})
 Can be used as view matrix of a camera. More...
 
template<typename Real >
auto constexpr fps_look_at_matrix_left_hand (Vec3< Real > const &eye, arithmetic auto const pitch, arithmetic auto const yaw) -> Mat4< Real >
 Can be used as transform matrix of an object. More...
 
template<typename Real >
auto constexpr inv_fps_look_at_matrix_left_hand (Vec3< Real > const &eye, arithmetic auto const pitch, arithmetic auto const yaw) -> Mat4< Real >
 Can be used as view matrix of a camera. More...
 
template<typename Real >
auto constexpr fps_look_at_matrix_right_hand (Vec3< Real > const &eye, arithmetic auto const pitch, arithmetic auto const yaw) -> Mat4< Real >
 Can be used as transform matrix of an object. More...
 
template<typename Real >
auto constexpr inv_fps_look_at_matrix_right_hand (Vec3< Real > const &eye, arithmetic auto const pitch, arithmetic auto const yaw) -> Mat4< Real >
 Can be used as view matrix of a camera. More...
 
template<typename Real >
auto constexpr fps_look_at_matrix (Vec3< Real > const &eye, arithmetic auto const pitch, arithmetic auto const yaw) -> Mat4< Real >
 Can be used as transform matrix of an object. More...
 
template<typename Real >
auto constexpr inv_fps_look_at_matrix (Vec3< Real > const &eye, arithmetic auto const pitch, arithmetic auto const yaw)
 Can be used as view matrix of a camera. More...
 
template<typename Real >
auto constexpr frustum_matrix (Real const left, Real const right, Real const bottom, Real const top, Real const near, Real const far)
 
template<typename Real >
auto constexpr perspective_matrix (Real const fov_angles, Real const aspect_ratio, Real const near, Real const far)
 
template<typename EyeReal , typename LookatReal , typename UpReal , typename FovReal , typename NearReal , typename FarReal >
 perspective_camera (vec< EyeReal, 3 > const &, vec< LookatReal, 3 > const &, vec< UpReal, 3 > const &, FovReal const, NearReal const, FarReal const, std::size_t const, std::size_t const) -> perspective_camera< common_type< EyeReal, LookatReal, UpReal, FovReal, NearReal, FarReal > >
 
template<typename EyeReal , typename LookatReal , typename FovReal , typename NearReal , typename FarReal >
 perspective_camera (vec< EyeReal, 3 > const &, vec< LookatReal, 3 > const &, FovReal const, NearReal const, FarReal const, std::size_t const, std::size_t const) -> perspective_camera< common_type< EyeReal, LookatReal, FovReal, NearReal, FarReal > >
 
template<typename EyeReal , typename LookatReal , typename FovReal >
 perspective_camera (vec< EyeReal, 3 > const &, vec< LookatReal, 3 > const &, FovReal const, std::size_t const, std::size_t const) -> perspective_camera< common_type< EyeReal, LookatReal, FovReal > >
 
template<typename EyeReal , typename LookatReal , typename UpReal , typename FovReal >
 perspective_camera (vec< EyeReal, 3 > const &, vec< LookatReal, 3 > const &, vec< UpReal, 3 > const &, FovReal const, std::size_t const, std::size_t const) -> perspective_camera< common_type< EyeReal, LookatReal, UpReal, std::decay_t< FovReal > > >
 
template<typename Real >
auto render (AABB3< Real > const &aabb, int const line_width, UniformRectilinearGrid2< Real > const &grid, camera auto const &cam, invocable< Real, typename AABB3< Real >::pos_type, typename AABB3< Real >::pos_type, std::size_t, std::size_t > auto &&callback)
 
template<typename Real , typename Callback >
auto render (AABB3< Real > const &aabb, UniformRectilinearGrid2< Real > const &grid, camera auto const &cam, invocable< Real, typename AABB3< Real >::pos_type, typename AABB3< Real >::pos_type, std::size_t, std::size_t > auto &&callback)
 
template<typename Real >
auto render (Vec2< Real > p0, Vec2< Real > p1, int const line_width, UniformRectilinearGrid2< Real > const &grid, invocable< Real, std::size_t, std::size_t > auto &&callback)
 
template<typename Real , invocable< Real, std::size_t, std::size_t > Callback>
auto render (Vec2< Real > const &p0, Vec2< Real > const &p1, UniformRectilinearGrid2< Real > const &grid, Callback &&callback)
 
template<typename Real , invocable< Real, std::size_t, std::size_t > Callback>
auto render (Vec4< Real > p0, Vec4< Real > p1, int const line_width, UniformRectilinearGrid2< Real > const &grid, camera auto const &cam, Callback &&callback)
 
template<typename DimX , typename DimY , typename DimZ , floating_point ValueType, bool HasNonConstReference>
auto interactive (tatooine::detail::rectilinear_grid::typed_vertex_property_interface< rectilinear_grid< DimX, DimY, DimZ >, ValueType, HasNonConstReference > const &prop) -> void
 

Variables

template<typename T >
static auto constexpr is_camera = is_camera_impl<T>::value
 

Function Documentation

◆ direct_isosurface() [1/4]

template<typename DistOnRay , typename AABBReal , typename DataEvaluator , typename Isovalue , typename DomainCheck , typename Shader >
auto tatooine::rendering::direct_isosurface ( camera auto const &  cam,
axis_aligned_bounding_box< AABBReal, 3 > const &  aabb,
DataEvaluator &&  data_evaluator,
DomainCheck &&  domain_check,
Isovalue  isovalue,
DistOnRay const  distance_on_ray,
Shader &&  shader 
)

◆ direct_isosurface() [2/4]

template<typename IsoReal , typename Dim0 , typename Dim1 , typename Dim2 , typename Field , typename FieldReal , typename Shader >
auto tatooine::rendering::direct_isosurface ( camera auto const &  cam,
rectilinear_grid< Dim0, Dim1, Dim2 > const &  g,
scalarfield< Field, FieldReal, 3 > const &  field,
IsoReal const  isovalue,
Shader &&  shader 
)

◆ direct_isosurface() [3/4]

template<camera Camera, arithmetic IsoReal, typename Dim0 , typename Dim1 , typename Dim2 , typename Field , typename Shader >
requires invocable< Shader, vec<typename rectilinear_grid<Dim0, Dim1, Dim2>::real_type, 3>, IsoReal, vec<typename rectilinear_grid<Dim0, Dim1, Dim2>::real_type, 3>, vec<typename Camera::real_type, 3>, vec<std::size_t, 2>>
auto tatooine::rendering::direct_isosurface ( Camera const &  cam,
rectilinear_grid< Dim0, Dim1, Dim2 > const &  g,
Field &&  field,
std::vector< IsoReal > const &  isovalues,
Shader &&  shader 
)

This is an implementation of [4]. See also Render Isosurface.

Parameters
camCamera model for casting rays
linear_fieldPiece-wise trilinear field
isovalueIso Value of the extracted iso surface
shaderShader for setting color at pixel. The shader takes position, color (vec3 or vec4).
Returns
Returns a 2D rectilinear grid with a grid_vertex_property named "rendered_isosurface"

◆ direct_isosurface() [4/4]

template<camera Camera, typename GridVertexProperty , typename Shader , arithmetic Iso>
requires invocable< Shader, vec<typename GridVertexProperty::grid_type::real_type, 3>, Iso, vec<typename GridVertexProperty::grid_type::real_type, 3>, vec<typename Camera::real_type, 3>, vec<std::size_t, 2>>
auto tatooine::rendering::direct_isosurface ( Camera const &  cam,
tatooine::detail::rectilinear_grid::vertex_property_sampler< GridVertexProperty, interpolation::linear, interpolation::linear, interpolation::linear > const &  linear_field,
Iso const  isovalue,
Shader &&  shader 
)

an implementation of [4]. See also Render Isosurface.

Parameters
camCamera model for casting rays
linear_fieldPiece-wise trilinear field
isovalueIso Value of the extracted iso surface
shaderShader for setting color at pixel. The shader takes position and view direction as parameters. It must return a RGB or a RGBA color (vec3 or vec4).
Returns
Returns a 2D grid with a grid_vertex_property named "rendered_isosurface"

◆ direct_volume()

template<arithmetic DistOnRay, arithmetic CameraReal, arithmetic AABBReal, regular_invocable< vec< AABBReal, 3 > > DomainCheck, typename Shader >
auto tatooine::rendering::direct_volume ( camera< CameraReal > const &  cam,
axis_aligned_bounding_box< AABBReal, 3 > const &  aabb,
DomainCheck &&  domain_check,
DistOnRay const  distance_on_ray,
Shader &&  shader 
)

◆ fps_look_at_matrix()

template<typename Real >
auto constexpr tatooine::rendering::fps_look_at_matrix ( Vec3< Real > const &  eye,
arithmetic auto const  pitch,
arithmetic auto const  yaw 
) -> Mat4<Real>
constexpr

Can be used as transform matrix of an object.

◆ fps_look_at_matrix_left_hand()

template<typename Real >
auto constexpr tatooine::rendering::fps_look_at_matrix_left_hand ( Vec3< Real > const &  eye,
arithmetic auto const  pitch,
arithmetic auto const  yaw 
) -> Mat4<Real>
constexpr

Can be used as transform matrix of an object.

◆ fps_look_at_matrix_right_hand()

template<typename Real >
auto constexpr tatooine::rendering::fps_look_at_matrix_right_hand ( Vec3< Real > const &  eye,
arithmetic auto const  pitch,
arithmetic auto const  yaw 
) -> Mat4<Real>
constexpr

Can be used as transform matrix of an object.

◆ frustum_matrix()

template<typename Real >
auto constexpr tatooine::rendering::frustum_matrix ( Real const  left,
Real const  right,
Real const  bottom,
Real const  top,
Real const  near,
Real const  far 
)
constexpr

◆ interactive() [1/3]

template<typename Real , size_t N>
auto tatooine::rendering::interactive ( line< Real, N > const &  l)

◆ interactive() [2/3]

template<typename Real , size_t N>
auto tatooine::rendering::interactive ( std::vector< line< Real, N > > const &  lines)

◆ interactive() [3/3]

template<typename DimX , typename DimY , typename DimZ , floating_point ValueType, bool HasNonConstReference>
auto tatooine::rendering::interactive ( tatooine::detail::rectilinear_grid::typed_vertex_property_interface< rectilinear_grid< DimX, DimY, DimZ >, ValueType, HasNonConstReference > const &  prop) -> void

◆ inv_fps_look_at_matrix()

template<typename Real >
auto constexpr tatooine::rendering::inv_fps_look_at_matrix ( Vec3< Real > const &  eye,
arithmetic auto const  pitch,
arithmetic auto const  yaw 
)
constexpr

Can be used as view matrix of a camera.

◆ inv_fps_look_at_matrix_left_hand()

template<typename Real >
auto constexpr tatooine::rendering::inv_fps_look_at_matrix_left_hand ( Vec3< Real > const &  eye,
arithmetic auto const  pitch,
arithmetic auto const  yaw 
) -> Mat4<Real>
constexpr

Can be used as view matrix of a camera.

◆ inv_fps_look_at_matrix_right_hand()

template<typename Real >
auto constexpr tatooine::rendering::inv_fps_look_at_matrix_right_hand ( Vec3< Real > const &  eye,
arithmetic auto const  pitch,
arithmetic auto const  yaw 
) -> Mat4<Real>
constexpr

Can be used as view matrix of a camera.

◆ inv_look_at_matrix()

template<typename Real >
auto constexpr tatooine::rendering::inv_look_at_matrix ( Vec3< Real > const &  eye,
Vec3< Real > const &  center,
Vec3< Real > const &  up = {0, 1, 0} 
)
constexpr

Can be used as view matrix of a camera.

◆ inv_look_at_matrix_left_hand()

template<typename Real >
auto constexpr tatooine::rendering::inv_look_at_matrix_left_hand ( Vec3< Real > const &  eye,
Vec3< Real > const &  center,
Vec3< Real > const &  up = {0, 1, 0} 
)
constexpr

Can be used as view matrix of a camera.

◆ inv_look_at_matrix_right_hand()

template<typename Real >
auto constexpr tatooine::rendering::inv_look_at_matrix_right_hand ( Vec3< Real > const &  eye,
Vec3< Real > const &  center,
Vec3< Real > const &  up = {0, 1, 0} 
)
constexpr

Can be used as view matrix of a camera.

◆ look_at_matrix()

template<typename Real >
auto constexpr tatooine::rendering::look_at_matrix ( Vec3< Real > const &  eye,
Vec3< Real > const &  center,
Vec3< Real > const &  up = {0, 1, 0} 
) -> Mat4<Real>
constexpr

◆ look_at_matrix_left_hand()

template<typename Real >
auto constexpr tatooine::rendering::look_at_matrix_left_hand ( Vec3< Real > const &  eye,
Vec3< Real > const &  center,
Vec3< Real > const &  up = {0, 1, 0} 
) -> Mat4<Real>
constexpr

Can be used as transform matrix of an object.

◆ look_at_matrix_right_hand()

template<typename Real >
auto constexpr tatooine::rendering::look_at_matrix_right_hand ( Vec3< Real > const &  eye,
Vec3< Real > const &  center,
Vec3< Real > const &  up = {0, 1, 0} 
)
constexpr

Can be used as transform matrix of an object.

◆ orthographic_matrix()

template<typename Real >
auto constexpr tatooine::rendering::orthographic_matrix ( Real const  left,
Real const  right,
Real const  bottom,
Real const  top,
Real const  near,
Real const  far 
)
constexpr

◆ perspective_camera() [1/4]

template<typename EyeReal , typename LookatReal , typename FovReal , typename NearReal , typename FarReal >
tatooine::rendering::perspective_camera ( vec< EyeReal, 3 > const &  ,
vec< LookatReal, 3 > const &  ,
FovReal const  ,
NearReal const  ,
FarReal const  ,
std::size_t const  ,
std::size_t const   
) -> perspective_camera< common_type< EyeReal, LookatReal, FovReal, NearReal, FarReal > >

◆ perspective_camera() [2/4]

template<typename EyeReal , typename LookatReal , typename FovReal >
tatooine::rendering::perspective_camera ( vec< EyeReal, 3 > const &  ,
vec< LookatReal, 3 > const &  ,
FovReal const  ,
std::size_t const  ,
std::size_t const   
) -> perspective_camera< common_type< EyeReal, LookatReal, FovReal > >

◆ perspective_camera() [3/4]

template<typename EyeReal , typename LookatReal , typename UpReal , typename FovReal , typename NearReal , typename FarReal >
tatooine::rendering::perspective_camera ( vec< EyeReal, 3 > const &  ,
vec< LookatReal, 3 > const &  ,
vec< UpReal, 3 > const &  ,
FovReal const  ,
NearReal const  ,
FarReal const  ,
std::size_t const  ,
std::size_t const   
) -> perspective_camera< common_type< EyeReal, LookatReal, UpReal, FovReal, NearReal, FarReal > >

◆ perspective_camera() [4/4]

template<typename EyeReal , typename LookatReal , typename UpReal , typename FovReal >
tatooine::rendering::perspective_camera ( vec< EyeReal, 3 > const &  ,
vec< LookatReal, 3 > const &  ,
vec< UpReal, 3 > const &  ,
FovReal const  ,
std::size_t const  ,
std::size_t const   
) -> perspective_camera< common_type< EyeReal, LookatReal, UpReal, std::decay_t< FovReal > > >

◆ perspective_matrix()

template<typename Real >
auto constexpr tatooine::rendering::perspective_matrix ( Real const  fov_angles,
Real const  aspect_ratio,
Real const  near,
Real const  far 
)
constexpr

◆ render() [1/5]

template<typename Real >
auto tatooine::rendering::render ( AABB3< Real > const &  aabb,
int const  line_width,
UniformRectilinearGrid2< Real > const &  grid,
camera auto const &  cam,
invocable< Real, typename AABB3< Real >::pos_type, typename AABB3< Real >::pos_type, std::size_t, std::size_t > auto &&  callback 
)

◆ render() [2/5]

template<typename Real , typename Callback >
auto tatooine::rendering::render ( AABB3< Real > const &  aabb,
UniformRectilinearGrid2< Real > const &  grid,
camera auto const &  cam,
invocable< Real, typename AABB3< Real >::pos_type, typename AABB3< Real >::pos_type, std::size_t, std::size_t > auto &&  callback 
)

◆ render() [3/5]

template<typename Real , invocable< Real, std::size_t, std::size_t > Callback>
auto tatooine::rendering::render ( Vec2< Real > const &  p0,
Vec2< Real > const &  p1,
UniformRectilinearGrid2< Real > const &  grid,
Callback &&  callback 
)

◆ render() [4/5]

template<typename Real >
auto tatooine::rendering::render ( Vec2< Real >  p0,
Vec2< Real >  p1,
int const  line_width,
UniformRectilinearGrid2< Real > const &  grid,
invocable< Real, std::size_t, std::size_t > auto &&  callback 
)

◆ render() [5/5]

template<typename Real , invocable< Real, std::size_t, std::size_t > Callback>
auto tatooine::rendering::render ( Vec4< Real >  p0,
Vec4< Real >  p1,
int const  line_width,
UniformRectilinearGrid2< Real > const &  grid,
camera auto const &  cam,
Callback &&  callback 
)

◆ rotation_matrix() [1/2]

template<typename Real >
auto constexpr tatooine::rendering::rotation_matrix ( Real  angle,
Real  u,
Real  v,
Real  w 
) -> Mat4<Real>
constexpr

◆ rotation_matrix() [2/2]

template<typename Real >
auto constexpr tatooine::rendering::rotation_matrix ( Real  angle,
Vec3< Real > const &  axis 
)
constexpr

◆ scale_matrix() [1/3]

template<typename Real >
auto constexpr tatooine::rendering::scale_matrix ( Real  s)
constexpr

◆ scale_matrix() [2/3]

template<typename Real >
auto constexpr tatooine::rendering::scale_matrix ( Real  x,
Real  y,
Real  z 
)
constexpr

◆ scale_matrix() [3/3]

template<typename Real >
auto constexpr tatooine::rendering::scale_matrix ( Vec3< Real > const &  s)
constexpr

◆ to_gpu() [1/2]

template<typename Real >
auto tatooine::rendering::to_gpu ( line< Real, 3 > const &  l)

◆ to_gpu() [2/2]

template<typename Real >
auto tatooine::rendering::to_gpu ( std::vector< line< Real, 3 > > const &  lines)

◆ translation_matrix() [1/2]

template<typename Real >
auto constexpr tatooine::rendering::translation_matrix ( Real const  x,
Real const  y,
Real const  z 
)
constexpr

◆ translation_matrix() [2/2]

template<typename Real >
auto constexpr tatooine::rendering::translation_matrix ( Vec3< Real > const &  t)
constexpr

Variable Documentation

◆ is_camera

template<typename T >
auto constexpr tatooine::rendering::is_camera = is_camera_impl<T>::value
staticconstexpr