Page principale | Liste des namespaces | Hiérarchie des classes | Liste par ordre alphabétique | Liste des composants | Liste des fichiers | Composants | Déclarations

Geometry.h

Aller à la documentation de ce fichier.
00001 /*=========================================================================
00002 UberSim Source Code Release
00003 -------------------------------------------------------------------------
00004 Copyright (C) 2002 Manuela Veloso, Brett Browning, Mike Bowling,
00005                    James Bruce; {mmv, brettb, mhb, jbruce}@cs.cmu.edu
00006                    Erick Tryzelaar {erickt}@andrew.cmu.edu
00007 School of Computer Science, Carnegie Mellon University
00008 -------------------------------------------------------------------------
00009 This software is distributed under the GNU General Public License,
00010 version 2.  If you do not have a copy of this licence, visit
00011 www.gnu.org, or write: Free Software Foundation, 59 Temple Place,
00012 Suite 330 Boston, MA 02111-1307 USA.  This program is distributed
00013 in the hope that it will be useful, but WITHOUT ANY WARRANTY,
00014 including MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
00015 -------------------------------------------------------------------------*/
00016 
00017 #ifndef __SIM_GEOMETRY_H__
00018 #define __SIM_GEOMETRY_H__
00019 
00020 #include "nommgr.h"
00021 #include <ode/ode.h>
00022 #include "mmgr.h"
00023 
00024 #include "Spatial.h"
00030 class CollisionController;
00031 
00032 class Geometry : public Spatial
00033 {
00034     public:
00035         Geometry          (char* name = "Geometry");
00036         virtual ~Geometry ();
00037 
00038     public:
00039         CollisionController* getCollisionController ();
00040         
00041         dGeomID&        getGeometry ();
00042         BoundingSphere& getModelBound ();
00043     
00044         void setCollisionController (CollisionController* collisionController);
00045         
00046         void setGeometry   (const dGeomID&        geometry);
00047         void setModelBound (const BoundingSphere& boundingSphere);
00048         void setColor      (const Vector3&        color);
00049 
00050     public:
00051         virtual void updateWorldData  (Real deltaTime);
00052         virtual void updateWorldBound ();
00053         virtual void draw             ();
00054     virtual void print            ();
00055     virtual void collidingWith    (Spatial* object);
00056 
00057     protected:
00058         CollisionController* collisionController;
00059         
00060         BoundingSphere modelBound;
00061         
00062         dGeomID geometry;
00063         Vector3 color;
00064 };
00065 
00066 #endif

Généré le Mon Mar 1 01:29:41 2004 par doxygen 1.3.3