boundingshape.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  *    frankguettler@gmx.de                                                 *
00007  *                                                                         *
00008  *   This program is free software; you can redistribute it and/or modify  *
00009  *   it under the terms of the GNU General Public License as published by  *
00010  *   the Free Software Foundation; either version 2 of the License, or     *
00011  *   (at your option) any later version.                                   *
00012  *                                                                         *
00013  *   This program is distributed in the hope that it will be useful,       *
00014  *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
00015  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
00016  *   GNU General Public License for more details.                          *
00017  *                                                                         *
00018  *   You should have received a copy of the GNU General Public License     *
00019  *   along with this program; if not, write to the                         *
00020  *   Free Software Foundation, Inc.,                                       *
00021  *   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.             *
00022  ***************************************************************************
00023  *                                                                         *
00024  *  DESCRIPTION                                                            *
00025  *                                                                         *
00026  *   $Log: boundingshape.h,v $
00027  *   Revision 1.2  2006/07/14 12:23:33  martius
00028  *   selforg becomes HEAD
00029  *
00030  *   Revision 1.1.2.8  2006/06/29 16:35:56  robot3
00031  *   includes cleared up
00032  *
00033  *   Revision 1.1.2.7  2006/06/27 14:14:29  robot3
00034  *   -optimized mesh and boundingshape code
00035  *   -other changes
00036  *
00037  *   Revision 1.1.2.6  2006/06/26 21:52:58  robot3
00038  *   Mesh works now with bbox file
00039  *
00040  *   Revision 1.1.2.5  2006/06/23 08:54:40  robot3
00041  *   made some changes on primitive Mesh (including boundingshape)
00042  *
00043  *   Revision 1.1.2.4  2006/06/22 11:33:43  robot3
00044  *   moved boundingshape implementation to .cpp-file
00045  *
00046  *   Revision 1.1.2.3  2006/05/29 22:22:07  martius
00047  *   added std includes
00048  *
00049  *   Revision 1.1.2.2  2006/03/29 15:03:19  martius
00050  *   format documented
00051  *
00052  *   Revision 1.1.2.1  2006/03/29 14:51:45  martius
00053  *   class for reading bounding shape description files and creates the appropriate geoms
00054  *
00055  *   Revision 1.1.2.1  2005/12/06 17:38:21  martius
00056  *   *** empty log message ***
00057  *
00058  *                                                                         *
00059  ***************************************************************************/
00060 #ifndef __BOUNDINGSHAPE_H
00061 #define __BOUNDINGSHAPE_H
00062 
00063 #include "primitive.h"
00064 
00065 #include <list>
00066 #include <string>
00067 
00068 
00069 namespace lpzrobots {
00070   
00071   /**
00072      class for reading bounding shape description files (.bbox) and to create appropriate geoms
00073      File Format: Lines wise, every line stands for one primitive. Possible lines are:
00074      sphere radius (x,y,z)
00075      cylinder radius height (x,y,z) (alpha, beta, gamma)
00076      capsule radius height (x,y,z) (alpha, beta, gamma)
00077      box length width height (x,y,z) (alpha, beta, gamma)
00078      (x,y,z) is the position vector and (alpha, beta, gamma) are 
00079      the rotation angles about x,y,z axis respectively        
00080   */
00081 
00082   class BoundingShape{
00083 
00084   public:
00085     BoundingShape(const std::string& filename, Primitive* parent);
00086 
00087     virtual ~BoundingShape();
00088 
00089     bool readBBoxFile(std::string& filename, const OdeHandle& odeHandle, const OsgHandle& osgHandle, 
00090                       double scale, char mode);
00091       
00092     virtual bool init(const OdeHandle& odeHandle, const OsgHandle& osgHandle,
00093                       double scale, char mode);
00094     
00095     virtual bool isActive();
00096 
00097   private:
00098     std::string filename;
00099     bool active;
00100     Primitive* parent;
00101   };
00102 
00103 }
00104 
00105 #endif

Generated on Mon Aug 7 16:40:14 2006 for Robotsystem of the Robot Group Leipzig by  doxygen 1.4.7