CSCI3081W Drone Delivery System
|
Represents a Recharge Station in a physical system. More...
#include <RechargeStation.h>
Public Member Functions | |
RechargeStation (const JsonObject &obj) | |
Construct a new Recharge Station object. More... | |
RechargeStation (const RechargeStation &rechargeStation)=delete | |
Removing copy constructor so that the recharge station cannot be copied. | |
RechargeStation & | operator= (const RechargeStation &rechargeStation)=delete |
Removing assignment operator so that the recharge station cannot be copied. | |
void | update (double dt) |
Update the state of the recharge station. More... | |
![]() | |
IEntity () | |
Constructor that assigns a unique ID to the entity. | |
IEntity (const JsonObject &details) | |
Constructor with JsonObject details to define the entity. More... | |
virtual | ~IEntity () |
Virtual destructor for IEntity. | |
virtual void | linkModel (SimulationModel *model) |
Links this entity to a simulation model, giving it access to the model's public variables and functions. More... | |
virtual int | getId () const |
Gets the ID of the entity. More... | |
virtual Vector3 | getPosition () const |
Gets the position of the entity. More... | |
virtual Vector3 | getDirection () const |
Gets the direction of the entity. More... | |
virtual const JsonObject & | getDetails () const |
Gets the details of the entity. More... | |
virtual std::string | getColor () const |
Gets the color of the entity. More... | |
virtual std::string | getName () const |
Gets the name of the entity. More... | |
virtual double | getSpeed () const |
Gets the speed of the entity. More... | |
virtual void | setPosition (Vector3 pos_) |
Sets the position of the entity. More... | |
virtual void | setDirection (Vector3 dir_) |
Set the direction of the entity. More... | |
virtual void | setColor (std::string col_) |
Sets the color of the entity. More... | |
virtual void | rotate (double angle) |
Rotate the entity around y axis. More... | |
virtual SimulationModel * | getModel () const |
![]() | |
void | addObserver (const IObserver *o) |
adds an observer to the simulation More... | |
void | removeObserver (const IObserver *o) |
removes an observer in the simulation More... | |
void | notifyObservers (const std::string &message) const |
notifies all observers with a specific message More... | |
Additional Inherited Members | |
![]() | |
SimulationModel * | model = nullptr |
int | id = -1 |
JsonObject | details |
Vector3 | position |
Vector3 | direction |
std::string | color |
std::string | name |
double | speed = 0 |
Represents a Recharge Station in a physical system.
Recharge Station is a place where drones can recharge their batteries
RechargeStation::RechargeStation | ( | const JsonObject & | obj | ) |
Construct a new Recharge Station object.
obj | JSON object containing the recharge station data |
|
virtual |