CSCI3081W Drone Delivery System
Public Member Functions | List of all members
AstarStrategy Class Reference

this class inhertis from the PathStrategy class and is responsible for generating the astar path that the drone will take. More...

#include <AstarStrategy.h>

Inheritance diagram for AstarStrategy:
Inheritance graph
[legend]
Collaboration diagram for AstarStrategy:
Collaboration graph
[legend]

Public Member Functions

 AstarStrategy (Vector3 position, Vector3 destination, const routing::Graph *graph)
 Construct a new Astar Strategy object. More...
 
- Public Member Functions inherited from PathStrategy
 PathStrategy (std::vector< Vector3 > path={})
 Construct a new PathStrategy Strategy object. More...
 
virtual void move (IEntity *entity, double dt)
 Move toward next position in the path. More...
 
virtual bool isCompleted ()
 Check if the trip is completed by seeing if index has reached the end of the path. More...
 
double currentPathDistance (Vector3 startPosition)
 Get the total distance of the entire path starting from startPosition and the current index. More...
 
double totalPathDistance (Vector3 startPosition)
 Get the total distance of the entire path starting from startPosition and index 0. More...
 
- Public Member Functions inherited from IStrategy
virtual ~IStrategy ()
 Destructor.
 

Additional Inherited Members

- Protected Attributes inherited from PathStrategy
std::vector< Vector3path
 
int index
 

Detailed Description

this class inhertis from the PathStrategy class and is responsible for generating the astar path that the drone will take.

Constructor & Destructor Documentation

◆ AstarStrategy()

AstarStrategy::AstarStrategy ( Vector3  position,
Vector3  destination,
const routing::Graph graph 
)

Construct a new Astar Strategy object.

Parameters
positionCurrent position
destinationEnd destination
graphGraph/Nodes of the map

The documentation for this class was generated from the following file: