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

State container for the N-body simulation. More...

#include <nbody.h>

Collaboration diagram for NBodySim:
[legend]

Data Fields

NBodyParticle bodies [NBODY_MAX_BODIES]
 
int body_count
 
float gravity
 
float accumulator
 
float time_scale
 
float target_time_scale
 
float initial_energy
 
float sim_time
 
bool paused
 
NBodyImpact impacts [NBODY_MAX_BODIES]
 

Detailed Description

State container for the N-body simulation.

Field Documentation

◆ accumulator

float NBodySim::accumulator

Physics timestep accumulator.

◆ bodies

NBodyParticle NBodySim::bodies[NBODY_MAX_BODIES]

Array of bodies.

◆ body_count

int NBodySim::body_count

Number of active bodies.

◆ gravity

float NBodySim::gravity

Gravitational constant G.

◆ impacts

NBodyImpact NBodySim::impacts[NBODY_MAX_BODIES]

Per-body impacts.

◆ initial_energy

float NBodySim::initial_energy

Total energy at init (E₀ reference).

◆ paused

bool NBodySim::paused

If true, simulation does not advance.

◆ sim_time

float NBodySim::sim_time

Monotonic simulation clock (seconds).

◆ target_time_scale

float NBodySim::target_time_scale

Smooth-transition target.

◆ time_scale

float NBodySim::time_scale

Speed multiplier (1.0 = real-time).


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