TrinityCore
Movement::MoveSpline Class Reference

#include <MoveSpline.h>

Public Types

enum  UpdateResult { Result_None = 0x01 , Result_Arrived = 0x02 , Result_NextCycle = 0x04 , Result_NextSegment = 0x08 }
 
typedef Spline< int32MySpline
 

Public Member Functions

int32 timePassed () const
 
int32 Duration () const
 
MySpline const & _Spline () const
 
int32 _currentSplineIdx () const
 
float Velocity () const
 
void _Finalize ()
 
void _Interrupt ()
 
void Initialize (MoveSplineInitArgs const &)
 
bool Initialized () const
 
 MoveSpline ()
 
template<class UpdateHandler >
void updateState (int32 difftime, UpdateHandler &handler)
 
void updateState (int32 difftime)
 
Location ComputePosition () const
 
Location ComputePosition (int32 time_offset) const
 
uint32 GetId () const
 
bool Finalized () const
 
bool isCyclic () const
 
bool isFalling () const
 
Vector3 const & FinalDestination () const
 
Vector3 const & CurrentDestination () const
 
int32 currentPathIdx () const
 
Optional< AnimTierGetAnimation () const
 
std::string ToString () const
 
bool HasStarted () const
 

Public Attributes

bool onTransport
 
bool splineIsFacingOnly
 

Protected Member Functions

void init_spline (MoveSplineInitArgs const &args)
 
MySpline::ControlArray const & getPath () const
 
Location computePosition (int32 time_point, int32 point_index) const
 
void computeParabolicElevation (int32 time_point, float &el) const
 
void computeFallElevation (int32 time_point, float &el) const
 
UpdateResult _updateState (int32 &ms_time_diff)
 ============================================================================================ More...
 
int32 next_timestamp () const
 
int32 segment_time_elapsed () const
 
int32 timeElapsed () const
 

Protected Attributes

MySpline spline
 
FacingInfo facing
 
uint32 m_Id
 
MoveSplineFlag splineflags
 
int32 time_passed
 
float vertical_acceleration
 
float initialOrientation
 
int32 effect_start_time
 
int32 point_Idx
 
int32 point_Idx_offset
 
float velocity
 
Optional< SpellEffectExtraDataspell_effect_extra
 
Optional< AnimTierTransitionanim_tier
 

Friends

class WorldPackets::Movement::CommonMovement
 
class WorldPackets::Movement::MonsterMove
 

Detailed Description

Definition at line 51 of file MoveSpline.h.

Member Typedef Documentation

◆ MySpline

Definition at line 57 of file MoveSpline.h.

Member Enumeration Documentation

◆ UpdateResult

Enumerator
Result_None 
Result_Arrived 
Result_NextCycle 
Result_NextSegment 

Definition at line 59 of file MoveSpline.h.

Constructor & Destructor Documentation

◆ MoveSpline()

Movement::MoveSpline::MoveSpline ( )

Definition at line 232 of file MoveSpline.cpp.

Member Function Documentation

◆ _currentSplineIdx()

int32 Movement::MoveSpline::_currentSplineIdx ( ) const
inline

Definition at line 106 of file MoveSpline.h.

◆ _Finalize()

void Movement::MoveSpline::_Finalize ( )

Definition at line 386 of file MoveSpline.cpp.

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

◆ _Interrupt()

void Movement::MoveSpline::_Interrupt ( )
inline

Definition at line 109 of file MoveSpline.h.

◆ _Spline()

MySpline const & Movement::MoveSpline::_Spline ( ) const
inline

Definition at line 105 of file MoveSpline.h.

◆ _updateState()

MoveSpline::UpdateResult Movement::MoveSpline::_updateState ( int32 ms_time_diff)
protected

============================================================================================

Definition at line 289 of file MoveSpline.cpp.

+ Here is the call graph for this function:

◆ computeFallElevation()

void Movement::MoveSpline::computeFallElevation ( int32  time_point,
float &  el 
) const
protected

Definition at line 110 of file MoveSpline.cpp.

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

◆ computeParabolicElevation()

void Movement::MoveSpline::computeParabolicElevation ( int32  time_point,
float &  el 
) const
protected

Definition at line 95 of file MoveSpline.cpp.

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

◆ ComputePosition() [1/2]

Location Movement::MoveSpline::ComputePosition ( ) const

Definition at line 71 of file MoveSpline.cpp.

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

◆ ComputePosition() [2/2]

Location Movement::MoveSpline::ComputePosition ( int32  time_offset) const

Definition at line 76 of file MoveSpline.cpp.

+ Here is the call graph for this function:

◆ computePosition()

Location Movement::MoveSpline::computePosition ( int32  time_point,
int32  point_index 
) const
protected

Definition at line 27 of file MoveSpline.cpp.

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

◆ CurrentDestination()

Vector3 const & Movement::MoveSpline::CurrentDestination ( ) const
inline

Definition at line 141 of file MoveSpline.h.

+ Here is the call graph for this function:

◆ currentPathIdx()

int32 Movement::MoveSpline::currentPathIdx ( ) const

Definition at line 393 of file MoveSpline.cpp.

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

◆ Duration()

int32 Movement::MoveSpline::Duration ( ) const
inline

Definition at line 104 of file MoveSpline.h.

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

◆ FinalDestination()

Vector3 const & Movement::MoveSpline::FinalDestination ( ) const
inline

Definition at line 140 of file MoveSpline.h.

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

