TrinityCore
Loading...
Searching...
No Matches
Movement Namespace Reference

Classes

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

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 }
 
enum class  MoveSplineFlagEnum : uint32 {
  None = 0x00000000 , Unknown_0x1 = 0x00000001 , Unknown_0x2 = 0x00000002 , Unknown_0x4 = 0x00000004 ,
  JumpOrientationFixed = 0x00000008 , FallingSlow = 0x00000010 , Done = 0x00000020 , Falling = 0x00000040 ,
  No_Spline = 0x00000080 , Unknown_0x100 = 0x00000100 , Flying = 0x00000200 , OrientationFixed = 0x00000400 ,
  Catmullrom = 0x00000800 , Cyclic = 0x00001000 , Enter_Cycle = 0x00002000 , Turning = 0x00004000 ,
  TransportEnter = 0x00008000 , TransportExit = 0x00010000 , Unknown_0x20000 = 0x00020000 , Unknown_0x40000 = 0x00040000 ,
  Backward = 0x00080000 , SmoothGroundPath = 0x00100000 , CanSwim = 0x00200000 , UncompressedPath = 0x00400000 ,
  Unknown_0x800000 = 0x00800000 , FastSteering = 0x01000000 , Animation = 0x02000000 , Parabolic = 0x04000000 ,
  FadeObject = 0x08000000 , Steering = 0x10000000 , UnlimitedSpeed = 0x20000000 , Unknown_0x40000000 = 0x40000000 ,
  Unknown_0x80000000 = 0x80000000 , Mask_No_Monster_Move = Done , Mask_Unused
}
 

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 (MovementFlags flags)
 
template<class Flags >
void PrintFlags (Flags t, std::string &str)
 
 DEFINE_ENUM_FLAG (MoveSplineFlagEnum)
 
consteval MoveSplineFlagEnum GetDisallowedFlagsFor (MoveSplineFlagEnum flag)
 
UnitMoveType SelectSpeedType (MovementFlags 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.291103363037109375)
 
TC_GAME_API UInt32Counter splineIdGen
 
float constexpr terminalVelocity = 60.148003f
 Velocity bounds that makes fall speed limited.
 
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)
 

Typedef Documentation

◆ PointsArray

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

Definition at line 32 of file MoveSplineInitArgs.h.

◆ UInt32Counter

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

Definition at line 79 of file MovementTypedefs.h.

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
minimal_duration 

Definition at line 130 of file MoveSpline.cpp.

◆ MonsterMoveType

Enumerator
MONSTER_MOVE_NORMAL 
MONSTER_MOVE_FACING_SPOT 
MONSTER_MOVE_FACING_TARGET 
MONSTER_MOVE_FACING_ANGLE 

Definition at line 36 of file MovementTypedefs.h.

◆ MoveSplineFlagEnum

enum class Movement::MoveSplineFlagEnum : uint32
strong
Enumerator
None 
Unknown_0x1 
Unknown_0x2 
Unknown_0x4 
JumpOrientationFixed 
FallingSlow 
Done 
Falling 
No_Spline 
Unknown_0x100 
Flying 
OrientationFixed 
Catmullrom 
Cyclic 
Enter_Cycle 
Turning 
TransportEnter 
TransportExit 
Unknown_0x20000 
Unknown_0x40000 
Backward 
SmoothGroundPath 
CanSwim 
UncompressedPath 
Unknown_0x800000 
FastSteering 
Animation 
Parabolic 
FadeObject 
Steering 
UnlimitedSpeed 
Unknown_0x40000000 
Unknown_0x80000000 
Mask_No_Monster_Move 
Mask_Unused 

Definition at line 28 of file MoveSplineFlag.h.

Function Documentation

◆ C_Evaluate()

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

◆ C_Evaluate_Derivative()

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

◆ computeFallElevation()

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

◆ computeFallTime()

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

◆ DEFINE_ENUM_FLAG()

Movement::DEFINE_ENUM_FLAG ( MoveSplineFlagEnum  )

◆ GetDisallowedFlagsFor()

◆ MovementFlags_ToString()

std::string Movement::MovementFlags_ToString ( MovementFlags  flags)
extern

◆ MSToSec()

◆ PrintFlags()

template<class Flags >
void Movement::PrintFlags ( Flags  t,
std::string &  str 
)

Definition at line 89 of file MovementUtil.cpp.

References EnumUtils::ToConstant().

Referenced by MovementFlags_ToString().

◆ 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

◆ 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

◆ SecToMS()

uint32 Movement::SecToMS ( float  sec)
inline

Definition at line 44 of file MovementTypedefs.h.

◆ SelectSpeedType()

Variable Documentation

◆ gravity

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

◆ splineIdGen

UInt32Counter Movement::splineIdGen

Definition at line 26 of file MovementUtil.cpp.

Referenced by Movement::MoveSplineInit::MoveSplineInit().

◆ terminal_fallTime

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

Definition at line 34 of file MovementUtil.cpp.

Referenced by computeFallElevation(), and computeFallTime().

◆ terminal_length

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

Definition at line 32 of file MovementUtil.cpp.

Referenced by computeFallTime().

◆ terminal_safeFall_fallTime

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

Definition at line 35 of file MovementUtil.cpp.

Referenced by computeFallElevation(), and computeFallTime().

◆ terminal_safeFall_length

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

Definition at line 33 of file MovementUtil.cpp.

Referenced by computeFallTime().

◆ terminalSafefallVelocity

float constexpr Movement::terminalSafefallVelocity = 7.0f
constexpr

Definition at line 30 of file MovementUtil.cpp.

Referenced by computeFallElevation(), and computeFallTime().

◆ terminalVelocity

float constexpr Movement::terminalVelocity = 60.148003f
constexpr

Velocity bounds that makes fall speed limited.

Definition at line 29 of file MovementUtil.cpp.

Referenced by computeFallElevation(), and computeFallTime().