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

Make an item turn on itself towards a target direction. More...

#include <turn.h>

Inheritance diagram for Stark::Turn:
Collaboration diagram for Stark::Turn:

List of all members.

Public Member Functions

 Turn (Resources::FloorPositionedItem *item)
virtual ~Turn ()
void onGameLoop () override
 Called once per game loop.
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 setTargetDirection (const Math::Vector3d &direction)
 Set the direction to turn towards.
void setSpeed (float speed)
 Override the default rotation speed.

Private Member Functions

float getAngularSpeed () const

Private Attributes

Resources::FloorPositionedItem_item3D
Math::Vector3d _targetDirection
float _turnSpeed

Detailed Description

Make an item turn on itself towards a target direction.

Definition at line 37 of file turn.h.


Constructor & Destructor Documentation

Stark::Turn::Turn ( Resources::FloorPositionedItem item  ) 

Definition at line 36 of file turn.cpp.

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

Definition at line 42 of file turn.cpp.


Member Function Documentation

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

Definition at line 84 of file turn.cpp.

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

Obtain the effective movement type.

Implements Stark::Movement.

Definition at line 96 of file turn.cpp.

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

Called once per game loop.

Implements Stark::Movement.

Definition at line 45 of file turn.cpp.

void Stark::Turn::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 100 of file turn.cpp.

void Stark::Turn::setSpeed ( float  speed  ) 

Override the default rotation speed.

Definition at line 92 of file turn.cpp.

void Stark::Turn::setTargetDirection ( const Math::Vector3d direction  ) 

Set the direction to turn towards.

Definition at line 88 of file turn.cpp.


Member Data Documentation

Definition at line 56 of file turn.h.

Definition at line 57 of file turn.h.

float Stark::Turn::_turnSpeed [private]

Definition at line 58 of file turn.h.


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


Generated on Sat Mar 16 2019 05:06:53 for ResidualVM by doxygen 1.7.1
curved edge   curved edge