514{
516 {
517 curr = G3D::Quat(0.0f, 0.0f, 0.0f, 1.0f);
518 next = G3D::Quat(0.0f, 0.0f, 0.0f, 1.0f);
519 percRot = 0.0f;
520 return;
521 }
522
523 for (TransportPathRotationContainer::const_reverse_iterator itr =
Rotations.rbegin(); itr !=
Rotations.rend(); ++itr)
524 if (time >= itr->first)
525 {
526 uint32 currSeg = itr->second->TimeSeg, nextSeg;
527 curr = G3D::Quat(itr->second->X, itr->second->Y, itr->second->Z, itr->second->W);
529 {
530 --itr;
531 next = G3D::Quat(itr->second->X, itr->second->Y, itr->second->Z, itr->second->W);
532 nextSeg = itr->second->TimeSeg;
533 }
534 else
535 {
538 }
539 percRot = float(time - currSeg) / float(nextSeg - currSeg);
540 return;
541 }
542
543 curr = G3D::Quat(0.0f, 0.0f, 0.0f, 1.0f);
544 next = G3D::Quat(0.0f, 0.0f, 0.0f, 1.0f);
545 percRot = 0.0f;
546}
std::uint32_t uint32
Definition: Define.h:107
TransportPathRotationContainer Rotations
Definition: TransportMgr.h:92