Kaim::MoveToTarget Class Reference

Kaim::MoveToTarget Class Reference

#include <movetotarget.h>

Class Description

Static functions to compute new position, rotation that are closer to a target while respecting a maxMove.

Static Public Member Functions

static KyFloat32 Scalar (KyFloat32 target, KyFloat32 maxMove, KyFloat32 input)
 
static Vec2f Dir2d (const Vec2f &target, KyFloat32 maxAngleInRadian, const Vec2f &input)
 

Member Function Documentation

Vec2f Kaim::MoveToTarget::Dir2d ( const Vec2f target,
KyFloat32  maxAngleInRadian,
const Vec2f input 
)
static
input //
+^ //
/ \ maxAngleInRadian //
/ v //
+------+ result //
\ //
\ //
+ target //

pre-condition: maxAngleInRadian < PI/2

KyFloat32 Kaim::MoveToTarget::Scalar ( KyFloat32  target,
KyFloat32  maxMove,
KyFloat32  input 
)
static
<-maxMove-> target <-maxMove->
-------+-------->+--------------------+-->+<---+-------------------+<--------+--
input result input input result input

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