TrinityCore
Movement Namespace Reference

Classes

struct  AnimTierTransition
 
struct  CommonInitializer
 
class  counter
 
struct  FacingInfo
 
struct  FallInitializer
 
struct  Location
 
class  MoveSpline
 
class  MoveSplineFlag
 
class  MoveSplineInit
 
struct  MoveSplineInitArgs
 
struct  SpellEffectExtraData
 
class  Spline
 
class  SplineBase
 
class  TransportPathTransform
 

Typedefs

typedef counter< uint32, 0xFFFFFFFF > UInt32Counter
 
typedef std::vector< Vector3 > PointsArray
 

Enumerations

enum  MonsterMoveType { MONSTER_MOVE_NORMAL = 0 , MONSTER_MOVE_FACING_SPOT = 1 , MONSTER_MOVE_FACING_TARGET = 2 , MONSTER_MOVE_FACING_ANGLE = 3 }
 
enum  { minimal_duration = 1 }
 

Functions

uint32 SecToMS (float sec)
 
float MSToSec (uint32 ms)
 
float computeFallTime (float path_length, bool isSafeFall)
 
float computeFallElevation (float t_passed, bool isSafeFall, float start_velocity=0.0f)
 
TC_GAME_API std::string MovementFlags_ToString (uint32 flags)
 
TC_GAME_API std::string MovementFlagsExtra_ToString (uint32 flags)
 
template<class Flags , int N>
void PrintFlags (Flags t, char const *(&names)[N], std::string &str)
 
uint32 computeDuration (float length, float velocity)
 
UnitMoveType SelectSpeedType (uint32 moveFlags)
 
static const Matrix4 s_catmullRomCoeffs (-0.5f, 1.5f, -1.5f, 0.5f, 1.f, -2.5f, 2.f, -0.5f, -0.5f, 0.f, 0.5f, 0.f, 0.f, 1.f, 0.f, 0.f)
 
static const Matrix4 s_Bezier3Coeffs (-1.f, 3.f, -3.f, 1.f, 3.f, -6.f, 3.f, 0.f, -3.f, 3.f, 0.f, 0.f, 1.f, 0.f, 0.f, 0.f)
 
void C_Evaluate (Vector3 const *vertice, float t, Matrix4 const &matr, Vector3 &result)
 
void C_Evaluate_Derivative (Vector3 const *vertice, float t, Matrix4 const &matr, Vector3 &result)
 

Variables

float constexpr gravity = static_cast<float>(19.29110527038574)
 
TC_GAME_API UInt32Counter splineIdGen
 
float constexpr terminalVelocity = 60.148003f
 Velocity bounds that makes fall speed limited. More...
 
float constexpr terminalSafefallVelocity = 7.0f
 
float constexpr terminal_length = float(terminalVelocity * terminalVelocity) / (2.0f * gravity)
 
float constexpr terminal_safeFall_length = (terminalSafefallVelocity * terminalSafefallVelocity) / (2.0f * gravity)
 
float constexpr terminal_fallTime = float(terminalVelocity / gravity)
 
float constexpr terminal_safeFall_fallTime = float(terminalSafefallVelocity / gravity)
 
char const * MovementFlagNames []
 
char const * MovementFlagExtraNames []
 
char const * SplineFlagNames [32]
 

Typedef Documentation

◆ PointsArray

typedef std::vector<Vector3> Movement::PointsArray

Definition at line 33 of file MoveSplineInitArgs.h.

◆ UInt32Counter

typedef counter<uint32, 0xFFFFFFFF> Movement::UInt32Counter

Definition at line 77 of file MovementTypedefs.h.

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
minimal_duration 

Definition at line 132 of file MoveSpline.cpp.

◆ MonsterMoveType

Enumerator
MONSTER_MOVE_NORMAL 
MONSTER_MOVE_FACING_SPOT 
MONSTER_MOVE_FACING_TARGET 
MONSTER_MOVE_FACING_ANGLE 

Definition at line 34 of file MovementTypedefs.h.

Function Documentation

◆ C_Evaluate()

void Movement::C_Evaluate ( Vector3 const *  vertice,
float  t,
Matrix4 const &  matr,
Vector3 &  result 
)
inline

Definition at line 96 of file Spline.cpp.

+ Here is the caller graph for this function:

◆ C_Evaluate_Derivative()

void Movement::C_Evaluate_Derivative ( Vector3 const *  vertice,
float  t,
Matrix4 const &  matr,
Vector3 &  result 
)
inline

Definition at line 105 of file Spline.cpp.

+ Here is the caller graph for this function:

◆ computeDuration()

uint32 Movement::computeDuration ( float  length,
float  velocity 
)
inline

Definition at line 117 of file MoveSpline.cpp.

+ Here is the call graph for this function:

◆ computeFallElevation()

float Movement::computeFallElevation ( float  t_passed,
bool  isSafeFall,
float  start_velocity = 0.0f 
)

Definition at line 59 of file MovementUtil.cpp.

+ Here is the caller graph for this function:

◆ computeFallTime()

float Movement::computeFallTime ( float  path_length,
bool  isSafeFall 
)

