Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members  

SIG_SimulationParameters.h

00001 #ifndef SIGEL_SIMULATION_SIG_SIMULATIONPARAMETERS_H
00002 #define SIGEL_SIMULATION_SIG_SIMULATIONPARAMETERS_H
00003 
00004 #include <qdatetime.h>
00005 #include <qtextstream.h>
00006 
00007 namespace SIGEL_Simulation
00008 {
00009   
00018   class SIG_SimulationParameters
00019     {
00020     public:
00021       enum SimulationLibrary {
00023         DynaMo,
00025         DynaMechs
00026       };
00027 
00028       enum DynaMechsIntegrator {
00030         Euler,
00032         RungeKutta4,
00034         RungeKutta45
00035       };
00036 
00037       enum SolveModeType {
00039        smtLUDecomposition,
00041        smtConjugateGradient,
00043        smtSingleValueDecomposition
00044       };
00045       enum IntegratorType {
00047        itEuler,
00049        itDoubleEuler,
00051        itRungeKutta2,
00053        itRungeKutta4
00054       };
00062       SIG_SimulationParameters();
00079       SIG_SimulationParameters(QTime timeToSimulate,
00080                                double stepSize,
00081                                double maximalError,
00082                                int maximalIterations,
00083                                int maximalCollisionLoops,
00084                                bool analytical, 
00085                                int skipFrames,
00086                                SolveModeType solveMode,
00087                                IntegratorType integrator,
00088                                DynaMechsIntegrator dynaMechsIntegrator,
00089                                SimulationLibrary simulationLibrary,
00090                                int maximalSOLIDIterations,
00091                                int randomSeed = 0 );
00093       SIG_SimulationParameters(QTextStream& file);
00095       void writeToFile(QTextStream& file);
00097       void readFromFile(QTextStream& file);
00098 
00103       void setTimeToSimulate(QTime newTimeToSimulate);
00104 
00109       QTime getTimeToSimulate() const;
00110 
00115       void setStepSize(double newStepSize);
00116 
00121       double getStepSize() const;
00122 
00123       void setJointLimitsK_spring( double newValue );
00124 
00125       double getJointLimitsK_spring() const;
00126 
00127       void setJointLimitsB_damper( double newValue );
00128 
00129       double getJointLimitsB_damper() const;
00130 
00131       void setJointFrictionU_c( double newValue );
00132 
00133       double getJointFrictionU_c() const;
00134 
00139       void setMaximalError(double newMaximalError);
00140 
00145       double getMaximalError() const;
00146 
00151       void setRandomSeed(int newRandomSeed);
00152 
00157       int getRandomSeed() const;
00158 
00159 
00164       void setAnalytical(bool newAnalytical);
00165 
00170       bool getAnalytical() const;
00171 
00176       void setMaximalIterations(int newMaximalIterations);
00177 
00182       int getMaximalIterations() const;
00183 
00188       void setSkipFrames(int newSkipFrames);
00189 
00194       int getSkipFrames() const;
00195 
00200       void setMaximalCollisionLoops(int newMaximalCollisionLoops);
00201 
00206       int getMaximalCollisionLoops() const;
00207 
00212       void setSolveMode(SolveModeType newSolveMode);
00213 
00218       SolveModeType getSolveMode() const;
00219 
00224       void setIntegrator(IntegratorType newIntegrator);
00225 
00230       IntegratorType getIntegrator() const;
00231 
00236       void setDynaMechsIntegrator( DynaMechsIntegrator newDynaMechsIntegrator );
00237 
00242       DynaMechsIntegrator getDynaMechsIntegrator() const;
00243 
00248       void setSimulationLibrary( SimulationLibrary newSimulationLibrary );
00249 
00254       SimulationLibrary getSimulationLibrary() const;
00255       
00259       void setMaximalSOLIDIterations(int newMaximalSOLIDIterations);
00260 
00264       int getMaximalSOLIDIterations() const;
00265     private:
00266       
00270       QTime timeToSimulate;
00271 
00275       double stepSize;
00276 
00280       double maximalError;
00281 
00282       double jointLimitsK_spring;
00283 
00284       double jointLimitsB_damper;
00285 
00286       double jointFrictionU_c;
00287 
00291       int randomSeed;
00292 
00301       bool analytical;
00302 
00308       int maximalIterations;
00309 
00314       int skipFrames;
00315 
00321       int maximalCollisionLoops;
00322 
00327       SolveModeType solveMode;
00328 
00330       IntegratorType integrator;
00331 
00333       SimulationLibrary simulationLibrary;
00334 
00338       DynaMechsIntegrator dynaMechsIntegrator;
00339       
00341       int maximalSOLIDIterations;
00342       
00343     };
00344   
00345 }
00346 
00347 #endif // SIGEL_SIMULATION_SIG_SIMULATIONPARAMETERS_H

Generated at Mon Sep 3 01:32:32 2001 for PG 368 - SIGEL by doxygen1.2.3 written by Dimitri van Heesch, © 1997-2000