ClearForces sets all body forces in the world to zero.
()
| 241 | |
| 242 | // ClearForces sets all body forces in the world to zero. |
| 243 | func (s *Simulation) ClearForces() { |
| 244 | |
| 245 | for i:=0; i < len(s.bodies); i++ { |
| 246 | s.bodies[i].ClearForces() |
| 247 | } |
| 248 | } |
| 249 | |
| 250 | // AddConstraint adds a constraint to the simulation. |
| 251 | func (s *Simulation) AddConstraint(c constraint.IConstraint) { |