本文整理汇总了C++中Finger::close方法的典型用法代码示例。如果您正苦于以下问题:C++ Finger::close方法的具体用法?C++ Finger::close怎么用?C++ Finger::close使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Finger
的用法示例。
在下文中一共展示了Finger::close方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: InitialPose_keyboard
//***
void InitialPose_keyboard(){
switch( kbCmd ){
case '-':
if(speed>0.2) speed-=(float)0.1;
setDefaultArmSpeed(speed);
break;
case '+':
if(speed<1.2) speed+=(float)0.1;
setDefaultArmSpeed(speed);
break;
case 'a':
t << -0.001f,0,0,0,0,0;
Move_L_Rel(t,0);
first_x = T07Cmd(0,3);
break;
case 'd':
t << 0.001f,0,0,0,0,0;
Move_L_Rel(t,0);
first_x = T07Cmd(0,3);
break;
case 'w':
t << 0,0.001f,0,0,0,0;
Move_L_Rel(t,0);
first_y = T07Cmd(1,3);
break;
case 's':
t << 0,-0.001f,0,0,0,0;
Move_L_Rel(t,0);
first_y = T07Cmd(1,3);
break;
case 'r':
t << 0,0,0.01f,0,0,0;
Move_L_Rel(t,0);
while(MOVL){};
first_z = T07Cmd(2,3);
break;
case 'f':
t << 0,0,-0.01f,0,0,0;
Move_L_Rel(t,0);
while(MOVL){};
first_z = T07Cmd(2,3);
break;
case 'z':
T << -1.0f, 0.0f, 0.0f, first_x, //
0.0f, 1.0f, 0.0f, first_y, //
0.0f, 0.0f, -1.0f, first_z, //-0.2726
0.0f, 0.0f, 0.0f, 1.0f;
Move_L_Abs(T,0);
while(MOVL){system("cls");
DisplayLoop(speed);}
break;
case 'j':
t << -0.11f,0,0,0,0,0;
Move_L_Rel(t,0);
break;
case 'l':
t << 0.11f,0,0,0,0,0;
Move_L_Rel(t,0);
break;
case 'i':
t << 0,0.08f,0,0,0,0;
Move_L_Rel(t,0);
break;
case 'k':
t << 0,-0.08f,0,0,0,0;
Move_L_Rel(t,0);
break;
case 'b':
t << 0,0,-0.12f,0,0,0;
Move_L_Rel(t,0);
while(MOVL){};
finger.close();
t << 0,0,0.12f,0,0,0;
Move_L_Rel(t,0);
break;
case 'n':
finger.move(80);
break;
case 'o':
outputFile.open("trace.txt");
write=true;
t << 0.10f,0,0,0,0,0;
Move_L_Rel(t,0);
while(MOVL){};
write=false;
outputFile.close();
break;
case 'm':
Move_Contour();
break;
case 'p':
z_axis_black = -0.20;
//draw edge
T << -1.0f, 0.0f, 0.0f, sketchPositionXY[sketchIndex][0](0), //
0.0f, 1.0f, 0.0f, sketchPositionXY[sketchIndex][0](1), //
0.0f, 0.0f, -1.0f, z_axis_black+(float)0.01, //
0.0f, 0.0f, 0.0f, 1.0f;
//.........这里部分代码省略.........
示例2: MyLoop_keyboard
void MyLoop_keyboard(){
//Vector6f t;
//Matrix4f T;
switch( kbCmd ){
case 'c':
sketchIndex = 0;
fillIndex = 0;
break;
case 'v':
fillIndex = 0;
break;
case '-':
if(speed>0.2) speed-=(float)0.1;
setDefaultArmSpeed(speed);
break;
case '+':
if(speed<1.2) speed+=(float)0.1;
setDefaultArmSpeed(speed);
break;
case 'w':
t << 0,0.05f,0,0,0,0;
Move_L_Rel(t,0);
break;
case 's':
t << 0,-0.05f,0,0,0,0;
Move_L_Rel(t,0);
break;
case 'a':
t << -0.05f,0,0,0,0,0;
Move_L_Rel(t,0);
break;
case 'd':
t << 0.05f,0,0,0,0,0;
Move_L_Rel(t,0);
break;
case 'r':
t << 0,0,0.001f,0,0,0;
Move_L_Rel(t,0);
while(MOVL){};
z_axis_color = T07Cmd(2,3);
break;
case 'f':
t << 0,0,-0.001f,0,0,0;
Move_L_Rel(t,0);
while(MOVL){};
z_axis_color = T07Cmd(2,3);
break;
case 't':
t << 0,0,0.001f,0,0,0;
Move_L_Rel(t,0);
while(MOVL){};
z_axis_black = T07Cmd(2,3);
break;
case 'g':
t << 0,0,-0.001f,0,0,0;
Move_L_Rel(t,0);
while(MOVL){};
z_axis_black = T07Cmd(2,3);
break;
case 'y':
T << -1.0f, 0.0f, 0.0f, centerX, //
0.0f, 1.0f, 0.0f, centerY, //
0.0f, 0.0f, -1.0f, 0.0f, //
0.0f, 0.0f, 0.0f, 1.0f;
Move_L_Abs(T,0);
while(MOVL){};
break;
case 'h':
T << -1.0f, 0.0f, 0.0f, centerX, //
0.0f, 1.0f, 0.0f, centerY, //
0.0f, 0.0f, -1.0f, -0.085f, //
0.0f, 0.0f, 0.0f, 1.0f;
Move_L_Abs(T,0);
break;
case 'u': // tune short pen
// Go to position of pen
T << -1.0f, 0.0f, 0.0f, first_x, //
0.0f, 1.0f, 0.0f, first_y, //
0.0f, 0.0f, -1.0f, first_z, //-0.2726
0.0f, 0.0f, 0.0f, 1.0f;
Move_L_Abs(T,0);
while(MOVL){system("cls"); DisplayLoop(speed);}
// Grasp pen
t << 0,0,-0.12f,0,0,0;
Move_L_Rel(t,0);
while(MOVL){};
finger.close();
t << 0,0,0.12f,0,0,0;
Move_L_Rel(t,0);
while(MOVL){};
// Move to via point position
T << -1.0f, 0.0f, 0.0f, first_x, //
0.0f, 1.0f, 0.0f, first_y+0.1, //
0.0f, 0.0f, -1.0f, first_z+0.13, //-0.2726
0.0f, 0.0f, 0.0f, 1.0f;
Move_L_Abs(T,0);
while(MOVL){system("cls"); DisplayLoop(speed);}
//.........这里部分代码省略.........