40 win.setCameraAzimuthDeg(-50);
41 win.setCameraElevationDeg(40);
42 win.setCameraZoom(19);
43 win.setCameraPointingToPoint(2, 2, 0);
48 auto obj = opengl::CGridPlaneXY::Create(-20, 20, -20, 20, 0, 1);
49 obj->setColor(0.4f, 0.4f, 0.4f);
50 theScene->insert(obj);
54 const TPose3D pose_a(0, 0, 0, 0.0_deg, 0.0_deg, 0.0_deg);
55 const TPose3D pose_b(3, 4, 1, 120.0_deg, 40.0_deg, 50.0_deg);
62 theScene->insert(obj);
69 theScene->insert(obj);
75 obj->setName(
"slerp_obj");
77 theScene->insert(obj);
81 win.unlockAccess3DScene();
83 cout <<
"\n Close the window to exit.\n";
86 static const double MOVE_PERIOD = 1.0;
87 static const double MOVE_PERIOD2 = 2 * MOVE_PERIOD;
92 double t = ::fmod(tic.
Tac(), MOVE_PERIOD2);
96 t = 1 - (t - MOVE_PERIOD) / MOVE_PERIOD;
106 obj1->setPose(pose_interp);
109 win.addTextMessage(5, 5,
format(
"t=%.03f", t), 0 );
112 win.unlockAccess3DScene();
116 std::this_thread::sleep_for(5ms);
130 catch (
const std::exception& e)
137 printf(
"Untyped exception!!");