Created
March 5, 2019 21:08
-
-
Save Ben1980/86ac75a645d09fe65a6b815170e2b2b1 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Particle { | |
public: | |
Particle(); | |
Particle(double mass, const Vector2D &acceleration, const Vector2D &velocity, const Vector2D &position); | |
bool operator==(const Particle &rhs) const; | |
bool operator!=(const Particle &rhs) const; | |
double getMass() const; | |
const Vector2D &getAcceleration() const; | |
void setAcceleration(const Vector2D &acceleration); | |
const Vector2D &getVelocity() const; | |
void setVelocity(const Vector2D &velocity); | |
const Vector2D &getPosition() const; | |
void setPosition(const Vector2D &position); | |
private: | |
static size_t IDCounter; | |
size_t id; | |
double mass; | |
Vector2D acceleration; | |
Vector2D velocity; | |
Vector2D position; | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment