BaseGeom.hh
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027 #ifndef BASEGEOM_HH
00028 #define BASEGEOM_HH
00029
00030 #include <ode/ode.h>
00031 #include "Vector.hh"
00032
00033 class Body;
00034 class ContactParams;
00035
00036
00042 class BaseGeom
00043 {
00044
00045 public: BaseGeom( dSpaceID spaceId );
00046
00047
00048 public: virtual ~BaseGeom();
00049
00051 public: void SetGeom( Body *body, dGeomID geomId, dMass *mass, bool placeable);
00052
00053
00054 protected: void SetExtraRotation( GzQuatern rot );
00055
00056
00057 public: dGeomID GetTransId() const;
00058 public: dGeomID GetGeomId() const;
00059
00060
00061 public: void SetCategoryBits( uint bits );
00062
00063
00064 public: void SetCollideBits( uint bits );
00065
00067 public: virtual void SetRelativePose( GzPose pose, bool updateCoM = true );
00068
00070 public: virtual GzPose GetRelativePose() const;
00071
00073 public: GzPose GetPose() const;
00074
00076 public: void SetRelativePosition( GzVector pos );
00077
00079 public: void SetRelativeRotation( GzQuatern rot );
00080
00084 public: void SetHardness( double kp, double kd );
00085
00089 public: void SetFriction( double mu1, double mu2 );
00090
00091
00092 public: void SetBounce( double bounce );
00093 public: void SetSlip1( double slip );
00094 public: void SetSlip2( double slip );
00095
00096
00097 public: double GetBounce() const;
00098 public: double GetSlip1() const;
00099 public: double GetSlip2() const;
00100
00101
00102 public: void SetMass( double m );
00103
00104
00105 public: const dMass *GetBodyMassMatrix();
00106
00107
00108 public: Body *body;
00109
00110
00111 protected: dSpaceID spaceId;
00112
00113
00114 protected: dGeomID transId, geomId;
00115
00116
00117 protected: dMass geomMass, bodyMass;
00118
00119
00120 public: bool placeableGeom;
00121
00122
00123 private: GzPose dummyPose;
00124
00125
00126
00127 private: GzQuatern extraRotation;
00128
00129
00130 protected: ContactParams *contact;
00131
00132
00133 friend class World;
00134 };
00135
00136 #endif
00137
Last updated 12 September 2005 21:38:45
|