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

Classes

struct  CommonInitializer
 
class  counter
 
union  FacingInfo
 
struct  FallInitializer
 
struct  Location
 
class  MoveSpline
 
class  MoveSplineFlag
 
class  MoveSplineInit
 
struct  MoveSplineInitArgs
 
class  PacketBuilder
 
class  Spline
 
class  SplineBase
 
class  TransportPathTransform
 

Typedefs

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

Enumerations

enum  MonsterMoveType {
  MonsterMoveNormal = 0 , MonsterMoveStop = 1 , MonsterMoveFacingSpot = 2 , MonsterMoveFacingTarget = 3 ,
  MonsterMoveFacingAngle = 4
}
 
enum  { minimal_duration = 1 }
 

Functions

void operator<< (ByteBuffer &b, Vector3 const &v)
 
void operator>> (ByteBuffer &b, Vector3 &v)
 
void WriteLinearPath (Spline< int32 > const &spline, ByteBuffer &data)
 
void WriteCatmullRomPath (Spline< int32 > const &spline, ByteBuffer &data)
 
void WriteCatmullRomCyclicPath (Spline< int32 > const &spline, ByteBuffer &data)
 
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)
 
template<class Flags , int N>
void print_flags (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

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

Typedef Documentation

◆ PointsArray

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

Definition at line 29 of file MoveSplineInitArgs.h.

◆ UInt32Counter

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

Definition at line 69 of file MovementTypedefs.h.

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
minimal_duration 

Definition at line 103 of file MoveSpline.cpp.

◆ MonsterMoveType

Enumerator
MonsterMoveNormal 
MonsterMoveStop 
MonsterMoveFacingSpot 
MonsterMoveFacingTarget 
MonsterMoveFacingAngle 

Definition at line 35 of file MovementPacketBuilder.cpp.

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 88 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:

◆ MSToSec()

float Movement::MSToSec ( uint32  ms)
inline

Definition at line 39 of file MovementTypedefs.h.

+ Here is the caller graph for this function:

◆ operator<<()

void Movement::operator<< ( ByteBuffer b,
Vector3 const &  v 
)
inline

Definition at line 25 of file MovementPacketBuilder.cpp.

◆ operator>>()

void Movement::operator>> ( ByteBuffer b,
Vector3 &  v 
)
inline

Definition at line 30 of file MovementPacketBuilder.cpp.

◆ print_flags()

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

Definition at line 178 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 34 of file MovementTypedefs.h.

+ Here is the caller graph for this function:

◆ SelectSpeedType()

UnitMoveType Movement::SelectSpeedType ( uint32  moveFlags)

Definition at line 30 of file MoveSplineInit.cpp.

+ Here is the caller graph for this function:

◆ WriteCatmullRomCyclicPath()

void Movement::WriteCatmullRomCyclicPath ( Spline< int32 > const &  spline,
ByteBuffer data 
)

Definition at line 123 of file MovementPacketBuilder.cpp.

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

◆ WriteCatmullRomPath()

void Movement::WriteCatmullRomPath ( Spline< int32 > const &  spline,
ByteBuffer data 
)

Definition at line 116 of file MovementPacketBuilder.cpp.

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

◆ WriteLinearPath()

void Movement::WriteLinearPath ( Spline< int32 > const &  spline,
ByteBuffer data 
)

Definition at line 96 of file MovementPacketBuilder.cpp.

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

Variable Documentation

◆ g_MovementFlag_names

char const* Movement::g_MovementFlag_names[]

Definition at line 88 of file MovementUtil.cpp.

◆ g_SplineFlag_names

char const* Movement::g_SplineFlag_names[32]

Definition at line 141 of file MovementUtil.cpp.

◆ gravity

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

Definition at line 23 of file MovementUtil.cpp.

◆ splineIdGen

UInt32Counter Movement::splineIdGen

Definition at line 24 of file MovementUtil.cpp.

◆ terminal_fallTime

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

Definition at line 32 of file MovementUtil.cpp.

◆ terminal_length

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

Definition at line 30 of file MovementUtil.cpp.

◆ terminal_safeFall_fallTime

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

Definition at line 33 of file MovementUtil.cpp.

◆ terminal_safeFall_length

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

Definition at line 31 of file MovementUtil.cpp.

◆ terminalSafefallVelocity

float Movement::terminalSafefallVelocity = 7.0f

Definition at line 28 of file MovementUtil.cpp.

◆ terminalVelocity

float Movement::terminalVelocity = 60.148003f

Velocity bounds that makes fall speed limited.

Definition at line 27 of file MovementUtil.cpp.