view projects/airharp/String.h @ 269:ac8eb07afcf5

Oxygen text added to each render.cpp file for the default projects. Text includes project explanation from Wiki, edited in places. Empty project added as a default project. Doxyfile updated. Each of the project locations added to INPUT configuration option. Consider just watching the whole project file so all new projects are automatically pulled through.
author Robert Jack <robert.h.jack@gmail.com>
date Tue, 17 May 2016 15:40:16 +0100
parents 40badaff5729
children
line wrap: on
line source
/*
 *
 * 1-D string consisting of two waveguides and junction
 *
 * Christian Heinrichs 04/2015
 *
 */

#ifndef STRING_H_
#define STRING_H_

#include <cmath>
#include "Junction.h"
#include "Waveguide.h"

class String
{

public:

	String();
	float update(float in);

	float getPlectrumDisplacement();
	void setMidinote(float midinote);
	void setFrequency(float frequency);
	void setPeriod(float periodInMs);
	void setPluckPosition(float pluckPos);
	void setGlobalPosition(float pos);
	float getGlobalPosition();

private:

	float _previous_l;
	float _previous_r;

	float _globalPosition;

	Waveguide wg_l;
	Waveguide wg_r;
	Junction junction;

};

#endif