Bicameral Engine
GPU-resident engine for a magic-research open-world game
Loading...
Searching...
No Matches
bicameral::render::OrbitCamera Class Reference

#include <debug_camera.h>

Collaboration diagram for bicameral::render::OrbitCamera:
[legend]

Public Member Functions

 OrbitCamera (const OrbitCameraState &initial={})
void Orbit (float deltaXPixels, float deltaYPixels)
void Pan (float deltaXPixels, float deltaYPixels, uint32_t viewportHeight)
void Zoom (int32_t wheelSteps)
void Focus (Vector3 target, float distance)
void ToggleProjection ()
void Reset ()
const OrbitCameraState & State () const
CameraBasis Basis (uint32_t width, uint32_t height) const

Static Public Attributes

static constexpr float VERTICAL_FIELD_OF_VIEW_DEGREES = 45.0f
static constexpr float MIN_DISTANCE = 0.001f
static constexpr float MAX_DISTANCE = 2000.0f

Private Attributes

OrbitCameraState m_initial
OrbitCameraState m_state

Detailed Description

Definition at line 54 of file debug_camera.h.

Constructor & Destructor Documentation

◆ OrbitCamera()

bicameral::render::OrbitCamera::OrbitCamera ( const OrbitCameraState & initial = {})
inlineexplicit

Definition at line 61 of file debug_camera.h.

Member Function Documentation

◆ Basis()

CameraBasis bicameral::render::OrbitCamera::Basis ( uint32_t width,
uint32_t height ) const
nodiscard

Definition at line 102 of file debug_camera.cpp.

References m_state, and VERTICAL_FIELD_OF_VIEW_DEGREES.

◆ Focus()

void bicameral::render::OrbitCamera::Focus ( Vector3 target,
float distance )

Definition at line 95 of file debug_camera.cpp.

References m_state, MAX_DISTANCE, and MIN_DISTANCE.

◆ Orbit()

void bicameral::render::OrbitCamera::Orbit ( float deltaXPixels,
float deltaYPixels )

Definition at line 72 of file debug_camera.cpp.

References m_state.

◆ Pan()

void bicameral::render::OrbitCamera::Pan ( float deltaXPixels,
float deltaYPixels,
uint32_t viewportHeight )

Definition at line 80 of file debug_camera.cpp.

References m_state.

◆ Reset()

void bicameral::render::OrbitCamera::Reset ( )
inline

Definition at line 68 of file debug_camera.h.

References m_initial, and m_state.

◆ State()

const OrbitCameraState & bicameral::render::OrbitCamera::State ( ) const
inlinenodiscard

Definition at line 70 of file debug_camera.h.

References m_state.

◆ ToggleProjection()

void bicameral::render::OrbitCamera::ToggleProjection ( )
inline

Definition at line 67 of file debug_camera.h.

References m_state.

◆ Zoom()

void bicameral::render::OrbitCamera::Zoom ( int32_t wheelSteps)

Definition at line 90 of file debug_camera.cpp.

References m_state, MAX_DISTANCE, and MIN_DISTANCE.

Member Data Documentation

◆ m_initial

OrbitCameraState bicameral::render::OrbitCamera::m_initial
private

Definition at line 74 of file debug_camera.h.

Referenced by Reset().

◆ m_state

OrbitCameraState bicameral::render::OrbitCamera::m_state
private

Definition at line 75 of file debug_camera.h.

Referenced by Basis(), Focus(), Orbit(), Pan(), Reset(), State(), ToggleProjection(), and Zoom().

◆ MAX_DISTANCE

float bicameral::render::OrbitCamera::MAX_DISTANCE = 2000.0f
staticconstexpr

Definition at line 59 of file debug_camera.h.

Referenced by Focus(), and Zoom().

◆ MIN_DISTANCE

float bicameral::render::OrbitCamera::MIN_DISTANCE = 0.001f
staticconstexpr

Definition at line 58 of file debug_camera.h.

Referenced by Focus(), and Zoom().

◆ VERTICAL_FIELD_OF_VIEW_DEGREES

float bicameral::render::OrbitCamera::VERTICAL_FIELD_OF_VIEW_DEGREES = 45.0f
staticconstexpr

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