Definition at line 35 of file MovementUtil.cpp.

+ Here is the caller graph for this function:

◆ MovementFlags_ToString()

std::string Movement::MovementFlags_ToString ( uint32  flags)

Definition at line 199 of file MovementUtil.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ MovementFlagsExtra_ToString()

std::string Movement::MovementFlagsExtra_ToString ( uint32  flags)

Definition at line 206 of file MovementUtil.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ MSToSec()

float Movement::MSToSec ( uint32  ms)
inline

Definition at line 47 of file MovementTypedefs.h.

+ Here is the caller graph for this function:

◆ PrintFlags()

template<class Flags , int N>
void Movement::PrintFlags ( Flags  t,
char const *(&)  names[N],
std::string &  str 
)

Definition at line 183 of file MovementUtil.cpp.

+ Here is the caller graph for this function:

◆ s_Bezier3Coeffs()

static const Matrix4 Movement::s_Bezier3Coeffs ( -1.  f,
3.  f,
-3.  f,
1.  f,
3.  f,
-6.  f,
3.  f,
0.  f,
-3.  f,
3.  f,
0.  f,
0.  f,
1.  f,
0.  f,
0.  f,
0.  f 
)
static
+ Here is the caller graph for this function:

◆ s_catmullRomCoeffs()

static const Matrix4 Movement::s_catmullRomCoeffs ( -0.  5f,
1.  5f,
-1.  5f,
0.  5f,
1.  f,
-2.  5f,
2.  f,
-0.  5f,
-0.  5f,
0.  f,
0.  5f,
0.  f,
0.  f,
1.  f,
0.  f,
0.  f 
)
static
+ Here is the caller graph for this function:

◆ SecToMS()

uint32 Movement::SecToMS ( float  sec)
inline

Definition at line 42 of file MovementTypedefs.h.

+ Here is the caller graph for this function:

◆ SelectSpeedType()

UnitMoveType Movement::SelectSpeedType ( uint32  moveFlags)

Definition at line 28 of file MoveSplineInit.cpp.

+ Here is the caller graph for this function:

Variable Documentation

◆ gravity

float constexpr Movement::gravity = static_cast<float>(19.29110527038574)
constexpr

Definition at line 79 of file MovementTypedefs.h.

◆ MovementFlagExtraNames

char const* Movement::MovementFlagExtraNames[]
Initial value:
=
{
STRINGIZE(NoStrafe ),
STRINGIZE(NoJump ),
STRINGIZE(FullSpeedTurning ),
STRINGIZE(FullSpeedPitching ),
STRINGIZE(Allow_Pitching ),
STRINGIZE(VehicleExitVoluntary ),
STRINGIZE(WaterwalkingFullPitch ),
STRINGIZE(VehiclePassengerIsTransitionAllowed),
STRINGIZE(CanSwimToFlyTrans ),
STRINGIZE(Unk9 ),
STRINGIZE(CanTurnWhileFalling ),
STRINGIZE(IgnoreMovementForces ),
STRINGIZE(CanDoubleJump ),
STRINGIZE(DoubleJump ),
STRINGIZE(Unk14 ),
STRINGIZE(Unk15 ),
STRINGIZE(AwaitingLoad ),
STRINGIZE(InterpolatedMovement ),
STRINGIZE(InterpolatedTurning ),
STRINGIZE(InterpolatedPitching ),
}
#define STRINGIZE(a)
Definition: Common.h:25

Definition at line 122 of file MovementUtil.cpp.

◆ MovementFlagNames

char const* Movement::MovementFlagNames[]

Definition at line 86 of file MovementUtil.cpp.

◆ SplineFlagNames

char const* Movement::SplineFlagNames[32]

Definition at line 146 of file MovementUtil.cpp.

◆ splineIdGen

UInt32Counter Movement::splineIdGen

Definition at line 24 of file MovementUtil.cpp.

◆ terminal_fallTime

float constexpr Movement::terminal_fallTime = float(terminalVelocity / gravity)
constexpr

Definition at line 32 of file MovementUtil.cpp.

◆ terminal_length

float constexpr Movement::terminal_length = float(terminalVelocity * terminalVelocity) / (2.0f * gravity)
constexpr

Definition at line 30 of file MovementUtil.cpp.

◆ terminal_safeFall_fallTime

float constexpr Movement::terminal_safeFall_fallTime = float(terminalSafefallVelocity / gravity)
constexpr

Definition at line 33 of file MovementUtil.cpp.

◆ terminal_safeFall_length

float constexpr Movement::terminal_safeFall_length = (terminalSafefallVelocity * terminalSafefallVelocity) / (2.0f * gravity)
constexpr

Definition at line 31 of file MovementUtil.cpp.

◆ terminalSafefallVelocity

float constexpr Movement::terminalSafefallVelocity = 7.0f
constexpr

Definition at line 28 of file MovementUtil.cpp.

◆ terminalVelocity

float constexpr Movement::terminalVelocity = 60.148003f
constexpr

Velocity bounds that makes fall speed limited.

Definition at line 27 of file MovementUtil.cpp.