src/Vec3f.cpp

Go to the documentation of this file.
00001 
00002 #include <iostream>
00003 #include <iomanip>
00004 
00005 #include "Vec3f.h"
00006 #include "SkipString.h"
00007 
00008 
00011 std::ostream & operator<<(std::ostream & o, const Vec3f & w)
00012 {
00013     o << "(" << std::setprecision(3) << std::setw(4) << w.mValues[0]
00014         << ", " << std::setw(4) << w.mValues[1] << ", "
00015         << std::setw(4) << w.mValues[2] << " )";
00016     return o;
00017 }
00018 
00019 
00022 std::istream & operator>>(std::istream & i, Vec3f & w)
00023 {
00024     float x, y, z;
00025     i >> std::ws;
00026     i >> SkipString("Vec3f(");
00027     i >> std::ws >> x >> std::ws >> SkipString(",");
00028     i >> std::ws >> y >> std::ws >> SkipString(",");
00029     i >> std::ws >> z >> std::ws >> SkipString(")");
00030 //    LOG("(" << x << " " << y << " " << z << ")");
00031     w = Vec3f(x, y, z);
00032     return i;
00033 }
00034 
00035 

Generated on Fri Feb 1 00:01:42 2008 for Grayfall by  doxygen 1.5.1