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