36 ret->setName(
"theRobot");
43 trian.
r[0] = trian.r[1] = trian.r[2] = 1;
44 trian.g[0] = trian.g[1] = trian.g[2] = 0;
45 trian.b[0] = trian.b[1] = trian.b[2] = 0;
46 trian.a[0] = trian.a[1] = trian.a[2] = 1;
57 obj->insertTriangle(trian);
67 obj->insertTriangle(trian);
80 obj->insertTriangle(trian);
90 obj->insertTriangle(trian);
101 obj->insertTriangle(trian);
111 obj->insertTriangle(trian);
123 obj->insertTriangle(trian);
133 obj->insertTriangle(trian);
144 obj->insertTriangle(trian);
154 obj->insertTriangle(trian);
156 trian.r[0] = trian.r[1] = trian.r[2] = 0.05f;
157 trian.g[0] = trian.g[1] = trian.g[2] = 0.05f;
158 trian.b[0] = trian.b[1] = trian.b[2] = 0.05f;
159 trian.a[0] = trian.a[1] = trian.a[2] = 1;
170 obj->insertTriangle(trian);
180 obj->insertTriangle(trian);
191 obj->insertTriangle(trian);
201 obj->insertTriangle(trian);
218 obj->setColor(1, 0, 0);
222 obj = CArrow::Create(
224 obj->setColor(0, 1, 0);
228 obj = CArrow::Create(
230 obj->setColor(0, 0, 1);
245 vector<TPoint2D> level1;
246 level1.push_back(
TPoint2D(0.31, 0));
247 level1.push_back(
TPoint2D(0.22, 0.24));
248 level1.push_back(
TPoint2D(-0.22, 0.24));
249 level1.push_back(
TPoint2D(-0.31, 0));
250 level1.push_back(
TPoint2D(-0.22, -0.24));
251 level1.push_back(
TPoint2D(0.22, -0.24));
255 obj1->setLocation(0, 0,
height);
257 obj1->setColor(0.6, 0.6, 0.6);
260 vector<TPoint2D> level2;
261 level2.push_back(
TPoint2D(0.16, 0.21));
262 level2.push_back(
TPoint2D(-0.16, 0.21));
263 level2.push_back(
TPoint2D(-0.16, -0.21));
264 level2.push_back(
TPoint2D(0.16, -0.21));
268 obj2->setLocation(0, 0,
height);
270 obj2->setColor(0.2, 0.2, 0.2);
273 vector<TPoint2D> level3;
274 level3.push_back(
TPoint2D(-0.12, 0.12));
275 level3.push_back(
TPoint2D(-0.16, 0.12));
276 level3.push_back(
TPoint2D(-0.16, -0.12));
277 level3.push_back(
TPoint2D(-0.12, -0.12));
280 obj3->setLocation(0, 0,
height);
282 obj3->setColor(0.6, 0.6, 0.6);
286 0.05f, 0.05f, 0.4f, 20, 20);
287 obj4->setLocation(0, 0, 0.73);
288 obj4->setColor(0, 0, 0.9);
292 0.05f, 0.05f, 0.4f, 20, 20);
293 obj5->setPose(
CPose3D(0.32, 0, 0.89, 0, -1, 0));
294 obj5->setColor(0, 0, 0.9);
309 vector<TPoint2D> level1;
310 level1.push_back(
TPoint2D(0.31, 0));
311 level1.push_back(
TPoint2D(0.22, 0.24));
312 level1.push_back(
TPoint2D(-0.22, 0.24));
313 level1.push_back(
TPoint2D(-0.31, 0));
314 level1.push_back(
TPoint2D(-0.22, -0.24));
315 level1.push_back(
TPoint2D(0.22, -0.24));
319 obj1->setLocation(0, 0,
height);
321 obj1->setColor(1.0, 0.6, 0.0);
325 vector<TPoint2D> level2;
326 level2.push_back(
TPoint2D(0.13, 0.1));
327 level2.push_back(
TPoint2D(-0.13, 0.1));
328 level2.push_back(
TPoint2D(-0.13, -0.1));
329 level2.push_back(
TPoint2D(0.13, -0.1));
333 obj2->setLocation(0, 0,
height);
335 obj2->setColor(1.0, 0.6, 0.2);
339 vector<TPoint2D> level3;
340 level3.push_back(
TPoint2D(0.03, 0.03));
341 level3.push_back(
TPoint2D(-0.03, 0.03));
342 level3.push_back(
TPoint2D(-0.03, -0.03));
343 level3.push_back(
TPoint2D(0.03, -0.03));
347 obj3->setLocation(0, 0,
height);
349 obj3->setColor(0.6, 0.6, 0.6);
353 vector<TPoint2D> level4;
354 level4.push_back(
TPoint2D(0.03, 0.11));
355 level4.push_back(
TPoint2D(-0.03, 0.11));
356 level4.push_back(
TPoint2D(-0.03, -0.11));
357 level4.push_back(
TPoint2D(0.03, -0.11));
360 obj4->setLocation(0, 0,
height);
362 obj4->setColor(1.0, 0.6, 0.0);
373 CArrow::Ptr obj = CArrow::Create(0, 0, 0, 1.0, 0, 0, 0.25f, 0.02f, 0.05f);
375 obj->setColor(1, 0, 0);
379 obj = CArrow::Create(0, 0, 0, 0, 1.0, 0, 0.25f, 0.02f, 0.05f);
380 obj->setColor(0, 1, 0);
384 obj = CArrow::Create(0, 0, -1.0, 0, 0, 0, 0.25f, 0.02f, 0.05f);
385 obj->setColor(0, 0, 1);
398 mrpt::make_aligned_shared<opengl::CSetOfObjects>();
401 -0.02, 0.14, -0.02, 0.02, 0, -0.04);
402 rect->setColor(1, 0.8, 0);
404 camera->insert(rect);
406 CCylinder::Ptr lCam = mrpt::make_aligned_shared<opengl::CCylinder>(
407 0.01f, 0.01f, 0.003f, 10, 10);
408 lCam->setColor(1, 0, 0);
410 CCylinder::Ptr rCam = mrpt::make_aligned_shared<opengl::CCylinder>(
411 0.01f, 0.01f, 0.003f, 10, 10);
412 rCam->setPose(
CPose3D(0.12, 0, 0));
413 rCam->setColor(0, 0, 0);
415 camera->insert(lCam);
416 camera->insert(rCam);
427 lin->setLineWidth(lineWidth);
428 lin->setColor(1, 0, 0);
429 lin->setLineCoords(0, 0, 0,
scale, 0, 0);
434 lin->setLineWidth(lineWidth);
435 lin->setColor(0, 1, 0);
436 lin->setLineCoords(0, 0, 0, 0,
scale, 0);
441 lin->setLineWidth(lineWidth);
442 lin->setColor(0, 0, 1);
443 lin->setLineCoords(0, 0, 0, 0, 0,
scale);
455 lin->setLineWidth(lineWidth);
456 lin->setColor(1, 0, 0);
457 lin->setLineCoords(0, 0, 0,
scale, 0, 0);
462 lin->setLineWidth(lineWidth);
463 lin->setColor(0, 1, 0);
464 lin->setLineCoords(0, 0, 0, 0,
scale, 0);
475 CBox::Ptr base = mrpt::make_aligned_shared<CBox>(
477 base->setColor(0.7, 0.7, 0.7);
482 mrpt::make_aligned_shared<CCylinder>(0.02f, 0.02f, 0.01f);
483 cyl1->setColor(0, 0, 0);
484 cyl1->setPose(
CPoint3D(0, 0, -0.014));
489 mrpt::make_aligned_shared<CCylinder>(0.02f, 0.0175f, 0.01f);
490 cyl2->setColor(0, 0, 0);
491 cyl2->setPose(
CPoint3D(0, 0, -0.004));
496 mrpt::make_aligned_shared<CCylinder>(0.0175f, 0.0175f, 0.01f);
497 cyl3->setColor(0, 0, 0);
498 cyl3->setPose(
CPoint3D(0, 0, 0.004));
510 CBox::Ptr base = mrpt::make_aligned_shared<CBox>(
512 base->setColor(0, 0, 0);
517 mrpt::make_aligned_shared<CCylinder>(0.028f, 0.024f, 0.028f);
518 cyl1->setColor(0, 0, 0);
519 cyl1->setPose(
CPose3D(0, 0, -0.014));
524 mrpt::make_aligned_shared<CCylinder>(0.028f, 0.028f, 0.01f);
525 cyl2->setColor(1, 69 / 255.0, 0);
526 cyl2->setPose(
CPoint3D(0, 0, 0.014));
531 mrpt::make_aligned_shared<CCylinder>(0.028f, 0.028f, 0.01f);
532 cyl3->setColor(0, 0, 0);
533 cyl3->setPose(
CPoint3D(0, 0, 0.024));
545 CBox::Ptr cabin = mrpt::make_aligned_shared<CBox>(
547 cabin->setColor(0.7, 0.7, 0.7);
551 CBox::Ptr back = mrpt::make_aligned_shared<CBox>(
553 back->setColor(1, 1, 1);
557 CBox::Ptr boomAxis = mrpt::make_aligned_shared<CBox>(
559 boomAxis->setColor(0, 0, 0);
560 ret->insert(boomAxis);
563 CBox::Ptr boom1 = mrpt::make_aligned_shared<CBox>(
565 boom1->setColor(0, 1, 0);
569 CBox::Ptr boom2 = mrpt::make_aligned_shared<CBox>(
571 boom2->setColor(0, 1, 0);
576 mrpt::make_aligned_shared<CCylinder>(0.716f, 0.716f, 0.387f, 30);
577 cyl1->setColor(0, 0, 0);
583 mrpt::make_aligned_shared<CCylinder>(0.716f, 0.716f, 0.387f, 30);
584 cyl2->setColor(0, 0, 0);
590 mrpt::make_aligned_shared<CCylinder>(0.716f, 0.716f, 0.387f, 30);
591 cyl1->setColor(0, 0, 0);
592 cyl1->setPose(
CPose3D(-0.710, -0.423, -2.480, 0, 0,
DEG2RAD(90)));
597 mrpt::make_aligned_shared<CCylinder>(0.716f, 0.716f, 0.387f, 30);
598 cyl2->setColor(0, 0, 0);
599 cyl2->setPose(
CPose3D(-3.937, -0.423, -2.480, 0, 0,
DEG2RAD(90)));
CSetOfObjects::Ptr Hokuyo_UTM()
Returns a simple 3D model of a Hokuyo UTM scanner.
Classes for serialization, sockets, ini-file manipulation, streams, list of properties-values, timewatch, extensions to STL.
CSetOfObjects::Ptr CornerXYSimple(float scale=1.0, float lineWidth=1.0)
Returns two arrows representing a X,Y 2D corner (just thick lines, fast to render).
GLenum GLenum GLenum GLenum GLenum scale
CSetOfObjects::Ptr RobotGiraff()
Returns a representation of RobotGiraff.
CSetOfObjects::Ptr RobotRhodon()
Returns a representation of Rhodon.
std::shared_ptr< CPolyhedron > Ptr
CSetOfObjects::Ptr Househam_Sprayer()
Returns a simple 3D model of a househam sprayer.
std::shared_ptr< CSetOfTriangles > Ptr
static CPolyhedron::Ptr CreateCubicPrism(double x1, double x2, double y1, double y2, double z1, double z2)
Creates a cubic prism, given the coordinates of two opposite vertices.
GLsizei GLsizei GLuint * obj
This base provides a set of functions for maths stuff.
std::shared_ptr< CCylinder > Ptr
std::shared_ptr< CSetOfObjects > Ptr
double DEG2RAD(const double x)
Degrees to radians.
A class used to store a 3D point.
Classes for 2D/3D geometry representation, both of single values and probability density distribution...
CSetOfObjects::Ptr RobotPioneer()
Returns a representation of a Pioneer II mobile base.
A class used to store a 3D pose (a 3D translation + a rotation in 3D).
CSetOfObjects::Ptr CornerXYZ(float scale=1.0)
Returns three arrows representing a X,Y,Z 3D corner.
CSetOfObjects::Ptr CornerXYZSimple(float scale=1.0, float lineWidth=1.0)
Returns three arrows representing a X,Y,Z 3D corner (just thick lines instead of complex arrows for f...
The namespace for 3D scene representation and rendering.
CSetOfObjects::Ptr CornerXYZEye()
Returns three arrows representing a X,Y,Z 3D corner.
GLenum GLsizei GLsizei height
std::shared_ptr< CSimpleLine > Ptr
CSetOfObjects::Ptr BumblebeeCamera()
Returns a simple 3D model of a PointGrey Bumblebee stereo camera.
static CPolyhedron::Ptr CreateCustomPrism(const std::vector< mrpt::math::TPoint2D > &baseVertices, double height)
Creates a custom prism with vertical edges, given any base which will lie on the XY plane...
std::shared_ptr< CBox > Ptr
CSetOfObjects::Ptr Hokuyo_URG()
Returns a simple 3D model of a Hokuyo URG scanner.
std::shared_ptr< CArrow > Ptr