CSCI3081W Drone Delivery System
IStrategy.h
1 #ifndef I_STRATEGY_H_
2 #define I_STRATEGY_H_
3 
4 #include "IEntity.h"
5 
11 class IStrategy {
12  public:
16  virtual ~IStrategy() {}
17 
24  virtual void move(IEntity* entity, double dt) = 0;
25 
31  virtual bool isCompleted() = 0;
32 
41  virtual double currentPathDistance(Vector3 startPosition) { return 0; }
42 
43 
52  virtual double totalPathDistance(Vector3 startPosition) { return 0; }
53 };
54 
55 #endif
Represents an entity in a physical system.
Definition: IEntity.h:22
Strategy interface.
Definition: IStrategy.h:11
virtual double totalPathDistance(Vector3 startPosition)
Get the total distance of the entire path starting from startPosition and index 0.
Definition: IStrategy.h:52
virtual void move(IEntity *entity, double dt)=0
Move toward next position.
virtual ~IStrategy()
Destructor.
Definition: IStrategy.h:16
virtual double currentPathDistance(Vector3 startPosition)
Get the current distance of the entire path starting from startPosition and the current index.
Definition: IStrategy.h:41
virtual bool isCompleted()=0
Check if the trip is completed.
a simple class used for vector math, most function are self explanatory
Definition: vector3.h:12