26 const std::array<double, 3>& position,
27 const std::array<double, 3>& velocity,
28 const std::array<double, 3>& acceleration,
29 const double radius,
const double mass,
30 const std::array<int, 3>& color,
31 const std::string& name =
""
68 void setPosition(
const std::array<double, 3>& position);
103 double getVX()
const;
110 double getVY()
const;
117 double getVZ()
const;
124 void setVelocity(
const std::array<double, 3>& velocity);
131 void setVX(
double vx);
138 void setVY(
double vy);
145 void setVZ(
double vz);
166 void setAX(
double ax);
173 void setAY(
double ay);
180 void setAZ(
double az);
215 std::array<int, 3>
getColor()
const;
222 void update(
double deltaTime);
236 const std::deque<std::array<double, 3>>&
getTrail()
const;
void setPosition(const std::array< double, 3 > &position)
Sets the position.
Definition particle.cpp:38
void update(double deltaTime)
Updates the particle.
Definition particle.cpp:68
double getRadius() const
Gets the radius.
Definition particle.cpp:60
double getX() const
Gets the x coordinate of the posision.
Definition particle.cpp:34
double getY() const
Gets the y coordinate of the posision.
Definition particle.cpp:35
std::array< double, 3 > m_position
Particle position (in m).
Definition particle.h:239
Particle(const std::array< double, 3 > &position, const std::array< double, 3 > &velocity, const std::array< double, 3 > &acceleration, const double radius, const double mass, const std::array< int, 3 > &color, const std::string &name="")
Initialize particle.
Definition particle.cpp:3
std::array< double, 3 > getAcceleration() const
Gets the acceleration.
Definition particle.cpp:53
void setAY(double ay)
Sets the y coordinate of the acceleration.
Definition particle.cpp:57
void setY(double y)
Sets the y coordinate of the position.
Definition particle.cpp:40
void setVZ(double vz)
Sets the z coordinate of the velocity.
Definition particle.cpp:51
void setVY(double vy)
Sets the y coordinate of the velocity.
Definition particle.cpp:50
std::array< double, 3 > m_velocity
Particle velocity (in m/s).
Definition particle.h:240
double getZ() const
Gets the y coordinate of the posision.
Definition particle.cpp:36
std::array< int, 3 > getColor() const
Gets the color.
Definition particle.cpp:66
void setMass(double mass)
Sets the mass.
Definition particle.cpp:64
double getVX() const
Gets the x coordinate of the velocity.
Definition particle.cpp:44
double m_radius
Particle radius (in m).
Definition particle.h:242
void setVX(double vx)
Sets the x coordinate of the velocity.
Definition particle.cpp:49
void setAcceleration(const std::array< double, 3 > &acceleration)
Sets the acceleration.
Definition particle.cpp:55
void setAX(double ax)
Sets the x coordinate of the acceleration.
Definition particle.cpp:56
void setAZ(double az)
Sets the z coordinate of the acceleration.
Definition particle.cpp:58
double getVZ() const
Gets the z coordinate of the velocity.
Definition particle.cpp:46
std::array< double, 3 > getVelocity() const
Gets the velocity.
Definition particle.cpp:43
const std::deque< std::array< double, 3 > > & getTrail() const
Gets the trail.
Definition particle.cpp:82
void setRadius(double radius)
Sets the radius.
Definition particle.cpp:61
void setVelocity(const std::array< double, 3 > &velocity)
Sets the velocity.
Definition particle.cpp:48
void setZ(double z)
Sets the z coordinate of the position.
Definition particle.cpp:41
void setX(double x)
Sets the x coordinate of the position.
Definition particle.cpp:39
std::array< double, 3 > m_acceleration
Particle acceleration (in m/s²).
Definition particle.h:241
double getMass() const
Gets the mass.
Definition particle.cpp:63
double getVY() const
Gets the y coordinate of the velocity.
Definition particle.cpp:45
std::deque< std::array< double, 3 > > m_trail
trail particle.
Definition particle.h:246
const std::string m_name
particle name.
Definition particle.h:250
std::array< double, 3 > getPosition() const
Gets the position.
Definition particle.cpp:33
std::array< int, 3 > m_color
Particle colors.
Definition particle.h:244
static constexpr size_t m_maxTrailLength
max trail particle length.
Definition particle.h:247
double m_mass
Particle mass (in kg).
Definition particle.h:243
void addTrailPoint(const std::array< double, 3 > &point)
Adds a trail point.
Definition particle.cpp:76