Robotsystem from Robot Group Leipzig: terrainground.h Source File

- Main Page
- Modules
- Namespaces
- Classes
- Files
- Directories
- Examples

- File List
- File Members

# terrainground.h

Go to the documentation of this file.

    00001 /***************************************************************************
    00002  *   Copyright (C) 2005 by Robot Group Leipzig                             *
    00003  *    martius@informatik.uni-leipzig.de                                    *
    00004  *    fhesse@informatik.uni-leipzig.de                                     *
    00005  *    der@informatik.uni-leipzig.de                                        *
    00006  *                                                                         *
    00007  *   This program is free software; you can redistribute it and/or modify  *
    00008  *   it under the terms of the GNU General Public License as published by  *
    00009  *   the Free Software Foundation; either version 2 of the License, or     *
    00010  *   (at your option) any later version.                                   *
    00011  *                                                                         *
    00012  *   This program is distributed in the hope that it will be useful,       *
    00013  *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
    00014  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
    00015  *   GNU General Public License for more details.                          *
    00016  *                                                                         *
    00017  *   You should have received a copy of the GNU General Public License     *
    00018  *   along with this program; if not, write to the                         *
    00019  *   Free Software Foundation, Inc.,                                       *
    00020  *   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.             *
    00021  *                                                                         *
    00022  *   $Log: terrainground.h,v $
    00023  *   Revision 1.7.4.1  2006/01/12 15:12:34  martius
    00024  *   disabled for now
    00025  *
    00026  *   Revision 1.7  2005/10/25 22:22:46  martius
    00027  *   moved implementation to cpp
    00028  *   data constructor
    00029  *   store method
    00030  *   different heighmap codings
    00031  *
    00032  *   Revision 1.6  2005/09/22 13:17:11  martius
    00033  *   OdeHandle and GlobalData finished
    00034  *   doInternalStuff included
    00035  *
    00036  *   Revision 1.5  2005/09/22 12:24:36  martius
    00037  *   removed global variables
    00038  *   OdeHandle and GlobalData are used instead
    00039  *   sensor prepared
    00040  *
    00041  *   Revision 1.4  2005/09/13 13:19:32  martius
    00042  *   if image not found handled graciously
    00043  *
    00044  *   Revision 1.3  2005/09/12 14:32:08  martius
    00045  *   use new texture interface
    00046  *
    00047  *   Revision 1.2  2005/09/08 14:28:25  robot2
    00048  *   *** empty log message ***
    00049  *
    00050  *   Revision 1.1  2005/08/26 09:22:23  robot2
    00051  *   terrain
    00052  *
    00053  *   Revision 1.8  2005/08/02 14:09:06  fhesse
    00054  *   factor between length in x and y direction
    00055  *   added to constructor
    00056  *
    00057  *   Revision 1.7  2005/07/29 14:27:59  martius
    00058  *   color set to some red
    00059  *
    00060  *   Revision 1.6  2005/07/18 14:52:33  martius
    00061  *   world and space are not pointers anymore.
    00062  *
    00063  *   Revision 1.5  2005/07/07 10:24:23  martius
    00064  *   avoid internal collisions
    00065  *
    00066  *   Revision 1.4  2005/06/15 14:22:11  martius
    00067  *   GPL included
    00068  *                                                                 *
    00069  ***************************************************************************/
    00070 #ifndef __TERRAINGROUND_H
    00071 #define __TERRAINGROUND_H
    00072
    00073
    00074 /* #include "abstractobstacle.h" */
    00075 /* #include "imageppm.h" */
    00076
    00077 /* //Fixme: Terrainground creates collisions with ground and itself */
    00078 /* class Terrainground : public AbstractObstacle { */
    00079
    00080 /*   double base_x, base_y, base_z; */
    00081
    00082 /*   ImagePPM heightmap; */
    00083
    00084 /*   bool obstacle_exists; */
    00085
    00086 /*   dGeomID terrainZ; */
    00087 /*   char *filename; */
    00088 /*   int TERRAINNODES;  // only in one direction */
    00089 /*   double *pTerrainHeights; */
    00090
    00091 /*   double size;  // size in world coordinated (in both directions) */
    00092 /*   double height; */
    00093 /*   int displayListNumber; */
    00094 /*   int texture; */
    00095
    00096 /* public: */
    00097 /*   /// height coding using in the read in bitmap.  */
    00098 /*   // Red: just the red channel is used; */
    00099 /*   // Sum: the sum of all channels is used; */
    00100 /*   // HighMidLow: Blue is least significant, Green is medium significant and Red is most significant */
    00101 /*   typedef enum CodingMode {Red, Sum, LowMidHigh}; */
    00102
    00103 /*   /// Constructor */
    00104 /*   // @param size size in world coordinates (in both directions) */
    00105 /*   // @param height height in world coordinates */
    00106 /*   Terrainground(const OdeHandle& odehandle, double size, double height, char *filename,  */
    00107 /*              CodingMode codingMode=Red); */
    00108 /*   virtual ~Terrainground(); */
    00109
    00110 /*   void setTextureID(int t);  */
    00111
    00112 /*   // draws the obstacle (terrain)    */
    00113 /*   virtual void draw();   */
    00114
    00115 /*   virtual void setPosition(double x, double y, double z); */
    00116
    00117 /*   virtual void getPosition(double& x, double& y, double& z); */
    00118
    00119 /*   virtual void setGeometry(double length_, double width_, double height_); */
    00120
    00121 /*   virtual void setColor(double r, double g, double b); */
    00122
    00123 /* protected: */
    00124 /*   virtual void create(); */
    00125
    00126 /*   virtual void destroy(); */
    00127
    00128 /*   // return the height using the giben coding mode. The data pointer points at the red channel */
    00129 /*   static double coding(CodingMode mode, const unsigned char* data); */
    00130
    00131
    00132 /* }; */
    00133
    00134 #endif