OGLplus  (0.59.0) a C++ wrapper for rendering APIs

eagine::oglp::orbiting_camera Class Reference

Class representing a camera orbiting around its target. More...

#include <oglplus/camera.hpp>

Public Member Functions

auto set_target (vec3 target) noexcept -> auto &
 Sets the target position.
 
auto set_fov (radians_t< float > angle) noexcept -> auto &
 Sets the y-axis FOV angle.
 
auto set_near (valid_if_positive< float > dist) noexcept -> auto &
 Sets the distance of the near plane.
 
auto set_far (valid_if_positive< float > dist) noexcept -> auto &
 Sets the distance of the far plane.
 
auto set_orbit_min (valid_if_positive< float > orbit) noexcept -> auto &
 Set minimal orbit value.
 
auto set_orbit_max (valid_if_positive< float > orbit) noexcept -> auto &
 Set maximal orbit value.
 
auto fov () const noexcept -> radians_t< float >
 Returns the y-axis FOV angle.
 
auto orbit () const noexcept -> float
 Returns the orbit altitude value. More...
 
auto azimuth () const noexcept -> radians_t< float >
 Returns the azimuth angle (longitude). More...
 
auto elevation () const noexcept -> radians_t< float >
 Returns the elevation angle (latitude). More...
 
auto target () const noexcept -> vec3
 Returns the target position. More...
 
auto target_to_camera_direction () const noexcept -> vec3
 Returns the target-to-camera direction vector. More...
 
auto camera_to_target_direction () const noexcept -> vec3
 Returns the camera-to-target direction vector. More...
 
auto position () const noexcept -> vec3
 Returns the position of the camera. More...
 
auto perspective_matrix (float aspect) const noexcept
 Returns the perspective matrix for the given aspect ratio.
 
auto transform_matrix () const noexcept
 Returns the camera transformation matrix.
 
auto matrix (float aspect) const noexcept
 Returns the camera matrix (perspective * projection).
 
auto target_plane_point (float ndcx, float ndcy, float aspect) const noexcept -> optionally_valid< vec3 >
 Returns the 3D position of a point (in NDC) on the target plane.
 
auto pointer_ray (float ndcx, float ndcy, float aspect) const noexcept -> optionally_valid< line >
 Returns a ray from the camera through a point on the target plane.
 

Detailed Description

Class representing a camera orbiting around its target.

Member Function Documentation

◆ azimuth()

auto eagine::oglp::orbiting_camera::azimuth ( ) const -> radians_t<float>
inlinenoexcept

Returns the azimuth angle (longitude).

See also
orbit
elevation

◆ camera_to_target_direction()

auto eagine::oglp::orbiting_camera::camera_to_target_direction ( ) const -> vec3
inlinenoexcept

Returns the camera-to-target direction vector.

See also
target_to_camera_direction

◆ elevation()

auto eagine::oglp::orbiting_camera::elevation ( ) const -> radians_t<float>
inlinenoexcept

Returns the elevation angle (latitude).

See also
orbit
azimuth

◆ orbit()

auto eagine::oglp::orbiting_camera::orbit ( ) const -> float
inlinenoexcept

Returns the orbit altitude value.

See also
azimuth
elevation

Referenced by position(), set_orbit_max(), and set_orbit_min().

◆ position()

auto eagine::oglp::orbiting_camera::position ( ) const -> vec3
inlinenoexcept

Returns the position of the camera.

See also
target

◆ target()

auto eagine::oglp::orbiting_camera::target ( ) const -> vec3
inlinenoexcept

Returns the target position.

See also
position

Referenced by position(), and set_target().

◆ target_to_camera_direction()

auto eagine::oglp::orbiting_camera::target_to_camera_direction ( ) const -> vec3
noexcept

Returns the target-to-camera direction vector.

See also
camera_to_target_direction

Referenced by camera_to_target_direction(), and position().


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

Copyright © 2015-2021 Matúš Chochlík.
<chochlik -at -gmail.com>
Documentation generated on Tue Apr 13 2021 by Doxygen (version 1.8.17).