Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

Representations/Perception/CameraMatrix.cpp

Go to the documentation of this file.
00001 /**
00002  * @file CameraMatrix.cpp
00003  *
00004  * Implementation of class CameraMatrix.
00005  */
00006 
00007 #include "CameraMatrix.h"
00008 #include "Tools/Streams/Streamable.h"
00009 
00010 In& operator>>(In& stream,CameraMatrix& cameraMatrix)
00011 {
00012   // This is a hack to read the validity of the matrix without changing the format
00013   /*
00014   stream >> (Pose3D&)cameraMatrix;
00015   cameraMatrix.isValid = cameraMatrix.translation.z >= 0;
00016   if(!cameraMatrix.isValid)
00017     cameraMatrix.translation.z = -cameraMatrix.translation.z;
00018 //  stream >> cameraMatrix.frameNumber;
00019   cameraMatrix.frameNumber = 0;
00020   */
00021   STREAM_REGISTER_BEGIN_EXT( cameraMatrix);
00022   STREAM_BASE_EXT( stream, (Pose3D&)cameraMatrix);
00023   STREAM_EXT( stream, cameraMatrix.isValid);
00024   STREAM_EXT( stream, cameraMatrix.frameNumber);
00025   STREAM_REGISTER_FINISH();
00026   cameraMatrix.frameNumber = 0;
00027   return stream;
00028 }
00029  
00030 Out& operator<<(Out& stream, const CameraMatrix& cameraMatrix)
00031 {
00032   STREAM_REGISTER_BEGIN_EXT( cameraMatrix);
00033   STREAM_BASE_EXT( stream, (Pose3D&)cameraMatrix);
00034   STREAM_EXT( stream, cameraMatrix.isValid);
00035   STREAM_EXT( stream, cameraMatrix.frameNumber);
00036   STREAM_REGISTER_FINISH();
00037   // This is a hack to store the validity of the matrix without changing the format
00038   /*
00039   Pose3D pose = cameraMatrix;
00040   if(!cameraMatrix.isValid)
00041     pose.translation.z = -pose.translation.z;
00042   stream << pose;
00043   */
00044 //  stream << cameraMatrix.frameNumber;
00045   return stream;
00046 }

Generated on Mon Mar 20 22:00:02 2006 for GT2005 by doxygen 1.3.6