1#ifndef ASTEROIDS3D_SHIP_HPP
2#define ASTEROIDS3D_SHIP_HPP
Shared simulation constants, data types, and utility functions.
Mutable gameplay and movement state for a player ship.
glm::vec3 position
Current world-space position.
glm::vec3 rotation
Euler rotation in degrees.
glm::vec3 prev_position
Position from the previous simulation step.
float max_speed
Maximum controllable speed.
float camera_height
Third-person camera height.
int continuous_fire_timer
Timer controlling continuous fire.
int overheat_cooldown
Frames remaining in the overheat cooldown.
float pitch_speed_multiplier
Pitch rate relative to the yaw rate.
int burst_count
Shots already fired in the current burst.
float camera_distance
Third-person camera distance.
float min_speed
Minimum controllable speed.
glm::vec3 velocity
Current world-space velocity.
int explosion_timer
Remaining explosion animation frames.
int fire_cooldown
Frames remaining before the next shot is allowed.
bool overheated
Whether firing is disabled by overheating.
float current_speed
Current forward speed.
bool exploding
Whether the ship is currently exploding.
glm::vec3 forward() const
Returns the normalized world-space direction in which the ship points.
float turn_speed
Yaw rate in degrees per second.
int lives
Remaining lives.
bool visible
Whether the ship is rendered.