YourGameLib
Loading...
Searching...
No Matches
Classes | Public Types | Public Member Functions | List of all members
yourgame::util::Motion Class Reference

#include <motion.h>

Public Types

enum class  FlowType { ONCE , REPEAT , PINGPONG }
 
enum class  SegmentEase {
  NONE , SQUARE , SQUAREDOWN , CUBE ,
  CUBEDOWN , SINE , SINEDOWN , SMOOTH ,
  SMOOTH2
}
 

Public Member Functions

 Motion (FlowType flowType)
 
MotionaddIdle (float dt, float val)
 
MotionaddRamp (float dt, float val0, float val1, SegmentEase ease)
 
void tick (double dt)
 
float val ()
 
void pause (bool pause)
 
void restart ()
 
void setDirection (bool forward)
 
bool isFinished ()
 
bool isPaused ()
 
bool getDirection ()
 

Member Enumeration Documentation

◆ FlowType

Enumerator
ONCE 
REPEAT 
PINGPONG 

◆ SegmentEase

Enumerator
NONE 
SQUARE 
SQUAREDOWN 
CUBE 
CUBEDOWN 
SINE 
SINEDOWN 
SMOOTH 
SMOOTH2 

Constructor & Destructor Documentation

◆ Motion()

yourgame::util::Motion::Motion ( FlowType  flowType)

Member Function Documentation

◆ addIdle()

Motion & yourgame::util::Motion::addIdle ( float  dt,
float  val 
)

◆ addRamp()

Motion & yourgame::util::Motion::addRamp ( float  dt,
float  val0,
float  val1,
SegmentEase  ease 
)

◆ getDirection()

bool yourgame::util::Motion::getDirection ( )

◆ isFinished()

bool yourgame::util::Motion::isFinished ( )

◆ isPaused()

bool yourgame::util::Motion::isPaused ( )

◆ pause()

void yourgame::util::Motion::pause ( bool  pause)

◆ restart()

void yourgame::util::Motion::restart ( )

◆ setDirection()

void yourgame::util::Motion::setDirection ( bool  forward)

◆ tick()

void yourgame::util::Motion::tick ( double  dt)

◆ val()

float yourgame::util::Motion::val ( )

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