34 ret->setName(
"theRobot");
41 trian.
r[0] = trian.
r[1] = trian.
r[2] = 1;
42 trian.
g[0] = trian.
g[1] = trian.
g[2] = 0;
43 trian.
b[0] = trian.
b[1] = trian.
b[2] = 0;
44 trian.
a[0] = trian.
a[1] = trian.
a[2] = 1;
55 obj->insertTriangle(trian);
65 obj->insertTriangle(trian);
78 obj->insertTriangle(trian);
88 obj->insertTriangle(trian);
99 obj->insertTriangle(trian);
109 obj->insertTriangle(trian);
121 obj->insertTriangle(trian);
131 obj->insertTriangle(trian);
142 obj->insertTriangle(trian);
152 obj->insertTriangle(trian);
154 trian.
r[0] = trian.
r[1] = trian.
r[2] = 0.05f;
155 trian.
g[0] = trian.
g[1] = trian.
g[2] = 0.05f;
156 trian.
b[0] = trian.
b[1] = trian.
b[2] = 0.05f;
157 trian.
a[0] = trian.
a[1] = trian.
a[2] = 1;
168 obj->insertTriangle(trian);
178 obj->insertTriangle(trian);
189 obj->insertTriangle(trian);
199 obj->insertTriangle(trian);
216 obj->setColor(1, 0, 0);
222 obj->setColor(0, 1, 0);
228 obj->setColor(0, 0, 1);
243 vector<TPoint2D> level1;
244 level1.push_back(
TPoint2D(0.31, 0));
245 level1.push_back(
TPoint2D(0.22, 0.24));
246 level1.push_back(
TPoint2D(-0.22, 0.24));
247 level1.push_back(
TPoint2D(-0.31, 0));
248 level1.push_back(
TPoint2D(-0.22, -0.24));
249 level1.push_back(
TPoint2D(0.22, -0.24));
253 obj1->setLocation(0, 0,
height);
255 obj1->setColor(0.6, 0.6, 0.6);
258 vector<TPoint2D> level2;
259 level2.push_back(
TPoint2D(0.16, 0.21));
260 level2.push_back(
TPoint2D(-0.16, 0.21));
261 level2.push_back(
TPoint2D(-0.16, -0.21));
262 level2.push_back(
TPoint2D(0.16, -0.21));
266 obj2->setLocation(0, 0,
height);
268 obj2->setColor(0.2, 0.2, 0.2);
271 vector<TPoint2D> level3;
272 level3.push_back(
TPoint2D(-0.12, 0.12));
273 level3.push_back(
TPoint2D(-0.16, 0.12));
274 level3.push_back(
TPoint2D(-0.16, -0.12));
275 level3.push_back(
TPoint2D(-0.12, -0.12));
278 obj3->setLocation(0, 0,
height);
280 obj3->setColor(0.6, 0.6, 0.6);
284 0.05f, 0.05f, 0.4f, 20, 20);
285 obj4->setLocation(0, 0, 0.73);
286 obj4->setColor(0, 0, 0.9);
290 0.05f, 0.05f, 0.4f, 20, 20);
291 obj5->setPose(
CPose3D(0.32, 0, 0.89, 0, -1, 0));
292 obj5->setColor(0, 0, 0.9);
307 vector<TPoint2D> level1;
308 level1.push_back(
TPoint2D(0.31, 0));
309 level1.push_back(
TPoint2D(0.22, 0.24));
310 level1.push_back(
TPoint2D(-0.22, 0.24));
311 level1.push_back(
TPoint2D(-0.31, 0));
312 level1.push_back(
TPoint2D(-0.22, -0.24));
313 level1.push_back(
TPoint2D(0.22, -0.24));
317 obj1->setLocation(0, 0,
height);
319 obj1->setColor(1.0, 0.6, 0.0);
323 vector<TPoint2D> level2;
324 level2.push_back(
TPoint2D(0.13, 0.1));
325 level2.push_back(
TPoint2D(-0.13, 0.1));
326 level2.push_back(
TPoint2D(-0.13, -0.1));
327 level2.push_back(
TPoint2D(0.13, -0.1));
331 obj2->setLocation(0, 0,
height);
333 obj2->setColor(1.0, 0.6, 0.2);
337 vector<TPoint2D> level3;
338 level3.push_back(
TPoint2D(0.03, 0.03));
339 level3.push_back(
TPoint2D(-0.03, 0.03));
340 level3.push_back(
TPoint2D(-0.03, -0.03));
341 level3.push_back(
TPoint2D(0.03, -0.03));
345 obj3->setLocation(0, 0,
height);
347 obj3->setColor(0.6, 0.6, 0.6);
351 vector<TPoint2D> level4;
352 level4.push_back(
TPoint2D(0.03, 0.11));
353 level4.push_back(
TPoint2D(-0.03, 0.11));
354 level4.push_back(
TPoint2D(-0.03, -0.11));
355 level4.push_back(
TPoint2D(0.03, -0.11));
358 obj4->setLocation(0, 0,
height);
360 obj4->setColor(1.0, 0.6, 0.0);
373 obj->setColor(1, 0, 0);
378 obj->setColor(0, 1, 0);
383 obj->setColor(0, 0, 1);
396 mrpt::make_aligned_shared<opengl::CSetOfObjects>();
399 -0.02, 0.14, -0.02, 0.02, 0, -0.04);
400 rect->setColor(1, 0.8, 0);
402 camera->insert(rect);
404 CCylinder::Ptr lCam = mrpt::make_aligned_shared<opengl::CCylinder>(
405 0.01f, 0.01f, 0.003f, 10, 10);
406 lCam->setColor(1, 0, 0);
408 CCylinder::Ptr rCam = mrpt::make_aligned_shared<opengl::CCylinder>(
409 0.01f, 0.01f, 0.003f, 10, 10);
410 rCam->setPose(
CPose3D(0.12, 0, 0));
411 rCam->setColor(0, 0, 0);
413 camera->insert(lCam);
414 camera->insert(rCam);
425 lin->setLineWidth(lineWidth);
426 lin->setColor(1, 0, 0);
427 lin->setLineCoords(0, 0, 0,
scale, 0, 0);
432 lin->setLineWidth(lineWidth);
433 lin->setColor(0, 1, 0);
434 lin->setLineCoords(0, 0, 0, 0,
scale, 0);
439 lin->setLineWidth(lineWidth);
440 lin->setColor(0, 0, 1);
441 lin->setLineCoords(0, 0, 0, 0, 0,
scale);
453 lin->setLineWidth(lineWidth);
454 lin->setColor(1, 0, 0);
455 lin->setLineCoords(0, 0, 0,
scale, 0, 0);
460 lin->setLineWidth(lineWidth);
461 lin->setColor(0, 1, 0);
462 lin->setLineCoords(0, 0, 0, 0,
scale, 0);
473 CBox::Ptr base = mrpt::make_aligned_shared<CBox>(
475 base->setColor(0.7, 0.7, 0.7);
480 mrpt::make_aligned_shared<CCylinder>(0.02f, 0.02f, 0.01f);
481 cyl1->setColor(0, 0, 0);
482 cyl1->setLocation(0, 0, -0.014);
487 mrpt::make_aligned_shared<CCylinder>(0.02f, 0.0175f, 0.01f);
488 cyl2->setColor(0, 0, 0);
489 cyl2->setLocation(0, 0, -0.004);
494 mrpt::make_aligned_shared<CCylinder>(0.0175f, 0.0175f, 0.01f);
495 cyl3->setColor(0, 0, 0);
496 cyl3->setLocation(0, 0, 0.004);
508 CBox::Ptr base = mrpt::make_aligned_shared<CBox>(
510 base->setColor(0, 0, 0);
515 mrpt::make_aligned_shared<CCylinder>(0.028f, 0.024f, 0.028f);
516 cyl1->setColor(0, 0, 0);
517 cyl1->setPose(
CPose3D(0, 0, -0.014));
522 mrpt::make_aligned_shared<CCylinder>(0.028f, 0.028f, 0.01f);
523 cyl2->setColor(1, 69 / 255.0, 0);
524 cyl2->setLocation(0, 0, 0.014);
529 mrpt::make_aligned_shared<CCylinder>(0.028f, 0.028f, 0.01f);
530 cyl3->setColor(0, 0, 0);
531 cyl3->setLocation(0, 0, 0.024);
543 CBox::Ptr cabin = mrpt::make_aligned_shared<CBox>(
545 cabin->setColor(0.7, 0.7, 0.7);
549 CBox::Ptr back = mrpt::make_aligned_shared<CBox>(
551 back->setColor(1, 1, 1);
555 CBox::Ptr boomAxis = mrpt::make_aligned_shared<CBox>(
557 boomAxis->setColor(0, 0, 0);
558 ret->insert(boomAxis);
561 CBox::Ptr boom1 = mrpt::make_aligned_shared<CBox>(
563 boom1->setColor(0, 1, 0);
567 CBox::Ptr boom2 = mrpt::make_aligned_shared<CBox>(
569 boom2->setColor(0, 1, 0);
574 mrpt::make_aligned_shared<CCylinder>(0.716f, 0.716f, 0.387f, 30);
575 cyl1->setColor(0, 0, 0);
581 mrpt::make_aligned_shared<CCylinder>(0.716f, 0.716f, 0.387f, 30);
582 cyl2->setColor(0, 0, 0);
588 mrpt::make_aligned_shared<CCylinder>(0.716f, 0.716f, 0.387f, 30);
589 cyl1->setColor(0, 0, 0);
590 cyl1->setPose(
CPose3D(-0.710, -0.423, -2.480, 0, 0,
DEG2RAD(90)));
595 mrpt::make_aligned_shared<CCylinder>(0.716f, 0.716f, 0.387f, 30);
596 cyl2->setColor(0, 0, 0);
597 cyl2->setPose(
CPose3D(-3.937, -0.423, -2.480, 0, 0,
DEG2RAD(90)));