You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
32 lines
928 B
32 lines
928 B
#ifndef RENDERER_H |
|
#define RENDERER_H |
|
|
|
#include "simulation.h" |
|
#include "raylib.h" |
|
|
|
// Rendering state |
|
struct RenderState { |
|
Camera3D camera; |
|
double distance_scale; // Scale factor for distances |
|
double size_scale; // Scale factor for body sizes |
|
bool show_info; // Display simulation info |
|
}; |
|
|
|
// Renderer initialization and cleanup |
|
void init_renderer(int width, int height, const char* title); |
|
void close_renderer(); |
|
|
|
// Camera setup and control |
|
void setup_camera(RenderState* render_state); |
|
void update_camera(RenderState* render_state); |
|
|
|
// Rendering functions |
|
void render_body(CelestialBody* body, RenderState* render_state); |
|
void render_simulation(SimulationState* sim, RenderState* render_state); |
|
void render_info(SimulationState* sim, const char* config_name); |
|
|
|
// Scaling functions |
|
Vector3 scale_position(Vec3 pos, double scale); |
|
float scale_radius(double radius, double scale); |
|
|
|
#endif
|
|
|