AzerothCore 3.3.5a
OpenSource WoW Emulator
|
#include "MoveSpline.h"
Public Types | |
enum | UpdateResult { Result_None = 0x01 , Result_Arrived = 0x02 , Result_NextCycle = 0x04 , Result_NextSegment = 0x08 , Result_JustArrived = 0x10 } |
typedef Spline< int32 > | MySpline |
Public Member Functions | |
int32 | timeElapsed () const |
int32 | timePassed () const |
int32 | Duration () const |
MySpline const & | _Spline () const |
int32 | _currentSplineIdx () const |
void | _Finalize () |
void | _Interrupt () |
void | Initialize (const MoveSplineInitArgs &) |
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 |
bool | isWalking () const |
Vector3 | FinalDestination () const |
Vector3 | CurrentDestination () const |
int32 | currentPathIdx () const |
bool | HasAnimation () const |
uint8 | GetAnimationType () const |
std::string | ToString () const |
bool | HasStarted () const |
Public Attributes | |
bool | onTransport |
Protected Member Functions | |
void | init_spline (const MoveSplineInitArgs &args) |
const MySpline::ControlArray & | getPath () const |
void | computeParabolicElevation (float &el) const |
void | computeFallElevation (float &el) const |
UpdateResult | _updateState (int32 &ms_time_diff) |
============================================================================================ More... | |
int32 | next_timestamp () const |
int32 | segment_time_elapsed () 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 |
Friends | |
class | PacketBuilder |
typedef Spline<int32> Movement::MoveSpline::MySpline |
Enumerator | |
---|---|
Result_None | |
Result_Arrived | |
Result_NextCycle | |
Result_NextSegment | |
Result_JustArrived |
Movement::MoveSpline::MoveSpline | ( | ) |
References Movement::MoveSplineFlag::done, and splineflags.
|
inline |
void Movement::MoveSpline::_Finalize | ( | ) |
References Movement::MoveSplineFlag::done, Duration(), Movement::SplineBase::last(), point_Idx, spline, splineflags, and time_passed.
Referenced by _updateState().
|
inline |
|
inline |
|
protected |
============================================================================================
References _Finalize(), ASSERT, Duration(), Finalized(), Movement::SplineBase::first(), Movement::SplineBase::isCyclic(), Movement::SplineBase::last(), next_timestamp(), point_Idx, Result_Arrived, Result_JustArrived, Result_NextCycle, Result_NextSegment, Result_None, segment_time_elapsed(), spline, and time_passed.
Referenced by updateState().
|
protected |
References Movement::computeFallElevation(), FinalDestination(), Movement::SplineBase::first(), Movement::SplineBase::getPoint(), Movement::MSToSec(), spline, and time_passed.
Referenced by ComputePosition().
|
protected |
References Duration(), effect_start_time, Movement::MSToSec(), time_passed, and vertical_acceleration.
Referenced by ComputePosition().
Location Movement::MoveSpline::ComputePosition | ( | ) | const |
References Movement::FacingInfo::angle, Movement::MoveSplineFlag::animation, ASSERT, computeFallElevation(), computeParabolicElevation(), Movement::MoveSplineFlag::done, Movement::Spline< length_type >::evaluate_derivative(), Movement::Spline< length_type >::evaluate_percent(), Movement::FacingInfo::f, facing, Movement::MoveSplineFlag::Falling, Movement::MoveSplineFlag::falling, Movement::MoveSplineFlag::final_angle, Movement::MoveSplineFlag::final_point, Movement::MoveSplineFlag::hasFlag(), Initialized(), initialOrientation, Movement::MoveSplineFlag::isFacing(), Movement::Spline< length_type >::length(), Movement::Location::orientation, Movement::MoveSplineFlag::OrientationFixed, Movement::MoveSplineFlag::orientationInversed, Movement::MoveSplineFlag::parabolic, point_Idx, spline, splineflags, time_passed, Movement::FacingInfo::x, and Movement::FacingInfo::y.
Referenced by Movement::MoveSplineInit::Launch(), Movement::MoveSplineInit::Stop(), and Unit::UpdateSplinePosition().
|
inline |
References Movement::SplineBase::getPoint(), Initialized(), point_Idx, and spline.
int32 Movement::MoveSpline::currentPathIdx | ( | ) | const |
References Finalized(), Movement::SplineBase::first(), isCyclic(), Movement::SplineBase::last(), point_Idx, point_Idx_offset, and spline.
Referenced by FlightPathMovementGenerator::DoUpdate(), SplineHandler::operator()(), and ToString().
|
inline |
References Movement::Spline< length_type >::length(), and spline.
Referenced by _Finalize(), _updateState(), computeParabolicElevation(), Initialize(), Movement::MoveSplineInit::Launch(), timeElapsed(), ToString(), Movement::PacketBuilder::WriteCommonMonsterMovePart(), and Movement::PacketBuilder::WriteCreate().
|
inline |
|
inline |
References Movement::MoveSplineFlag::done, and splineflags.
Referenced by _updateState(), currentPathIdx(), HomeMovementGenerator< Creature >::DoUpdate(), WaypointMovementGenerator< Creature >::DoUpdate(), RandomMovementGenerator< T >::DoUpdate(), Creature::FocusTarget(), MotionMaster::GetDestination(), WorldSession::HandleMovementOpcodes(), WorldSession::HandleSetRaidDifficultyOpcode(), Unit::IsFalling(), Movement::MoveSplineInit::Launch(), boss_captain_skarloc::MovementInform(), boss_razorscale::boss_razorscaleAI::MovementInform(), npc_wild_wyrm::npc_wild_wyrmAI::MovementInform(), npc_hor_lich_king::npc_hor_lich_kingAI::MovementInform(), npc_hor_leader_second::npc_hor_leader_secondAI::MovementInform(), npc_freed_protodrake::npc_freed_protodrakeAI::MovementInform(), SmartAI::MovepointReached(), Unit::SetRooted(), Movement::MoveSplineInit::Stop(), Unit::StopMoving(), EffectMovementGenerator::Update(), npc_escortAI::UpdateAI(), SmartAI::UpdatePath(), and Unit::UpdateSplineMovement().
|
inline |
References Movement::MoveSplineFlag::animId, and splineflags.
Referenced by Unit::UpdateSplineMovement().
|
inline |
References m_Id.
Referenced by SplineHandler::operator()(), ToString(), Movement::PacketBuilder::WriteCommonMonsterMovePart(), and Movement::PacketBuilder::WriteCreate().
|
inlineprotected |
References Movement::SplineBase::getPoints(), and spline.
Referenced by Movement::PacketBuilder::WriteCreate().
|
inline |
References Movement::MoveSplineFlag::animation, and splineflags.
Referenced by Unit::UpdateSplineMovement().
|
inline |
|
protected |
References Movement::MoveSplineFlag::cyclic, Movement::MoveSplineFlag::falling, Movement::SplineBase::first(), Movement::MoveSplineInitArgs::flags, Movement::SplineBase::getPoint(), Movement::Spline< length_type >::init_cyclic_spline(), Movement::Spline< length_type >::init_spline(), Movement::Spline< length_type >::initLengths(), Movement::SplineBase::isCyclic(), Movement::MoveSplineFlag::isSmooth(), Movement::SplineBase::last(), Movement::Spline< length_type >::length(), Movement::minimal_duration, Movement::SplineBase::ModeCatmullrom, Movement::SplineBase::ModeLinear, Movement::MoveSplineInitArgs::path, point_Idx, Movement::Spline< length_type >::set_length(), spline, splineflags, and Movement::MoveSplineInitArgs::velocity.
Referenced by Initialize().
void Movement::MoveSpline::Initialize | ( | const MoveSplineInitArgs & | args | ) |
References Movement::MoveSplineFlag::Animation, Movement::Spline< length_type >::clear(), Movement::MoveSplineFlag::done, Duration(), effect_start_time, facing, Movement::MoveSplineInitArgs::facing, Movement::MoveSplineInitArgs::flags, init_spline(), initialOrientation, Movement::MoveSplineInitArgs::initialOrientation, m_Id, Movement::MSToSec(), Movement::MoveSplineFlag::Parabolic, Movement::MoveSplineFlag::parabolic, Movement::MoveSplineInitArgs::parabolic_amplitude, Movement::MoveSplineInitArgs::path_Idx_offset, point_Idx_offset, spline, splineflags, Movement::MoveSplineInitArgs::splineId, time_passed, Movement::MoveSplineInitArgs::time_perc, and vertical_acceleration.
Referenced by Movement::MoveSplineInit::Launch(), and Movement::MoveSplineInit::Stop().
|
inline |
|
inline |
References Movement::MoveSplineFlag::cyclic, and splineflags.
Referenced by currentPathIdx(), Movement::PacketBuilder::WriteCommonMonsterMovePart(), and Movement::PacketBuilder::WriteCreate().
|
inline |
References Movement::MoveSplineFlag::falling, and splineflags.
Referenced by EffectMovementGenerator::Finalize(), and Unit::IsFalling().
|
inline |
References splineflags, and Movement::MoveSplineFlag::walkmode.
Referenced by FollowMovementGenerator< T >::DoUpdate(), and GetVelocity().
|
inlineprotected |
References Movement::Spline< length_type >::length(), point_Idx, and spline.
Referenced by _updateState(), and segment_time_elapsed().
|
inlineprotected |
|
inline |
References Duration(), and time_passed.
|
inline |
std::string Movement::MoveSpline::ToString | ( | ) | const |
References Movement::FacingInfo::angle, currentPathIdx(), Duration(), Movement::FacingInfo::f, facing, Movement::MoveSplineFlag::final_angle, Movement::MoveSplineFlag::final_point, Movement::MoveSplineFlag::final_target, GetId(), point_Idx, spline, splineflags, Movement::FacingInfo::target, time_passed, Movement::MoveSplineFlag::ToString(), Movement::SplineBase::ToString(), Movement::FacingInfo::x, Movement::FacingInfo::y, and Movement::FacingInfo::z.
|
inline |
References _updateState(), ASSERT, and Initialized().
|
inline |
References _updateState(), ASSERT, and Initialized().
Referenced by Unit::UpdateSplineMovement().
|
friend |
|
protected |
|
protected |
|
protected |
Referenced by ComputePosition(), and Initialize().
|
protected |
Referenced by GetId(), and Initialize().
bool Movement::MoveSpline::onTransport |
|
protected |
Referenced by _currentSplineIdx(), _Finalize(), _updateState(), ComputePosition(), CurrentDestination(), currentPathIdx(), init_spline(), next_timestamp(), and ToString().
|
protected |
Referenced by currentPathIdx(), and Initialize().
|
protected |
Referenced by _Finalize(), _Spline(), _updateState(), computeFallElevation(), ComputePosition(), CurrentDestination(), currentPathIdx(), Duration(), FinalDestination(), getPath(), init_spline(), Initialize(), Initialized(), next_timestamp(), ToString(), Movement::PacketBuilder::WriteCommonMonsterMovePart(), Movement::PacketBuilder::WriteCreate(), and Movement::PacketBuilder::WriteMonsterMove().
|
protected |
Referenced by _Finalize(), _Interrupt(), ComputePosition(), Finalized(), GetAnimationType(), HasAnimation(), init_spline(), Initialize(), isCyclic(), isFalling(), isWalking(), MoveSpline(), ToString(), Movement::PacketBuilder::WriteCommonMonsterMovePart(), Movement::PacketBuilder::WriteCreate(), and Movement::PacketBuilder::WriteMonsterMove().
|
protected |
|
protected |