Tekkotsu Homepage
Demos
Overview
Downloads
Dev. Resources
Reference
Credits

MoCapEvent.cc

Go to the documentation of this file.
00001 #include "MoCapEvent.h"
00002 #include "Shared/RobotInfo.h"
00003 #include <stdexcept>
00004 
00005 const fmat::Column<3>& MoCapEvent::getPosition(unsigned int frameIdx) const {
00006   std::map<unsigned int, fmat::Column<3> >::const_iterator it=positions.find(frameIdx);
00007   if(it==positions.end())
00008     throw std::out_of_range(std::string("MoCapEvent::getPosition() failed for ")+outputNames[frameIdx]);
00009   return it->second;
00010 }
00011 
00012 const fmat::Quaternion& MoCapEvent::getOrientation(unsigned int frameIdx) const {
00013   std::map<unsigned int, fmat::Quaternion >::const_iterator it=orientations.find(frameIdx);
00014   if(it==orientations.end())
00015     throw std::out_of_range(std::string("MoCapEvent::getOrientation() failed for ")+outputNames[frameIdx]);
00016   return it->second;
00017 }
00018 
00019 /*! @file
00020  * @brief Implements MoCapEvent, an event for communicating localization information
00021  * @author ejt (Creator)
00022  */

Tekkotsu v5.1CVS
Generated Mon May 9 04:58:45 2016 by Doxygen 1.6.3