annotate examples/10-Instruments/airharp/MassSpringDamper.h @ 464:8fcfbfb32aa0 prerelease

Examples reorder with subdirectories. Added header to each project. Moved Doxygen to bottom of render.cpp.
author Robert Jack <robert.h.jack@gmail.com>
date Mon, 20 Jun 2016 16:20:38 +0100
parents
children
rev   line source
robert@464 1 /*
robert@464 2 *
robert@464 3 * Simple 1-Dimensional Mass Spring Damper
robert@464 4 *
robert@464 5 * Christian Heinrichs 04/2015
robert@464 6 *
robert@464 7 */
robert@464 8
robert@464 9 #ifndef MASSSPRINGDAMPER_H_
robert@464 10 #define MASSSPRINGDAMPER_H_
robert@464 11
robert@464 12 class MassSpringDamper
robert@464 13 {
robert@464 14
robert@464 15 public:
robert@464 16
robert@464 17 MassSpringDamper(float mass, float spring, float damp);
robert@464 18 void setup();
robert@464 19 double update(float inForce);
robert@464 20
robert@464 21 private:
robert@464 22
robert@464 23 double _dt;
robert@464 24 float _mass;
robert@464 25 float _spring;
robert@464 26 float _damp;
robert@464 27 double _position;
robert@464 28 double _velocity;
robert@464 29
robert@464 30 };
robert@464 31
robert@464 32 #endif