26 using namespace std::literals;
40 obj->setColor(0.4f, 0.4f, 0.4f);
46 obj->enableTickMarks();
47 obj->setAxisLimits(-10, -10, -10, 10, 10, 10);
52 obj->setColor(0, 0, 1);
54 obj->setLocation(0, 0, 1);
55 obj->setName(
"ball_1");
60 obj->setColor(1, 0, 0);
62 obj->setLocation(-1, -1, 1);
63 obj->setName(
"ball_2");
69 int c = 0, width = 640, height = 480;
75 CCamera& camera = render.getCamera(scene);
83 obj->getPoseX() + cos(obj->getPoseY() / 2) * 0.05,
84 obj->getPoseY() - sin(obj->getPoseX() / 2) * 0.09,
85 obj->getPoseZ() - sin(obj->getPoseX() / 2) * 0.08);
89 obj->getPoseX() + cos(obj->getPoseY() / 2) * 0.05,
90 obj->getPoseY() - sin(obj->getPoseX() / 2) * 0.09,
91 obj->getPoseZ() - sin(obj->getPoseX() / 2) * 0.08);
96 width = 800, height = 600;
97 frame.resize(width, height,
CH_RGB);
98 render.resize(width, height);
102 render.getFrame2(scene, frame);
105 win.showImage(frame);
107 std::this_thread::sleep_for(50ms);
121 catch (
const std::exception& e)
128 printf(
"Untyped exception!!");