CSCI3081W Drone Delivery System
Public Member Functions | List of all members
IStrategy Class Referenceabstract

Strategy interface. More...

#include <IStrategy.h>

Inheritance diagram for IStrategy:
Inheritance graph
[legend]

Public Member Functions

virtual ~IStrategy ()
 Destructor.
 
virtual void move (IEntity *entity, double dt)=0
 Move toward next position. More...
 
virtual bool isCompleted ()=0
 Check if the trip is completed. More...
 
virtual double currentPathDistance (Vector3 startPosition)
 Get the current distance of the entire path starting from startPosition and the current index. More...
 
virtual double totalPathDistance (Vector3 startPosition)
 Get the total distance of the entire path starting from startPosition and index 0. More...
 

Detailed Description

Strategy interface.

Member Function Documentation

◆ currentPathDistance()

virtual double IStrategy::currentPathDistance ( Vector3  startPosition)
inlinevirtual

Get the current distance of the entire path starting from startPosition and the current index.

Returns
double of current distance to final destination of this path starting from startPosition and the current index

Reimplemented in PathStrategy, and ICelebrationDecorator.

◆ isCompleted()

virtual bool IStrategy::isCompleted ( )
pure virtual

Check if the trip is completed.

Returns
True if complete, false if not complete

Implemented in PathStrategy, and ICelebrationDecorator.

◆ move()

virtual void IStrategy::move ( IEntity entity,
double  dt 
)
pure virtual

Move toward next position.

Parameters
entityEntity to move
dtDelta Time

Implemented in PathStrategy, and ICelebrationDecorator.

◆ totalPathDistance()

virtual double IStrategy::totalPathDistance ( Vector3  startPosition)
inlinevirtual

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 in PathStrategy, and ICelebrationDecorator.


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