00001
00002
00003
00004
00005
00006
00007
00008
00009
00010 #ifndef NO_IOSTREAM
00011 #include <iostream.h>
00012 #include "posemath.h"
00013 #include "mathprnt.h"
00014
00015
00016
00017 ostream & operator << (ostream & stream, PM_CARTESIAN v)
00018 {
00019 stream << v.x << "\t" << v.y << "\t" << v.z ;
00020
00021 return stream;
00022 }
00023
00024 ostream & operator << (ostream & stream, PM_SPHERICAL s)
00025 {
00026 stream << s.theta << "\t" << s.phi << "\t" << s.r ;
00027
00028 return stream;
00029 }
00030
00031 ostream & operator << (ostream & stream, PM_CYLINDRICAL c)
00032 {
00033 stream << c.theta << "\t" << c.r << "\t" << c.z ;
00034
00035 return stream;
00036 }
00037
00038 ostream & operator << (ostream & stream, PM_QUATERNION q)
00039 {
00040 stream << q.s << "\t" << q.x << "\t" << q.y << "\t" << q.z ;
00041
00042 return stream;
00043 }
00044
00045 ostream & operator << (ostream & stream, PM_ROTATION_VECTOR r)
00046 {
00047 stream << r.s << "\t" << r.x << "\t" << r.y << "\t" << r.z ;
00048
00049 return stream;
00050 }
00051
00052 ostream & operator << (ostream & stream, PM_ROTATION_MATRIX m)
00053 {
00054 int row, col;
00055
00056 for (col = 0; col < 3; col++)
00057 {
00058 for (row = 0; row < 3; row++)
00059 {
00060 stream << m[row][col] << "\t";
00061 }
00062 stream << endl;
00063 }
00064
00065 return stream;
00066 }
00067
00068 ostream & operator << (ostream & stream, PM_EULER_ZYZ zyz)
00069 {
00070 stream << zyz.z << "\t" << zyz.y << "\t" << zyz.zp ;
00071
00072 return stream;
00073 }
00074
00075 ostream & operator << (ostream & stream, PM_EULER_ZYX zyx)
00076 {
00077 stream << zyx.z << "\t" << zyx.y << "\t" << zyx.x ;
00078
00079 return stream;
00080 }
00081
00082 ostream & operator << (ostream & stream, PM_RPY rpy)
00083 {
00084 stream << rpy.r << "\t" << rpy.p << "\t" << rpy.y ;
00085
00086 return stream;
00087 }
00088
00089 ostream & operator << (ostream & stream, PM_POSE pose)
00090 {
00091 stream << pose.tran << "\t" << pose.rot ;
00092
00093 return stream;
00094 }
00095
00096 ostream & operator << (ostream & stream, PM_HOMOGENEOUS hom)
00097 {
00098 int row, col;
00099
00100 for (col = 0; col < 4; col++)
00101 {
00102 for (row = 0; row < 4; row++)
00103 {
00104 stream << hom[row][col] << "\t";
00105 }
00106 stream << endl;
00107 }
00108
00109 return stream;
00110 }
00111
00112
00113 #endif