ResidualVM logo ResidualVM website - Forums - Contact us BuildBot - Doxygen - Wiki curved edge

Stark::StringPullingPath Class Reference

Store a path and allow to walk along it smoothly. More...

#include <stringpullingpath.h>

Collaboration diagram for Stark::StringPullingPath:

List of all members.

Public Member Functions

 StringPullingPath ()
void addStep (const Math::Vector3d &position)
 Append a step to the path.
void reset ()
 Reset the steps, and the current target on the path.
Math::Vector3d computeWalkTarget (const Math::Vector3d &fromPosition)
 Move the walk target forward according to the position.
bool hasSteps () const
 Returns true if this path is not degenerated (empty or single point).

Private Attributes

Common::Array< Math::Vector3d_steps
uint32 _targetStep

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.

Definition at line 38 of file stringpullingpath.h.


Constructor & Destructor Documentation

Stark::StringPullingPath::StringPullingPath (  ) 

Definition at line 34 of file stringpullingpath.cpp.


Member Function Documentation

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

Append a step to the path.

Definition at line 38 of file stringpullingpath.cpp.

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

Move the walk target forward according to the position.

Definition at line 47 of file stringpullingpath.cpp.

bool Stark::StringPullingPath::hasSteps (  )  const

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

Definition at line 70 of file stringpullingpath.cpp.

void Stark::StringPullingPath::reset (  ) 

Reset the steps, and the current target on the path.

Definition at line 42 of file stringpullingpath.cpp.


Member Data Documentation

Definition at line 56 of file stringpullingpath.h.


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


Generated on Sat May 18 2019 05:07:16 for ResidualVM by doxygen 1.7.1
curved edge   curved edge