diff options
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() } |
