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 
00009 In& operator>>(In& stream,CameraMatrix& cameraMatrix)
00010 {
00011   // This is a hack to read the validity of the matrix without changing the format
00012   stream.read(&(Pose3D&)cameraMatrix,sizeof(Pose3D));
00013   cameraMatrix.isValid = cameraMatrix.translation.z >= 0;
00014   if(!cameraMatrix.isValid)
00015     cameraMatrix.translation.z = -cameraMatrix.translation.z;
00016 //  stream >> cameraMatrix.frameNumber;
00017   cameraMatrix.frameNumber = 0;
00018   return stream;
00019 }
00020  
00021 Out& operator<<(Out& stream, const CameraMatrix& cameraMatrix)
00022 {
00023   // This is a hack to store the validity of the matrix without changing the format
00024   Pose3D pose = cameraMatrix;
00025   if(!cameraMatrix.isValid)
00026     pose.translation.z = -pose.translation.z;
00027   stream.write(&pose,sizeof(Pose3D));
00028 //  stream << cameraMatrix.frameNumber;
00029   return stream;
00030 }
00031 
00032 /*
00033  * Change log :
00034  * 
00035  * $Log: CameraMatrix.cpp,v $
00036  * Revision 1.1.1.1  2004/05/22 17:25:44  cvsadm
00037  * created new repository GT2004_WM
00038  *
00039  * Revision 1.2  2003/11/14 19:02:25  goehring
00040  * frameNumber added
00041  *
00042  * Revision 1.1  2003/10/07 10:09:36  cvsadm
00043  * Created GT2004 (M.J.)
00044  *
00045  * Revision 1.1.1.1  2003/07/02 09:40:22  cvsadm
00046  * created new repository for the competitions in Padova from the 
00047  * tamara CVS (Tuesday 2:00 pm)
00048  *
00049  * removed unused solutions
00050  *
00051  * Revision 1.2  2003/04/01 16:51:09  roefer
00052  * CameraMatrix contains validity and is calculated in Geometry
00053  *
00054  * Revision 1.1  2002/09/10 15:26:40  cvsadm
00055  * Created new project GT2003 (M.L.)
00056  * - Cleaned up the /Src/DataTypes directory
00057  * - Removed Challenge Code
00058  * - Removed processing of incoming audio data
00059  * - Renamed AcousticMessage to SoundRequest
00060  *
00061  * Revision 1.1.1.1  2002/05/10 12:40:13  cvsadm
00062  * Moved GT2002 Project from ute to tamara.
00063  *
00064  * Revision 1.5  2002/04/02 13:10:18  dueffert
00065  * big change: odometryData and cameraMatrix in image now, old logfiles may be obsolete
00066  *
00067  * Revision 1.4  2002/01/18 12:24:42  mkunz
00068  * camera matrix changed
00069  *
00070  * Revision 1.3  2001/12/10 17:47:05  risler
00071  * change log added
00072  *
00073  */

Generated on Thu Sep 23 19:57:36 2004 for GT2004 by doxygen 1.3.6