Gazebo

Geom.hh

00001 #ifndef GEOM_HH
00002 #define GEOM_HH
00003 
00004 #include <ode/ode.h>
00005 
00006 #include "Entity.hh"
00007 #include "Pose3d.hh"
00008 #include "Vector3.hh"
00009 
00010 namespace Ogre
00011 {
00012   class Entity;
00013   class MaterialPtr;
00014   class MovableObject;
00015   class SceneNode;
00016 }
00017 
00018 namespace gazebo
00019 {
00020 
00021   class Body;
00022   class ContactParams;
00023   class XMLConfigNode;
00024 
00028 
00030   class Geom : public Entity
00031   {
00032   
00034     //public: Geom(Body *body, const std::string &name);
00035     public: Geom(Body *body);
00036   
00038     public: virtual ~Geom();
00039 
00041     public: virtual void Load(XMLConfigNode *node);
00042 
00044     protected: virtual void LoadChild(XMLConfigNode *node) = 0;
00045   
00047     public: void SetGeom(dGeomID geomId, bool placeable);
00048   
00050     public: void Update();
00051 
00053     public: virtual void UpdateChild() {};
00054   
00057     public: dGeomID GetGeomId() const;
00058   
00061     public: dGeomID GetTransId() const;
00062   
00064     public: int GetGeomClass() const;
00065   
00067     public: bool IsPlaceable() const;
00068   
00072     public: void SetPose(const Pose3d &pose, bool updateCoM=true);
00073   
00075     public: Pose3d GetPose() const;
00076   
00079     public: void SetPosition(const Vector3 &pos);
00080   
00083     public: void SetRotation(const Quatern &rot);
00084   
00087     public: void AttachMesh(const std::string &meshName);
00088   
00091     public: void AttachObject( Ogre::MovableObject *obj );
00092   
00095     public: void ScaleMesh(const Vector3 &scale);
00096   
00099     public: void SetCastShadows(bool enable);
00100   
00102     public: void SetMeshMaterial(const std::string &materialName);
00103   
00106     public: void SetCategoryBits(unsigned int bits);
00107   
00110     public: void SetCollideBits(unsigned int bits);
00111   
00113     public: const dMass *GetBodyMassMatrix();
00114   
00116     public: void SetLaserFiducialId(int id);
00117   
00119     public: int GetLaserFiducialId() const;
00120   
00122     public: void SetLaserRetro(float retro);
00123   
00125     public: float GetLaserRetro() const;
00126   
00128     public: ContactParams *contact; 
00129   
00131     protected: Body *body;
00132   
00133     private: bool placeable;
00134 
00136     protected: Ogre::MovableObject *ogreObj;
00137 
00139     protected: Ogre::MovableObject *odeObj;
00140   
00142     protected: dGeomID transId;
00143 
00145     protected: dGeomID geomId;
00146   
00147     private: static int geomIdCounter;
00148   
00150     protected: dMass mass;
00151 
00153     protected: dMass bodyMass;
00154  
00156     protected: Quatern extraRotation;
00157   
00158     private: int laserFiducialId;
00159     private: float laserRetro;
00160 
00162     protected: std::string meshName;
00163 
00165     protected: double dblMass;
00166 
00167     private: Ogre::SceneNode *boundingBoxNode;
00168   };
00169 
00171 
00172 }
00173 #endif

Last updated Aug 04 2007