Thread Previous • Date Previous • Date Next • Thread Next |
(sorry for first etc...) chiara modenese a écrit :
// Apply gravity gradually Vector3r gmax=Vector3r(0,-9810,0); Vector3r deltag=Vector3r(0,0,0); deltag=gmax/100; // apply the gravity in 100 steps if (fabs(g[1])<fabs(gmax[1])) { g=g+deltag; } else { Omega::instance().stopSimulationLoop(); }
Where are these lines ? In TriaxialCompressionEngine.cpp ? And those :
gravityCondition->gravity = triaxialcompressionEngine->g; // set gravity to the value in triaxialcompressionEnginerootBody->engines.push_back(gravityCondition);
In TriaxialTest.cpp (function generate) ?If yes it's normal that it does not work at all... Because here you define (see what's going on with "generate" of the TriaxialTest) a simulation taking into account gravity, but with a value of g equals to (vector) zero...
What you wrote in TriaxialCompressionEngine (=first lines I quoted) can not modify the value of gravity applied by the GravityEngine (it even does not access to this Engine), which remains thus equal to 0...
Jerome
Thread Previous • Date Previous • Date Next • Thread Next |