摘要:
Following code snippet resides in the buoyancy force generator. 1 void ParticleBuoyancy::updateForce(Particle* particle, real duration) 2 { 3 // Calculate the submersion depth. 4 real depth = particle->getPosition().y; 5 // Check if we’re out of the water. 6 if (depth >= waterHeight + ma... 阅读全文