summaryrefslogtreecommitdiff
path: root/basedProject/src/keyVar.h
diff options
context:
space:
mode:
Diffstat (limited to 'basedProject/src/keyVar.h')
-rw-r--r--basedProject/src/keyVar.h36
1 files changed, 36 insertions, 0 deletions
diff --git a/basedProject/src/keyVar.h b/basedProject/src/keyVar.h
new file mode 100644
index 0000000..043a963
--- /dev/null
+++ b/basedProject/src/keyVar.h
@@ -0,0 +1,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;
+
+
+};