TrinityCore
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
TransportAnimation Struct Reference

#include <TransportMgr.h>

Public Member Functions

 TransportAnimation ()
 
TransportAnimationEntry constGetAnimNode (uint32 time) const
 
G3D::Quat GetAnimRotation (uint32 time) const
 

Public Attributes

TransportPathContainer Path
 
TransportPathRotationContainer Rotations
 
uint32 TotalTime
 

Constructor & Destructor Documentation

TransportAnimation::TransportAnimation ( )
inline
88 : TotalTime(0) { }
uint32 TotalTime
Definition: TransportMgr.h:92

Member Function Documentation

TransportAnimationEntry const * TransportAnimation::GetAnimNode ( uint32  time) const
472 {
473  if (Path.empty())
474  return NULL;
475 
476  for (TransportPathContainer::const_reverse_iterator itr2 = Path.rbegin(); itr2 != Path.rend(); ++itr2)
477  if (time >= itr2->first)
478  return itr2->second;
479 
480  return Path.begin()->second;
481 }
arena_t NULL
Definition: jemalloc_internal.h:624
TransportPathContainer Path
Definition: TransportMgr.h:90
G3D::Quat TransportAnimation::GetAnimRotation ( uint32  time) const
484 {
485  if (Rotations.empty())
486  return G3D::Quat(0.0f, 0.0f, 0.0f, 1.0f);
487 
488  TransportRotationEntry const* rot = Rotations.begin()->second;
489  for (TransportPathRotationContainer::const_reverse_iterator itr2 = Rotations.rbegin(); itr2 != Rotations.rend(); ++itr2)
490  {
491  if (time >= itr2->first)
492  {
493  rot = itr2->second;
494  break;
495  }
496  }
497 
498  return G3D::Quat(rot->X, rot->Y, rot->Z, rot->W);
499 }
float W
Definition: DB2Structure.h:1392
Definition: Quat.h:49
float Z
Definition: DB2Structure.h:1391
float X
Definition: DB2Structure.h:1389
Definition: DB2Structure.h:1384
float Y
Definition: DB2Structure.h:1390
TransportPathRotationContainer Rotations
Definition: TransportMgr.h:91

Member Data Documentation

TransportPathContainer TransportAnimation::Path
TransportPathRotationContainer TransportAnimation::Rotations
uint32 TransportAnimation::TotalTime

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