CSCI 3081 - Drone Delivery System
entity_base.h
Go to the documentation of this file.
1 
4 #ifndef ENTITY_BASE_H_
5 #define ENTITY_BASE_H_
6 
7 /*******************************************************************************
8  * Includes
9  ******************************************************************************/
10 #include <EntityProject/facade/delivery_system.h>
11 #include <vector>
12 
13 namespace csci3081 {
14 
15 /*******************************************************************************
16  * Class Definitions
17  ******************************************************************************/
27 class EntityBase : public IEntity {
28  public:
29  virtual ~EntityBase() {}
30  const picojson::object& GetDetails();
35  int GetId() const;
36 
41  const std::string& GetName();
42 
47  const std::vector<float>& GetPosition() const;
48 
53  const std::vector<float>& GetDirection() const;
54 
59  float GetRadius() const;
60 
65  int GetVersion() const;
66 
71  bool IsDynamic() const;
72 
76  float DistanceBetween(IEntity* another);
77 
83  bool IsWithin(IEntity* another);
84 
89  std::string GetType();
90 
91  protected:
92  std::string name;
93  int ID;
94  std::vector<float> position;
95  std::vector<float> direction;
96  bool dynamic;
97  int version;
98  float radius;
99  std::string type;
100  picojson::object details;
101 };
102 
103 } // namespace csci3081
104 
105 
106 #endif // ENTITY_BASE_H_
bool IsWithin(IEntity *another)
Definition: entity_base.cc:44
const picojson::object & GetDetails()
Definition: entity_base.cc:10
int GetVersion() const
Definition: entity_base.cc:30
const std::string & GetName()
Definition: entity_base.cc:14
Definition: asubject.cc:3
int GetId() const
Definition: entity_base.cc:6
bool IsDynamic() const
Definition: entity_base.cc:34
The base class for creating entities.
Definition: entity_base.h:27
A movable object in a scene. Entities have position, direction and size.
Definition: entity.h:15
float GetRadius() const
Definition: entity_base.cc:26
const std::vector< float > & GetDirection() const
Definition: entity_base.cc:22
float DistanceBetween(IEntity *another)
Definition: entity_base.cc:38
std::string GetType()
Definition: entity_base.cc:51
const std::vector< float > & GetPosition() const
Definition: entity_base.cc:18