Extension of orbiting camera wrapper. More...
#include <eagine/application/camera.hpp>
Public Member Functions | |
auto | matrix (video_context &vc) const noexcept |
Construction from a reference to a video context. | |
auto | has_changed () noexcept |
Inddicates if the camera has changed and resets the flag. | |
auto | update_orbit (float inc) noexcept -> orbiting_camera & |
Does a generic orbit update with given increment. | |
auto | update_turns (float inc) noexcept -> orbiting_camera & |
Does a generic azimuth update with given increment. | |
auto | update_pitch (float inc) noexcept -> orbiting_camera & |
Does a generic elevation update with given increment. | |
auto | idle_update (const context_state_view &, const valid_if_positive< float > &divisor=2.F) noexcept -> orbiting_camera & |
Does a generic combined update when the user does not provide input. More... | |
auto | idle_update (const execution_context &, const valid_if_positive< float > &divisor=2.F) noexcept -> orbiting_camera & |
Does a generic combined update when the user does not provide input. More... | |
auto | pressure_input () noexcept -> input_slot |
Returns the input slot for handling cursor pressure input signals. This can be bound for example to mouse button press input signal. More... | |
auto | dampening_input () noexcept -> input_slot |
Returns the input slot for handling motion dampening input signals. This can be bound for example to control or shift key press input signal. More... | |
auto | altitude_change_input () noexcept -> input_slot |
Returns the input slot for handling orbit change input signals. This can be bound for example to mouse wheel scroll input signal. More... | |
auto | longitude_change_input () noexcept -> input_slot |
Returns the input slot for handling azimuth change input signals. This can be bound for example to left/right arrow key press input signals. More... | |
auto | latitude_change_input () noexcept -> input_slot |
Returns the input slot for handling elevation change input signals. This can be bound for example to up/down arrow key press input signals. More... | |
auto | connect_inputs (execution_context &ec) -> orbiting_camera & |
Connects the camera input slots to the execution context. More... | |
auto | basic_input_mapping (execution_context &ec, identifier mapping_id) -> orbiting_camera & |
Specifies a named key binding for the camera input slots. More... | |
auto | basic_input_mapping (execution_context &ec) -> auto & |
Specifies the default key binding for the camera input slots. More... | |
auto | matrix (float aspect) const noexcept |
Returns the camera matrix (perspective * projection). | |
![]() | |
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. | |
Extension of orbiting camera wrapper.
|
inlinenoexcept |
Returns the input slot for handling orbit change input signals. This can be bound for example to mouse wheel scroll input signal.
|
inline |
Specifies the default key binding for the camera input slots.
auto eagine::application::orbiting_camera::basic_input_mapping | ( | execution_context & | ec, |
identifier | mapping_id | ||
) | -> orbiting_camera & |
Specifies a named key binding for the camera input slots.
Referenced by basic_input_mapping().
auto eagine::application::orbiting_camera::connect_inputs | ( | execution_context & | ec | ) | -> orbiting_camera & |
Connects the camera input slots to the execution context.
|
inlinenoexcept |
Returns the input slot for handling motion dampening input signals. This can be bound for example to control or shift key press input signal.
|
noexcept |
Does a generic combined update when the user does not provide input.
|
noexcept |
Does a generic combined update when the user does not provide input.
|
inlinenoexcept |
Returns the input slot for handling elevation change input signals. This can be bound for example to up/down arrow key press input signals.
|
inlinenoexcept |
Returns the input slot for handling azimuth change input signals. This can be bound for example to left/right arrow key press input signals.
|
inlinenoexcept |
Returns the input slot for handling cursor pressure input signals. This can be bound for example to mouse button press input signal.