00001 #ifndef SIGEL_ENVIRONMENT_SIG_ENVIRONMENT_H 00002 #define SIGEL_ENVIRONMENT_SIG_ENVIRONMENT_H 00003 00004 #include "constraint.h" 00005 #include <qtextstream.h> 00006 #include <qstring.h> 00007 00008 00010 namespace SIGEL_Environment 00011 { 00012 00019 class SIG_Environment { 00020 public: 00021 00027 SIG_Environment(); 00028 00038 SIG_Environment(DL_vector newGravity, double newYPlaneLevel, double newVeloDamping, 00039 DL_vector newStartPosition, QString newFloorMaterialName, 00040 double newGroundPlanarSpringConstant, double newGroundPlanarSpringConstant, 00041 double newGroundPlanarDamperConstant, double newGroundNormalDamperConstant, 00042 double newFrictionCoeff_u_s, double newFrictionCoeff_u_k); 00043 00051 SIG_Environment(QTextStream& file); 00052 00060 void writeToFile(QTextStream& file); 00061 00069 void readFromFile(QTextStream& file); 00070 00078 void setGravity(DL_vector newGravity); 00079 00085 DL_vector getGravity() const; 00086 00094 void setVeloDamping(double newVeloDamping); 00095 00101 double getVeloDamping() const; 00102 00110 void setYPlaneLevel(double newYPlaneLevel); 00111 00117 double getYPlaneLevel() const; 00118 00126 void setStartPosition(DL_vector newStartPosition); 00127 00133 DL_vector getStartPosition() const; 00134 00142 void setFloorMaterialName(QString newFloorMaterialName); 00143 00149 QString getFloorMaterialName() const; 00150 00158 void setGroundPlanarSpringConstant(double newGroundPlanarSpringConstant); 00159 00165 double getGroundPlanarSpringConstant() const; 00166 00174 void setGroundNormalSpringConstant(double newGroundNormalSpringConstant); 00175 00181 double getGroundNormalSpringConstant() const; 00182 00190 void setGroundPlanarDamperConstant(double newGroundPlanarDamperConstant); 00191 00197 double getGroundPlanarDamperConstant() const; 00198 00206 void setGroundNormalDamperConstant(double newGroundNormalDamperConstant); 00207 00213 double getGroundNormalDamperConstant() const; 00214 00222 void setFrictionCoeff_u_s(double newFrictionCoeff_u_s); 00223 00229 double getFrictionCoeff_u_s() const; 00230 00238 void setFrictionCoeff_u_k(double newFrictionCoeff_u_k); 00239 00245 double getFrictionCoeff_u_k() const; 00246 00247 00248 private: 00250 double yPlaneLevel; 00252 DL_vector gravity; 00254 double veloDamping; 00256 DL_vector startPosition; 00258 QString floorMaterialName; 00259 00261 double groundPlanarSpringConstant; 00263 double groundNormalSpringConstant; 00265 double groundPlanarDamperConstant; 00267 double groundNormalDamperConstant; 00269 double frictionCoeff_u_s; 00271 double frictionCoeff_u_k; 00272 }; 00273 00274 } 00275 00276 #endif // SIGEL_ENVIRONMENT_SIG_ENVIRONMENT_H 00277 00278