summaryrefslogtreecommitdiff
path: root/src/mass.rs
diff options
context:
space:
mode:
authortom barrett <spalf0@gmail.com>2018-02-27 06:59:58 -0600
committertom barrett <spalf0@gmail.com>2018-02-27 06:59:58 -0600
commitb5896e2d7597e42818a47710da22098d178bf8f6 (patch)
treed48107628b0c10fc41493e35f8ba8f3039c3b9bc /src/mass.rs
parent87346ea9b91d441e92c476785c2cb979f9a23bf5 (diff)
-now use velocity and position vector, astroids are now randomly populated
Diffstat (limited to 'src/mass.rs')
-rw-r--r--src/mass.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/mass.rs b/src/mass.rs
index 71723cd..d91b292 100644
--- a/src/mass.rs
+++ b/src/mass.rs
@@ -1,11 +1,11 @@
use downcast::Any;
pub trait Mass : Any {
- fn new(name : &str, location : (f64, f64, f64)) -> Self where Self: Sized;
fn name(&self) -> &String;
- fn location(&self) -> (f64, f64, f64);
- fn set_location(&mut self, location : (f64, f64, f64));
+ fn position(&self) -> (f64, f64, f64);
fn serialize(&self) -> String;
+ fn process(&mut self);
+ fn give_acceleration(&mut self, acceleration : (f64, f64, f64));
}
#[derive(Serialize, Deserialize, Debug)]