Lagrangian Liquid Simulation
Master Thesis project on simulation of liquids using Lagrangian approach and SPH
|
00001 #ifndef CONFIGURATION_H 00002 #define CONFIGURATION_H 00003 00004 #include <iostream> 00005 #include "vector" 00006 00007 #include "ngl/Camera.h" 00008 #include "ngl/SpotLight.h" 00009 #include "ngl/Colour.h" 00010 00011 #include "ShaderObject.h" 00012 #include "Particle.h" 00013 #include "FluidParticle.h" 00014 #include "Capsule.h" 00015 00016 00026 00027 class Configuration 00028 { 00029 public: 00031 static bool s_debug; 00032 00034 static ngl::Real s_accelerationOfFreeFall; 00035 00037 static ngl::Colour s_normalColour; 00038 00040 static ngl::Colour s_boundaryColour; 00041 00043 static int s_nextParticleId; 00044 00046 static int s_nextObstacleId; 00047 00048 public : 00061 static void initialiseWindow 00062 ( 00063 int& o_frameRate, 00064 int& o_mouseMoveSensitivity, 00065 ngl::Real& o_timestep, 00066 bool& o_fpsTimerEnabled, 00067 bool& o_cacheEnabled, 00068 int& o_cacheSamplingInterval, 00069 bool& o_cacheAutomaticFlushEnabled, 00070 int& o_cacheAutomaticFlushInterval, 00071 bool& o_cacheExportRBDEnabled, 00072 bool& o_cacheExportBoundaryEnabled, 00073 std::string& o_path 00074 ); 00075 00078 static ngl::Camera initialiseCamera(const float _aspect); 00079 00081 static ngl::Light initialiseLight(); 00082 00084 static std::vector<ShaderObject*>* initialiseShader(); 00085 00101 static void initialiseEnvironment 00102 ( 00103 bool &o_obstacleEnabled, 00104 ngl::Vector &o_boundaryPosition, 00105 ngl::Vector &o_boundaryDimension, 00106 ngl::Real& o_boundaryRestitutionCoefficientForFluid, 00107 ngl::Real& o_boundaryRestitutionCoefficientForRBD, 00108 bool& o_boundaryBoundTop, 00109 std::vector<Particle>& o_sphereObstacleList, 00110 std::vector<Capsule>& o_capsuleObstacleList, 00111 ngl::Real& o_obstacleRestitutionCoefficient, 00112 bool& o_periodicWallEnabled, 00113 ngl::Real& o_periodicWallMaxAmplitude, 00114 ngl::Real& o_periodicWallSpeed, 00115 ngl::Real& o_periodicWallAngleIncrement, 00116 int& o_capsuleResolution 00117 ); 00118 00129 static void initialiseFluidSolver 00130 ( 00131 ngl::Real& o_smoothingLength, 00132 std::vector<FluidParticle>& o_particleList, 00133 std::vector<FluidParticle>& o_hoseParticlePrototypeList, 00134 std::vector<FluidParticle>& o_hoseParticleList, 00135 ngl::Vector& o_centerOfHose, 00136 ngl::Vector& o_velocityOfHose, 00137 bool& o_drawHoseMarker, 00138 bool& o_hoseWaitUntilFirstHitBoundary, 00139 bool& o_hoseWaitUntilFirstHitRBD 00140 ); 00141 00142 00143 00144 private: 00146 static std::string s_settingsDoc; 00147 00148 private: 00152 static std::vector<ngl::Real> getFloatVectorFromString 00153 ( 00154 const std::string _str, 00155 const int _d 00156 ); 00157 00158 00159 }; 00160 00161 #endif // CONFIGURATION_H