本文整理汇总了C++中Arm::solve方法的典型用法代码示例。如果您正苦于以下问题:C++ Arm::solve方法的具体用法?C++ Arm::solve怎么用?C++ Arm::solve使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Arm
的用法示例。
在下文中一共展示了Arm::solve方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: update2
void update2(double value) {
//goal = Point3f(cos(angle*PI / 180.0f), sin(angle*PI / 180.0f), (sin(zangle*PI / 180.0f)));
//Point3f goal(cos(angle*PI/180.0f), sin(angle*PI/180.0f), 0);
//goal.normalize();
//goal *= 5;
//goal += Vector3f(-3, 0, -1);
//goal = Vector3f(0, 0, 7);
//mainArm.solve(goal, 100);
//Point3f secGoal = Point3f(goal[0], goal[1], -goal[2]);
//secArm.solve(secGoal, 100);
//display();
for (int i = 0; i < 50; i++) {
if (i>20) {
goal = Point3f(3, 0, 1);
//goal += Vector3f(20, 4, 4);
mainArm.solve(goal, 100);
display();
}
}
for (int i = 0; i < 50;i++){
if(i>25){
goal = Vector3f(value+3, 0, 3);
mainArm.solve(goal, 100);
display();
}
}
}
示例2: update
void update() {
angle += 360.0 / 60.0;
zangle += 360.0f / 100.0f;
//goal = Point3f(cos(angle*PI / 180.0f), sin(angle*PI / 180.0f), (sin(zangle*PI / 180.0f)));
//Point3f goal(cos(angle*PI/180.0f), sin(angle*PI/180.0f), 0);
//goal.normalize();
//goal *= 5;
//goal += Vector3f(-3, 0, -1);
//goal = Vector3f(0, 0, 7);
//mainArm.solve(goal, 100);
//Point3f secGoal = Point3f(goal[0], goal[1], -goal[2]);
//secArm.solve(secGoal, 100);
//display();
goal = Vector3f(20, 4, 4);
mainArm.solve(goal, 100);
display();
}