Rev | Line | |
---|
[152] | 1 | package solarsim.common; |
---|
| 2 | |
---|
| 3 | /** |
---|
| 4 | * Clasa care modeleaza o particula. Este caracterizata de masa, vector pozitie si vector viteza. |
---|
| 5 | * @author Marius Ion |
---|
| 6 | */ |
---|
| 7 | public class Particle { |
---|
| 8 | |
---|
| 9 | double mass; |
---|
| 10 | Vector position; |
---|
| 11 | Vector velocity; |
---|
| 12 | |
---|
| 13 | public Particle() { |
---|
| 14 | } |
---|
| 15 | |
---|
| 16 | public Particle(double mass, Vector position, Vector velocity) { |
---|
| 17 | this.mass = mass; |
---|
| 18 | this.position = position; |
---|
| 19 | this.velocity = velocity; |
---|
| 20 | } |
---|
| 21 | |
---|
| 22 | public double getMass() { |
---|
| 23 | return mass; |
---|
| 24 | } |
---|
| 25 | |
---|
| 26 | public void setMass(double mass) { |
---|
| 27 | this.mass = mass; |
---|
| 28 | } |
---|
| 29 | |
---|
| 30 | public Vector getPosition() { |
---|
| 31 | return position; |
---|
| 32 | } |
---|
| 33 | |
---|
| 34 | public void setPosition(Vector position) { |
---|
| 35 | this.position = position; |
---|
| 36 | } |
---|
| 37 | |
---|
| 38 | public Vector getVelocity() { |
---|
| 39 | return velocity; |
---|
| 40 | } |
---|
| 41 | |
---|
| 42 | public void setVelocity(Vector velocity) { |
---|
| 43 | this.velocity = velocity; |
---|
| 44 | } |
---|
| 45 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.