diff options
| author | Jon Santmyer <jon@jonsantmyer.com> | 2026-05-03 17:31:47 -0400 |
|---|---|---|
| committer | Jon Santmyer <jon@jonsantmyer.com> | 2026-05-03 17:31:47 -0400 |
| commit | 759d5d27c7773c7fe8b165ce08b57204db990b74 (patch) | |
| tree | b9fd06e7b76490ba15dd3a87d83253a7b0bd68cf /src/solar_system.rs | |
| parent | b14dd1c1f3e198137fa8b9e0c4f5e56949b11cd0 (diff) | |
| download | systemic4x-759d5d27c7773c7fe8b165ce08b57204db990b74.tar.gz systemic4x-759d5d27c7773c7fe8b165ce08b57204db990b74.tar.bz2 systemic4x-759d5d27c7773c7fe8b165ce08b57204db990b74.zip | |
move topbar ui rendering into it's own module
Diffstat (limited to 'src/solar_system.rs')
| -rw-r--r-- | src/solar_system.rs | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/src/solar_system.rs b/src/solar_system.rs index cf6a36a..df1d246 100644 --- a/src/solar_system.rs +++ b/src/solar_system.rs @@ -1,6 +1,6 @@ use serde::{Deserialize}; -use crate::{GameState, known_stars::{KNOWN_STARS, StarNotFoundError}, timeman::{Second, TimeMan}}; -use std::{cell::RefCell, error::Error, f64::consts::PI}; +use crate::{known_stars::*, timeman::Second}; +use std::error::Error; const GRAVITATIONAL_CONSTANT: f64 = 6.67408e-20; @@ -33,7 +33,6 @@ pub struct SerialOrbitalBody pub struct OrbitalBody { body: SerialOrbitalBody, - id: BodyId, position: Option<cgmath::Vector3<Kilometers>> } @@ -71,7 +70,6 @@ impl SolarSystem bodies.push(OrbitalBody { body: record, - id: bodies.len(), position: None }); } @@ -148,7 +146,6 @@ impl SolarSystem impl OrbitalBody { - pub fn id(&self) -> BodyId { self.id } pub fn name(&self) -> &String { &self.body.name } pub fn radius(&self) -> f32 { self.body.radius as f32 } pub fn position(&self) -> cgmath::Vector3<f64> { self.position.unwrap() } |
