annotate projects/airharp/MassSpringDamper.h @ 214:1721296e3e71

Fixed printed text
author Giulio Moro <giuliomoro@yahoo.it>
date Tue, 09 Feb 2016 16:26:04 +0000
parents 40badaff5729
children
rev   line source
chris@164 1 /*
chris@164 2 *
chris@164 3 * Simple 1-Dimensional Mass Spring Damper
chris@164 4 *
chris@164 5 * Christian Heinrichs 04/2015
chris@164 6 *
chris@164 7 */
chris@164 8
chris@164 9 #ifndef MASSSPRINGDAMPER_H_
chris@164 10 #define MASSSPRINGDAMPER_H_
chris@164 11
chris@164 12 class MassSpringDamper
chris@164 13 {
chris@164 14
chris@164 15 public:
chris@164 16
chris@164 17 MassSpringDamper(float mass, float spring, float damp);
chris@164 18 void setup();
chris@164 19 double update(float inForce);
chris@164 20
chris@164 21 private:
chris@164 22
chris@164 23 double _dt;
chris@164 24 float _mass;
chris@164 25 float _spring;
chris@164 26 float _damp;
chris@164 27 double _position;
chris@164 28 double _velocity;
chris@164 29
chris@164 30 };
chris@164 31
chris@164 32 #endif