1 #ifndef PATH_STRATEGY_H_
2 #define PATH_STRATEGY_H_
13 std::vector<Vector3> path;
Represents an entity in a physical system.
Definition: IEntity.h:22
Strategy interface.
Definition: IStrategy.h:11
this class inhertis from the IStrategy class and is represents a movement strategy where the entity s...
Definition: PathStrategy.h:11
double totalPathDistance(Vector3 startPosition)
Get the total distance of the entire path starting from startPosition and index 0.
virtual void move(IEntity *entity, double dt)
Move toward next position in the path.
PathStrategy(std::vector< Vector3 > path={})
Construct a new PathStrategy Strategy object.
double currentPathDistance(Vector3 startPosition)
Get the total distance of the entire path starting from startPosition and the current index.
virtual bool isCompleted()
Check if the trip is completed by seeing if index has reached the end of the path.
a simple class used for vector math, most function are self explanatory
Definition: vector3.h:12