summaryrefslogtreecommitdiff
path: root/basedProject/src/keyVar.h
blob: 043a9631dbae568fae63b5eb3d117588f14c3f75 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
/*
 *  keyvar.h
 *  3dnav
 *
 *  Created by Tim Redfern on 15/12/2011.
 *  Copyright 2011 __MyCompanyName__. All rights reserved.
 *
 */

#include "ofMain.h"

class keyVar{

 public:
	void set(char _keyInc,char _keyDec,float _val,float _speed,float _accel,float accelTime);
	void keyPressed(char _key);
	void keyReleased(char _key);
	float getVal();
	float getInc();
	void setVal(float _val);
	
	float readVal();
	float inc; //for syncing

private:
	char keyInc,keyDec;
	long timePressed;
	long timeCalc;
	int state; //up-down-off
	float val;
	float speed;
	float accelTime;
	float accel;


};