TrinityCore
Loading...
Searching...
No Matches
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
 
uint32 GetId () const
 
bool Finalized () const
 
bool isCyclic () const
 
bool isFalling () const
 
Vector3 FinalDestination () const
 
Vector3 CurrentDestination () const
 
int32 currentPathIdx () const
 
bool HasAnimation () const
 
AnimTier GetAnimTier () const
 
std::string ToString () const
 
bool HasStarted () const
 

Public Attributes

bool onTransport
 

Protected Member Functions

void init_spline (MoveSplineInitArgs const &args)
 
MySpline::ControlArray const & getPath () const
 
void computeParabolicElevation (float &el) const
 
void computeFallElevation (float &el) const
 
UpdateResult _updateState (int32 &ms_time_diff)
 ============================================================================================
 
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
 

Friends

class PacketBuilder
 

Detailed Description

Definition at line 42 of file MoveSpline.h.

Member Typedef Documentation

◆ MySpline

Definition at line 45 of file MoveSpline.h.

Member Enumeration Documentation

◆ UpdateResult

Enumerator
Result_None 
Result_Arrived 
Result_NextCycle 
Result_NextSegment 

Definition at line 46 of file MoveSpline.h.

Constructor & Destructor Documentation

◆ MoveSpline()

Movement::MoveSpline::MoveSpline ( )

Definition at line 189 of file MoveSpline.cpp.

Member Function Documentation

◆ _currentSplineIdx()

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

Definition at line 91 of file MoveSpline.h.

+ Here is the caller graph for this function:

◆ _Finalize()

void Movement::MoveSpline::_Finalize ( )

Definition at line 359 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 94 of file MoveSpline.h.

+ Here is the caller graph for this function:

◆ _Spline()

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

Definition at line 90 of file MoveSpline.h.

◆ _updateState()

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

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

Definition at line 262 of file MoveSpline.cpp.

+ Here is the call graph for this function:

◆ computeFallElevation()

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

Definition at line 81 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 ( float &  el) const
protected

Definition at line 68 of file MoveSpline.cpp.

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

◆ ComputePosition()

Location Movement::MoveSpline::ComputePosition ( ) const

Definition at line 26 of file MoveSpline.cpp.

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

◆ CurrentDestination()

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

Definition at line 125 of file MoveSpline.h.

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

◆ currentPathIdx()

int32 Movement::MoveSpline::currentPathIdx ( ) const

Definition at line 366 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 89 of file MoveSpline.h.

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

◆ FinalDestination()

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

Definition at line 124 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 121 of file MoveSpline.h.

+ Here is the caller graph for this function:

◆ GetAnimTier()

AnimTier Movement::MoveSpline::GetAnimTier ( ) const
inline

Definition at line 129 of file MoveSpline.h.

+ Here is the caller graph for this function:

◆ GetId()

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

Definition at line 120 of file MoveSpline.h.

+ Here is the caller graph for this function:

◆ getPath()

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

Definition at line 78 of file MoveSpline.h.

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

◆ HasAnimation()

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

Definition at line 128 of file MoveSpline.h.

+ Here is the caller graph for this function:

◆ HasStarted()

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

Definition at line 133 of file MoveSpline.h.

+ Here is the caller graph for this function:

◆ 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 119 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 153 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 98 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 122 of file MoveSpline.h.

+ Here is the caller graph for this function:

◆ isFalling()

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

Definition at line 123 of file MoveSpline.h.

+ Here is the caller graph for this function:

◆ next_timestamp()

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

Definition at line 83 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 84 of file MoveSpline.h.

+ Here is the caller graph for this function:

◆ timeElapsed()

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

Definition at line 85 of file MoveSpline.h.

◆ timePassed()

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

Definition at line 88 of file MoveSpline.h.

+ Here is the caller graph for this function:

◆ ToString()

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

Definition at line 339 of file MoveSpline.cpp.

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

◆ updateState() [1/2]

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

Definition at line 111 of file MoveSpline.h.

◆ updateState() [2/2]

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

Definition at line 103 of file MoveSpline.h.

+ Here is the caller graph for this function:

◆ Velocity()

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

Definition at line 92 of file MoveSpline.h.

+ Here is the caller graph for this function:

Friends And Related Symbol Documentation

◆ PacketBuilder

friend class PacketBuilder
friend

Definition at line 53 of file MoveSpline.h.

Member Data Documentation

◆ effect_start_time

int32 Movement::MoveSpline::effect_start_time
protected

Definition at line 70 of file MoveSpline.h.

◆ facing

FacingInfo Movement::MoveSpline::facing
protected

Definition at line 58 of file MoveSpline.h.

◆ initialOrientation

float Movement::MoveSpline::initialOrientation
protected

Definition at line 69 of file MoveSpline.h.

◆ m_Id

uint32 Movement::MoveSpline::m_Id
protected

Definition at line 60 of file MoveSpline.h.

◆ onTransport

bool Movement::MoveSpline::onTransport

Definition at line 131 of file MoveSpline.h.

◆ point_Idx

int32 Movement::MoveSpline::point_Idx
protected

Definition at line 71 of file MoveSpline.h.

◆ point_Idx_offset

int32 Movement::MoveSpline::point_Idx_offset
protected

Definition at line 72 of file MoveSpline.h.

◆ spline

MySpline Movement::MoveSpline::spline
protected

Definition at line 56 of file MoveSpline.h.

◆ splineflags

MoveSplineFlag Movement::MoveSpline::splineflags
protected

Definition at line 62 of file MoveSpline.h.

◆ time_passed

int32 Movement::MoveSpline::time_passed
protected

Definition at line 64 of file MoveSpline.h.

◆ velocity

float Movement::MoveSpline::velocity
protected

Definition at line 73 of file MoveSpline.h.

◆ vertical_acceleration

float Movement::MoveSpline::vertical_acceleration
protected

Definition at line 68 of file MoveSpline.h.


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