invisibleprimitive.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  ***************************************************************************
00023  *                                                                         *
00024  *   This file provides basic primitives for ODE and openscenegraph        *
00025  *                                                                         *
00026  *                                                                         *
00027  *   $Log: invisibleprimitive.h,v $
00028  *   Revision 1.1.2.2  2006/01/12 14:21:00  martius
00029  *   drawmode, material
00030  *
00031  *   Revision 1.1.2.1  2006/01/10 16:06:30  martius
00032  *   invisible primitives
00033  *
00034  *                                                                 *
00035  *                                                                         *
00036  ***************************************************************************/
00037 #ifndef __INVISIBLEPRIMITIVE_H
00038 #define __INVISIBLEPRIMITIVE_H
00039 
00040 #include "primitive.h"
00041 
00042 namespace lpzrobots {
00043 
00044 /**************************************************************************/
00045 class InvisibleBox : public Primitive {
00046 public:
00047 
00048   InvisibleBox(float lengthX, float lengthY, float lengthZ);
00049   virtual void init(const OdeHandle& odeHandle, double mass,
00050                     const OsgHandle& osgHandle,
00051                     char mode = Body | Geom | Draw);
00052   virtual void update() {}
00053   virtual OSGPrimitive* getOSGPrimitive() { return 0; }
00054 
00055 protected:
00056   float lengthX;
00057   float lengthY;
00058   float lengthZ;  
00059 };
00060 
00061 
00062 /**************************************************************************/
00063 class InvisibleSphere : public Primitive {
00064 public:
00065   InvisibleSphere(float radius);
00066   virtual void init(const OdeHandle& odeHandle, double mass, 
00067                     const OsgHandle& osgHandle,
00068                     char mode = Body | Geom | Draw);
00069 
00070   virtual void update() {}
00071   virtual OSGPrimitive* getOSGPrimitive() { return 0; }
00072 
00073 protected:
00074   float radius;
00075 };
00076 
00077 /**************************************************************************/
00078 class InvisibleCapsule : public Primitive {
00079 public:
00080   InvisibleCapsule(float radius, float height);
00081   virtual void init(const OdeHandle& odeHandle, double mass,
00082                     const OsgHandle& osgHandle,
00083                     char mode = Body | Geom | Draw);
00084 
00085   virtual void update() {}
00086   virtual OSGPrimitive* getOSGPrimitive() { return osgcapsule; }
00087 
00088 protected:
00089   OSGCapsule* osgcapsule;
00090   float radius;
00091   float height;
00092 };
00093 
00094 }
00095 #endif
00096 

Generated on Tue Apr 4 19:05:03 2006 for Robotsystem from Robot Group Leipzig by  doxygen 1.4.5