00001 #include "Damp.h" 00002 #include "Point.h" 00003 00004 namespace Elve { 00005 00006 Damp::Damp(qreal b) : mB(b) 00007 { 00008 00009 } 00010 00011 void Damp::setB(qreal b) { 00012 mB = b; 00013 } 00014 00015 QVector2D Damp::force(const Point &m) const 00016 { 00017 return -mB*m.speed(); 00018 } 00019 00020 }