$darkmode
Suckless OGL 1.0.0
A lean, high-performance C11 PBR Renderer
Camera Struct Reference

Represents a 3D camera with orientation, movement, and physical properties. More...

#include <camera.h>

Data Fields

vec3 position
 
vec3 front
 
vec3 up
 
vec3 right
 
vec3 world_up
 
float yaw
 
float pitch
 
float velocity
 
float sensitivity
 
float zoom
 
int move_forward
 
int move_backward
 
int move_left
 
int move_right
 
int move_up
 
int move_down
 
vec3 velocity_current
 
float acceleration
 
float friction
 
float yaw_target
 
float pitch_target
 
float rotation_smoothing
 
float smoothed_x
 
float smoothed_y
 
float bobbing_time
 
float bobbing_frequency
 
float bobbing_amplitude
 
int bobbing_enabled
 
float physics_accumulator
 
float fixed_timestep
 
float mouse_smoothing_factor
 
double last_mouse_x
 
double last_mouse_y
 
int first_mouse
 

Detailed Description

Represents a 3D camera with orientation, movement, and physical properties.

Field Documentation

◆ acceleration

float Camera::acceleration

Speed increase factor.

◆ bobbing_amplitude

float Camera::bobbing_amplitude

Vertical distance of the bobbing motion.

◆ bobbing_enabled

int Camera::bobbing_enabled

Boolean toggle for head bobbing effect.

◆ bobbing_frequency

float Camera::bobbing_frequency

Speed of the bobbing motion.

◆ bobbing_time

float Camera::bobbing_time

Accumulated time for the sine-wave oscillation.

◆ first_mouse

int Camera::first_mouse

Flag to handle initial mouse jump.

◆ fixed_timestep

float Camera::fixed_timestep

Target duration for one physics update.

◆ friction

float Camera::friction

Decay factor when no input is provided (0.0 to 1.0).

◆ front

vec3 Camera::front

Front direction vector (normalized).

◆ last_mouse_x

double Camera::last_mouse_x

Previous mouse X position.

◆ last_mouse_y

double Camera::last_mouse_y

Previous mouse Y position.

◆ mouse_smoothing_factor

float Camera::mouse_smoothing_factor

Input lag simulation factor for smoother movement.

◆ move_backward

int Camera::move_backward

◆ move_down

int Camera::move_down

◆ move_forward

int Camera::move_forward

◆ move_left

int Camera::move_left

◆ move_right

int Camera::move_right

◆ move_up

int Camera::move_up

◆ physics_accumulator

float Camera::physics_accumulator

Residual time for fixed-step physics.

◆ pitch

float Camera::pitch

Vertical rotation in degrees.

◆ pitch_target

float Camera::pitch_target

Target pitch to lerp towards.

◆ position

vec3 Camera::position

World position.

◆ right

vec3 Camera::right

Right direction vector (normalized).

◆ rotation_smoothing

float Camera::rotation_smoothing

Interpolation factor for rotation.

◆ sensitivity

float Camera::sensitivity

Mouse sensitivity factor.

◆ smoothed_x

float Camera::smoothed_x

Input smoothing state X.

◆ smoothed_y

float Camera::smoothed_y

Input smoothing state Y.

◆ up

vec3 Camera::up

Up direction vector (normalized).

◆ velocity

float Camera::velocity

Maximum movement speed.

◆ velocity_current

vec3 Camera::velocity_current

Current 3D velocity vector (momentum).

◆ world_up

vec3 Camera::world_up

World's up direction (usually 0,1,0).

◆ yaw

float Camera::yaw

Horizontal rotation in degrees.

◆ yaw_target

float Camera::yaw_target

Target yaw to lerp towards.

◆ zoom

float Camera::zoom

Current Field of View (FOV) in degrees.


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