Gazebo logo

MonoCam.hh

Go to the documentation of this file.
00001 /*
00002  *  Gazebo - Outdoor Multi-Robot Simulator
00003  *  Copyright (C) 2003  
00004  *     Nate Koenig & Andrew Howard
00005  *
00006  *  This program is free software; you can redistribute it and/or modify
00007  *  it under the terms of the GNU General Public License as published by
00008  *  the Free Software Foundation; either version 2 of the License, or
00009  *  (at your option) any later version.
00010  *
00011  *  This program is distributed in the hope that it will be useful,
00012  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
00013  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00014  *  GNU General Public License for more details.
00015  *
00016  *  You should have received a copy of the GNU General Public License
00017  *  along with this program; if not, write to the Free Software
00018  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00019  *
00020  */
00021 /* Desc: A very simple generic monocular camera
00022  * Author: Andrew Howard (re-write from scratch)
00023  * Date: 15 Nov 2005
00024  * CVS: $Id: MonoCam.hh,v 1.8 2004/11/16 07:03:12 inspectorg Exp $
00025  */
00026 
00027 #ifndef MONOCAM_HH
00028 #define MONOCAM_HH
00029 
00030 #include "Body.hh"
00031 #include "Model.hh"
00032 
00033 // Forward declarations
00034 class Camera;
00035 class FrustrumGeom;
00036 
00037 
00038 class MonoCam : public Model
00039 {
00040   // Constructor, destructor
00041   public: MonoCam( World *world );
00042   public: virtual ~MonoCam();
00043   
00044   // Load the model
00045   public: virtual int Load( WorldFile *file, WorldFileNode *node );
00046 
00047   // Initialize the model
00048   public: virtual int Init( WorldFile *file, WorldFileNode *node );
00049 
00050   // Finalize the model
00051   public: virtual int Fini();
00052 
00053   // Update the model state
00054   public: virtual void Update( double step );
00055 
00056   // Load ODE stuff
00057   private: int OdeLoad( WorldFile *file, WorldFileNode *node );
00058 
00059   // Update the data in the external interface
00060   private: void PutCameraData();
00061 
00062   // Frustrum for GUI feedback
00063   private: FrustrumGeom *frustrum;
00064 
00065   // External interfaces
00066   private: gz_camera_t *cameraIface;
00067 
00068   // Horizontal field of view
00069   private: double hfov;
00070     
00071   // The camera sensor (does rendering)
00072   private: Camera *camera;
00073 
00074   // Time between camera updates
00075   private: double updatePeriod;
00076   private: double updateTime;
00077 
00078   // ODE objects
00079   private: Body *body;
00080   private: Geom *imager;
00081 };
00082 
00083 #endif
00084 

Last updated 12 September 2005 21:38:45