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

Make an item walk / run to its destination on the current location's floor. More...

#include <walk.h>

Inheritance diagram for Stark::Walk:
Collaboration diagram for Stark::Walk:

List of all members.

Public Member Functions

 Walk (Resources::FloorPositionedItem *item)
virtual ~Walk ()
void start () override
 Initiate the movement.
void stop () override
 Stop / abort the movement.
void onGameLoop () override
 Called once per game loop.
bool hasReachedDestination () const override
 Has the movement reached its destination successfully?
uint32 getType () const override
 Obtain the effective movement type.
void saveLoad (ResourceSerializer *serializer) override
 Persist / restore the state of the movement so it can be resumed using 'start'.
void setDestination (const Math::Vector3d &destination)
 Set the destination.
void changeDestination (const Math::Vector3d &destination)
 Change the destination and recompute the path.
void setRunning ()
 Set the running flag.

Private Member Functions

float computeDistancePerGameLoop () const
float getAngularSpeed () const
void changeItemAnim ()
void updatePath () const

Private Attributes

Resources::FloorPositionedItem_item3D
StringPullingPath_path
Math::Vector3d _destination
bool _running
bool _reachedDestination
TurnDirection _turnDirection

Detailed Description

Make an item walk / run to its destination on the current location's floor.

Definition at line 40 of file walk.h.


Constructor & Destructor Documentation

Stark::Walk::Walk ( Resources::FloorPositionedItem item  ) 

Definition at line 40 of file walk.cpp.

Stark::Walk::~Walk (  )  [virtual]

Definition at line 49 of file walk.cpp.


Member Function Documentation

void Stark::Walk::changeDestination ( const Math::Vector3d destination  ) 

Change the destination and recompute the path.

Definition at line 220 of file walk.cpp.

void Stark::Walk::changeItemAnim (  )  [private]

Definition at line 208 of file walk.cpp.

float Stark::Walk::computeDistancePerGameLoop (  )  const [private]

Definition at line 192 of file walk.cpp.

float Stark::Walk::getAngularSpeed (  )  const [private]

Definition at line 188 of file walk.cpp.

uint32 Stark::Walk::getType (  )  const [override, virtual]

Obtain the effective movement type.

Implements Stark::Movement.

Definition at line 229 of file walk.cpp.

bool Stark::Walk::hasReachedDestination (  )  const [override, virtual]

Has the movement reached its destination successfully?

Reimplemented from Stark::Movement.

Definition at line 225 of file walk.cpp.

void Stark::Walk::onGameLoop (  )  [override, virtual]

Called once per game loop.

Implements Stark::Movement.

Definition at line 110 of file walk.cpp.

void Stark::Walk::saveLoad ( ResourceSerializer serializer  )  [override, virtual]

Persist / restore the state of the movement so it can be resumed using 'start'.

Implements Stark::Movement.

Definition at line 233 of file walk.cpp.

void Stark::Walk::setDestination ( const Math::Vector3d destination  ) 

Set the destination.

Definition at line 199 of file walk.cpp.

void Stark::Walk::setRunning (  ) 

Set the running flag.

Definition at line 203 of file walk.cpp.

void Stark::Walk::start (  )  [override, virtual]

Initiate the movement.

Reimplemented from Stark::Movement.

Definition at line 53 of file walk.cpp.

void Stark::Walk::stop (  )  [override, virtual]

Stop / abort the movement.

Reimplemented from Stark::Movement.

Definition at line 63 of file walk.cpp.

void Stark::Walk::updatePath (  )  const [private]

Definition at line 69 of file walk.cpp.


Member Data Documentation

Definition at line 72 of file walk.h.

Definition at line 69 of file walk.h.

Definition at line 70 of file walk.h.

Definition at line 75 of file walk.h.

bool Stark::Walk::_running [private]

Definition at line 74 of file walk.h.

Definition at line 76 of file walk.h.


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


Generated on Sat Jan 19 2019 05:07:29 for ResidualVM by doxygen 1.7.1
curved edge   curved edge