27 double old_x = this->
x, old_y = this->
y;
29 this->
x = cos(theta)*old_x + sin(theta)*old_y;
30 this->
y = -sin(theta)*old_x + cos(theta)*old_y;
59 output <<
"POSITION: ";
60 output << entity_state.
position <<
" | ";
63 output <<
"VELOCITY: ";
64 output << entity_state.
velocity <<
" | ";
Entity state data structure.
double angular_velocity
Angular velocity in rad/s.
EntityState()
Construct a new Entity State object.
Vector2D velocity
Velocity in m/s.
Common constants and types for the data structures.
Data structure to hold a two dimensional vector.
double x
Public attributes.
double angular_position
Angular position in radinans.
Vector2D position
Position in meters.
#define PRINTING_DECIMAL_PRECISION
void rotate(double theta)
Perform a counter-clockwise rotation of the vector.
Vector2D(double x=0, double y=0)
Construct a new Vector2D object.
std::ostream & operator<<(std::ostream &output, const ReplacerConfigurer &repl_conf)
Data structure to hold the state of a entity in the simulation.
#define PRINTING_MIN_WIDTH
Printing output configuration constants.