Home
FAQ
Player
Utilities
Stage
Gazebo
Contrib
Documentation
Publications
Contributors
Users

Project
Download
Bugs/Feedback
Mailing lists

Radish

Old news
Old stuff

ObserverCam.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: An Observer camera model 
00022  * Author: Nate Koenig
00023  * Date: 20 May 2004
00024  * CVS: $Id: ObserverCam.hh,v 1.13 2004/11/15 22:19:45 inspectorg Exp $
00025  */
00026 
00027 #ifndef OBSERVERCAM_HH
00028 #define OBSERVERCAM_HH
00029 
00030 #include "Model.hh"
00031 
00032 class Camera;
00033 class ObserverWindow;
00034 class HUDElementText;
00035 typedef struct gz_guicam gz_guicam_t;
00036 
00037 
00038 class ObserverCam : public Model
00039 {
00040   // Constructor
00041   public: ObserverCam( World *world);
00042 
00043   // Destructor
00044   public: virtual ~ObserverCam();
00045 
00046   // Load the model
00047   public: virtual int Load( WorldFile *file, WorldFileNode *node );
00048 
00049   // Initialize the model
00050   public: virtual int Init( WorldFile *file, WorldFileNode *node );
00051 
00052   // Finalize the model
00053   public: virtual int Fini();
00054 
00055   // Update the model state
00056   public: virtual void Update( double step );
00057 
00058   // Get camera commands
00059   private: void GetCameraCmd();
00060 
00061   // Send camera data
00062   private: void PutCameraData();
00063 
00064   // Time in seconds between updates
00065   private: double updatePeriod;
00066 
00067   // The time the last update occured
00068   private: double lastSimTime;
00069   private: double lastPauseTime;
00070 
00071   // A dummy body (every model must have one)
00072   private: Body *body;
00073 
00074   // Camera sensor
00075   private: Camera *camera;
00076 
00077   // Interface
00078   private: gz_guicam_t *guicam;
00079 
00080   // Spot state (tracking, not tracking)
00081   private: int cmdSpotState, lastSpotState;
00082 
00083   // Spot mode (translation, zoom, rotation)
00084   private: int cmdSpotMode;
00085     
00086   // Commanded spot transform
00087   private: GzVector cmdSpotA, cmdSpotB;
00088 
00089   // Initial pose
00090   private: GzPose initialPose;
00091 
00092   // Lock out roll changes?
00093   private: bool rollLock;
00094 
00095   // Save frames to disk?
00096   private: bool saveFrames;
00097 
00098   // Current rendering options
00099   private: RenderOptions renderOpt;
00100 };
00101 
00102 #endif


Last updated $Date: 2004/12/21 01:49:15 $
Generated on Sun May 22 18:39:08 2005 for Gazebo by doxygen 1.4.2