Permalink
Browse files

added setInput method

  • Loading branch information...
1 parent 1e255f4 commit a5c2e287c338fe7be0171ad823ff95f136321394 @HalfdanJ HalfdanJ committed Jul 18, 2011
Showing with 16 additions and 8 deletions.
  1. +1 −1 simpleExample/testApp.cpp
  2. +4 −0 src/ofxIndustrialRobot.cpp
  3. +10 −0 src/ofxIndustrialRobot.h
  4. +1 −7 src/ofxIndustrialRobotController.h
@@ -3,7 +3,7 @@
//--------------------------------------------------------------
void testApp::setup(){
industrialRobot = new ofxIndustrialRobot(this);
- industrialRobot->thread.controller->setInput(ofxIndustrialRobotController::Gravity);
+ industrialRobot->setInput(ofxIndustrialRobot::Gravity);
industrialRobot->gotoStartPosition();
}
@@ -204,6 +204,10 @@ float ofxIndustrialRobot::getHandHeight(bool lock){
return thread.coreData.tool->h/2.0 + thread.coreData.arms[3].length + thread.coreData.arms[4].length;
}
+void ofxIndustrialRobot::setInput(Input input){
+ thread.controller->setInput(input);
+}
+
//---
View
@@ -14,6 +14,14 @@
class ofxIndustrialRobot {
public:
+
+ enum Input {
+ Timeline,
+ Slider,
+ Gravity,
+ ManualPosition
+ };
+
ofxIndustrialRobot(ofBaseApp * app);
void drawVisualizer(int x, int y, int w, int h);
@@ -25,6 +33,8 @@ class ofxIndustrialRobot {
int timelineCuesLeft(bool lock=true);
bool setGravityTarget(ofxVec3f target, ofxVec3f dir, float force = 1.0, float maxSpeed = 0, ofxIndustrialRobotDefines::HandVariant variant = ofxIndustrialRobotDefines::Auto, bool lock=true);
bool isLegalTarget(ofxVec3f target, ofxVec3f dir, ofxIndustrialRobotDefines::HandVariant variant = ofxIndustrialRobotDefines::Auto, bool lock=true);
+
+ void setInput(Input input);
ofxVec3f getCurrentTarget(bool lock=true);
ofxVec3f getCurrentDir(bool lock=true);
@@ -16,13 +16,7 @@ class ofxIndustrialRobotController {
public:
- enum Input {
- Timeline,
- Slider,
- Gravity,
- ManualPosition,
- Test3
- };
+
ofxIndustrialRobotController(ofxIndustrialRobotCoreData * _data, ofxIndustrialRobotArmHelper * _helper, ofxIndustrialRobotTimeline * _timeline, ofxIndustrialRobotPlotter * _plotter);

0 comments on commit a5c2e28

Please sign in to comment.