-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathentity.cpp
More file actions
32 lines (29 loc) · 836 Bytes
/
entity.cpp
File metadata and controls
32 lines (29 loc) · 836 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
/***********************************************************************
* C++ File:
* Entity
* Author:
* Austin Jesperson and Emilio Ordonez
* Summary:
* An Entity in our simulation.
************************************************************************/
#include "entity.h"
#include <random>
/************************************
* ENTITY : CONSTRUCTOR
************************************/
Entity::Entity()
{
angle = 0.0;
radius = 0.0;
rotationSpeed = random(-.03, .03);
position.setMeters(0.0, 0.0);
velocity.setMeters(0.0, 0.0);
}
/**************************************
* ENTITY : INITIAL PLACEMENT
***************************************/
void Entity::initialPlacement(double x, double y, double vx, double vy)
{
position.setMeters(x, y);
velocity.setMeters(vx, vy);
}