◆ Finalized()

bool Movement::MoveSpline::Finalized ( ) const
inline

Definition at line 137 of file MoveSpline.h.

+ Here is the caller graph for this function:

◆ GetAnimation()

Optional< AnimTier > Movement::MoveSpline::GetAnimation ( ) const
inline

Definition at line 144 of file MoveSpline.h.

◆ GetId()

uint32 Movement::MoveSpline::GetId ( ) const
inline

Definition at line 136 of file MoveSpline.h.

+ Here is the caller graph for this function:

◆ getPath()

MySpline::ControlArray const & Movement::MoveSpline::getPath ( ) const
inlineprotected

Definition at line 92 of file MoveSpline.h.

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

◆ HasStarted()

bool Movement::MoveSpline::HasStarted ( ) const
inline

Definition at line 149 of file MoveSpline.h.

◆ init_spline()

void Movement::MoveSpline::init_spline ( MoveSplineInitArgs const &  args)
protected
Todo:
what to do in such cases? problem is in input data (all points are at same coords)

Definition at line 148 of file MoveSpline.cpp.

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

◆ Initialize()

void Movement::MoveSpline::Initialize ( MoveSplineInitArgs const &  args)

Definition at line 182 of file MoveSpline.cpp.

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

◆ Initialized()

bool Movement::MoveSpline::Initialized ( ) const
inline

Definition at line 113 of file MoveSpline.h.

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

◆ isCyclic()

bool Movement::MoveSpline::isCyclic ( ) const
inline

Definition at line 138 of file MoveSpline.h.

+ Here is the caller graph for this function:

◆ isFalling()

bool Movement::MoveSpline::isFalling ( ) const
inline

Definition at line 139 of file MoveSpline.h.

◆ next_timestamp()

int32 Movement::MoveSpline::next_timestamp ( ) const
inlineprotected

Definition at line 98 of file MoveSpline.h.

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

◆ segment_time_elapsed()

int32 Movement::MoveSpline::segment_time_elapsed ( ) const
inlineprotected

Definition at line 99 of file MoveSpline.h.

+ Here is the caller graph for this function:

◆ timeElapsed()

int32 Movement::MoveSpline::timeElapsed ( ) const
inlineprotected

Definition at line 100 of file MoveSpline.h.

◆ timePassed()

int32 Movement::MoveSpline::timePassed ( ) const
inline

Definition at line 103 of file MoveSpline.h.

+ Here is the caller graph for this function:

◆ ToString()

std::string Movement::MoveSpline::ToString ( ) const

Definition at line 366 of file MoveSpline.cpp.

+ Here is the call graph for this function:

◆ updateState() [1/2]

void Movement::MoveSpline::updateState ( int32  difftime)
inline

Definition at line 126 of file MoveSpline.h.

◆ updateState() [2/2]

template<class UpdateHandler >
void Movement::MoveSpline::updateState ( int32  difftime,
UpdateHandler &  handler 
)
inline

Definition at line 118 of file MoveSpline.h.

◆ Velocity()

float Movement::MoveSpline::Velocity ( ) const
inline

Definition at line 107 of file MoveSpline.h.

Friends And Related Function Documentation

◆ WorldPackets::Movement::CommonMovement

Definition at line 53 of file MoveSpline.h.

◆ WorldPackets::Movement::MonsterMove

Definition at line 54 of file MoveSpline.h.

Member Data Documentation

◆ anim_tier

Optional<AnimTierTransition> Movement::MoveSpline::anim_tier
protected

Definition at line 87 of file MoveSpline.h.

◆ effect_start_time

int32 Movement::MoveSpline::effect_start_time
protected

Definition at line 82 of file MoveSpline.h.

◆ facing

FacingInfo Movement::MoveSpline::facing
protected

Definition at line 70 of file MoveSpline.h.

◆ initialOrientation

float Movement::MoveSpline::initialOrientation
protected

Definition at line 81 of file MoveSpline.h.

◆ m_Id

uint32 Movement::MoveSpline::m_Id
protected

Definition at line 72 of file MoveSpline.h.

◆ onTransport

bool Movement::MoveSpline::onTransport

Definition at line 146 of file MoveSpline.h.

◆ point_Idx

int32 Movement::MoveSpline::point_Idx
protected

Definition at line 83 of file MoveSpline.h.

◆ point_Idx_offset

int32 Movement::MoveSpline::point_Idx_offset
protected

Definition at line 84 of file MoveSpline.h.

◆ spell_effect_extra

Optional<SpellEffectExtraData> Movement::MoveSpline::spell_effect_extra
protected

Definition at line 86 of file MoveSpline.h.

◆ spline

MySpline Movement::MoveSpline::spline
protected

Definition at line 68 of file MoveSpline.h.

◆ splineflags

MoveSplineFlag Movement::MoveSpline::splineflags
protected

Definition at line 74 of file MoveSpline.h.

◆ splineIsFacingOnly

bool Movement::MoveSpline::splineIsFacingOnly

Definition at line 147 of file MoveSpline.h.

◆ time_passed

int32 Movement::MoveSpline::time_passed
protected

Definition at line 76 of file MoveSpline.h.

◆ velocity

float Movement::MoveSpline::velocity
protected

Definition at line 85 of file MoveSpline.h.

◆ vertical_acceleration

float Movement::MoveSpline::vertical_acceleration
protected

Definition at line 80 of file MoveSpline.h.


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