CSCI 3081 - Drone Delivery System
|
The base class for creating entities. More...
#include <entity_base.h>
Public Member Functions | |
const picojson::object & | GetDetails () |
int | GetId () const |
const std::string & | GetName () |
const std::vector< float > & | GetPosition () const |
const std::vector< float > & | GetDirection () const |
float | GetRadius () const |
int | GetVersion () const |
bool | IsDynamic () const |
float | DistanceBetween (IEntity *another) |
bool | IsWithin (IEntity *another) |
std::string | GetType () |
Public Member Functions inherited from entity_project::IEntity | |
virtual | ~IEntity () |
The destructor. | |
Protected Attributes | |
std::string | name |
int | ID |
std::vector< float > | position |
std::vector< float > | direction |
bool | dynamic |
int | version |
float | radius |
std::string | type |
picojson::object | details |
The base class for creating entities.
This class can be used as the base for all entities in the delivery system. The overall design is up to you (the student), but all entities must implement the IEntity interface.
See the documentation for IEntity for more information
float csci3081::EntityBase::DistanceBetween | ( | IEntity * | another | ) |
Return the distance between the IEntity objects
|
virtual |
Returns the entity's details. The returned picojson::object should be a copy of the json that was passed in when the entity was created. Details are also used to send additional information to other subsystems (e.g. mesh, scale, rotation, etc...).
Implements entity_project::IEntity.
|
virtual |
Return the direction of the drone param [out]: direction of the drone as vector of float
Implements entity_project::IEntity.
|
virtual |
Return the unique ID of the drone param [out]: ID of the drone
Implements entity_project::IEntity.
|
virtual |
Return the name of the drone param [out]: name of the drone
Implements entity_project::IEntity.
|
virtual |
Return the position of the drone param [out]: position of the drone as vector of float
Implements entity_project::IEntity.
|
virtual |
Return the radius of the drone param [out]: radius of the drone as vector of float
Implements entity_project::IEntity.
std::string csci3081::EntityBase::GetType | ( | ) |
Return std::string type of the Entity object, such as "carrier" and "customer"
|
virtual |
Return the version of the drone param [out]: version of the drone as vector of float
Implements entity_project::IEntity.
|
virtual |
Return the dynamic of the drone param [out]: dynamic of the drone as vector of float
Implements entity_project::IEntity.
bool csci3081::EntityBase::IsWithin | ( | IEntity * | another | ) |
Return true if the object is within radius of the IEntity object passed in the argument; Return false otherwise