this class inhertis from the IStrategy class and is represents a movement strategy where the entity simply moves along the given path
More...
#include <PathStrategy.h>
|
std::vector< Vector3 > | path |
|
int | index |
|
this class inhertis from the IStrategy class and is represents a movement strategy where the entity simply moves along the given path
◆ PathStrategy()
PathStrategy::PathStrategy |
( |
std::vector< Vector3 > |
path = {} | ) |
|
◆ currentPathDistance()
double PathStrategy::currentPathDistance |
( |
Vector3 |
startPosition | ) |
|
|
virtual |
Get the total distance of the entire path starting from startPosition and the current index.
- Returns
- float of total distance to final destination of this path starting from startPosition and the current index
Reimplemented from IStrategy.
◆ isCompleted()
virtual bool PathStrategy::isCompleted |
( |
| ) |
|
|
virtual |
Check if the trip is completed by seeing if index has reached the end of the path.
- Returns
- True if complete, false if not complete
Implements IStrategy.
◆ move()
virtual void PathStrategy::move |
( |
IEntity * |
entity, |
|
|
double |
dt |
|
) |
| |
|
virtual |
Move toward next position in the path.
- Parameters
-
entity | Entity to move |
dt | Delta Time |
Implements IStrategy.
◆ totalPathDistance()
double PathStrategy::totalPathDistance |
( |
Vector3 |
startPosition | ) |
|
|
virtual |
Get the total distance of the entire path starting from startPosition and index 0.
- Returns
- double of total distance to final destination of this path starting from startPosition
Reimplemented from IStrategy.
The documentation for this class was generated from the following file:
- /home/spring-2025/drone_simulation/service/include/simulationmodel/strategy/PathStrategy.h