Go to the documentation of this file.00001
00021 #include <grasp_planning_graspit/PrintHelpers.h>
00022
00023 std::ostream& operator<<(std::ostream& o, const Eigen::Vector3f& v)
00024 {
00025 o << "[" << v[0] << ", " << v[1] << ", " << v[2] << "]";
00026 return o;
00027 }
00028
00029
00030 std::ostream& operator<<(std::ostream& o, const Eigen::Vector3d& v)
00031 {
00032 o << "[" << v[0] << ", " << v[1] << ", " << v[2] << "]";
00033 return o;
00034 }
00035
00036 std::ostream& operator<<(std::ostream& o, const Eigen::Transform<double, 3, Eigen::Affine>& t)
00037 {
00038
00039 Eigen::AngleAxisd ax(t.rotation());
00040 o << "T: trans = " << Eigen::Vector3d(t.translation()) <<
00041 " rot = " << ax.angle() << " (angle) / " << ax.axis() << " (axis)";
00042 return o;
00043 }
00044
00045 std::ostream& operator<<(std::ostream& o, const Eigen::Matrix4d& m)
00046 {
00047 o << m(0, 0) << "," << m(0, 1) << "," << m(0, 2) << "," << m(0, 3) << "," <<
00048 m(1, 0) << "," << m(1, 1) << "," << m(1, 2) << "," << m(1, 3) << "," <<
00049 m(2, 0) << "," << m(2, 1) << "," << m(2, 2) << "," << m(2, 3) << "," <<
00050 m(3, 0) << "," << m(3, 1) << "," << m(3, 2) << "," << m(3, 3);
00051 return o;
00052 }
00053