ScummVM API documentation
Stark::StringPullingPath Class Reference

#include <stringpullingpath.h>

Public Member Functions

void addStep (const Math::Vector3d &position)
 
void reset ()
 
Math::Vector3d computeWalkTarget (const Math::Vector3d &fromPosition)
 
bool hasSteps () const
 

Detailed Description

Store a path and allow to walk along it smoothly

The base principle of the string pulling algorithm is to skip steps if it is possible to walk directly to a later step in straight line.

Member Function Documentation

◆ addStep()

void Stark::StringPullingPath::addStep ( const Math::Vector3d &  position)

Append a step to the path

◆ reset()

void Stark::StringPullingPath::reset ( )

Reset the steps, and the current target on the path

◆ computeWalkTarget()

Math::Vector3d Stark::StringPullingPath::computeWalkTarget ( const Math::Vector3d &  fromPosition)

Move the walk target forward according to the position

◆ hasSteps()

bool Stark::StringPullingPath::hasSteps ( ) const

Returns true if this path is not degenerated (empty or single point)


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