ScummVM API documentation
Stark::Turn Class Reference

#include <turn.h>

Inheritance diagram for Stark::Turn:
Stark::Movement

Public Member Functions

 Turn (Resources::FloorPositionedItem *item)
 
void onGameLoop () override
 
uint32 getType () const override
 
void saveLoad (ResourceSerializer *serializer) override
 
void setTargetDirection (const Math::Vector3d &direction)
 
void setSpeed (float speed)
 
- Public Member Functions inherited from Stark::Movement
 Movement (Resources::ItemVisual *item)
 
virtual void start ()
 
virtual void stop (bool force=false)
 
bool hasEnded () const
 
virtual bool hasReachedDestination () const
 

Additional Inherited Members

- Public Types inherited from Stark::Movement
enum  MovementType { kTypeWalk = 1, kTypeFollowPath = 2, kTypeFollowPathLight = 3, kTypeTurn = 4 }
 
- Static Public Member Functions inherited from Stark::Movement
static Movementconstruct (uint32 type, Resources::ItemVisual *item)
 
- Protected Types inherited from Stark::Movement
enum  TurnDirection { kTurnNone, kTurnLeft, kTurnRight }
 
- Protected Member Functions inherited from Stark::Movement
float computeAngleBetweenVectorsXYPlane (const Math::Vector3d &v1, const Math::Vector3d &v2) const
 
- Protected Attributes inherited from Stark::Movement
const float _defaultTurnAngleSpeed
 
bool _ended
 
Resources::ItemVisual_item
 

Detailed Description

Make an item turn on itself towards a target direction

Member Function Documentation

◆ onGameLoop()

void Stark::Turn::onGameLoop ( )
overridevirtual

Called once per game loop

Implements Stark::Movement.

◆ getType()

uint32 Stark::Turn::getType ( ) const
overridevirtual

Obtain the effective movement type

Implements Stark::Movement.

◆ saveLoad()

void Stark::Turn::saveLoad ( ResourceSerializer serializer)
overridevirtual

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

Implements Stark::Movement.

◆ setTargetDirection()

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

Set the direction to turn towards

◆ setSpeed()

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

Override the default rotation speed


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