AzerothCore 3.3.5a
OpenSource WoW Emulator
Loading...
Searching...
No Matches
Movement::CommonInitializer Struct Reference

Public Member Functions

 CommonInitializer (float _velocity)
 
int32 operator() (Spline< int32 > &s, int32 i)
 

Public Attributes

float velocityInv
 
int32 _time
 

Detailed Description

Constructor & Destructor Documentation

◆ CommonInitializer()

Movement::CommonInitializer::CommonInitializer ( float  _velocity)
inline
110: velocityInv(1000.f / _velocity), _time(minimal_duration) {}
@ minimal_duration
Definition: MoveSpline.cpp:105
int32 _time
Definition: MoveSpline.cpp:119
float velocityInv
Definition: MoveSpline.cpp:118

Member Function Documentation

◆ operator()()

int32 Movement::CommonInitializer::operator() ( Spline< int32 > &  s,
int32  i 
)
inline
113 {
114 _time += (s.SegLength(i) * velocityInv);
115 return _time;
116 }
float SegLength(index_type i) const
Definition: Spline.h:132

References _time, Movement::SplineBase::SegLength(), and velocityInv.

Member Data Documentation

◆ _time

int32 Movement::CommonInitializer::_time

Referenced by operator()().

◆ velocityInv

float Movement::CommonInitializer::velocityInv

Referenced by operator()().