35 CSetOfObjectsPtr ret = CSetOfObjects::Create();
37 ret->setName(
"theRobot");
39 CSetOfTrianglesPtr
obj = CSetOfTriangles::Create();
44 trian.
r[0]=trian.
r[1]=trian.
r[2]= 1;
45 trian.
g[0]=trian.
g[1]=trian.
g[2]= 0;
46 trian.
b[0]=trian.
b[1]=trian.
b[2]= 0;
47 trian.
a[0]=trian.
a[1]=trian.
a[2]= 1;
49 trian.
x[0] = 0.10f; trian.
x[1] =-0.20f; trian.
x[2] =-0.20f;
50 trian.
y[0] =-0.10f; trian.
y[1] = 0.10f; trian.
y[2] =-0.10f;
51 trian.
z[0] = 0.20f; trian.
z[1] = 0.25f; trian.
z[2] = 0.25f;
52 obj->insertTriangle( trian );
53 trian.
x[0] = 0.10f; trian.
x[1] = 0.10f; trian.
x[2] =-0.20f;
54 trian.
y[0] =-0.10f; trian.
y[1] = 0.10f; trian.
y[2] = 0.10f;
55 trian.
z[0] = 0.20f; trian.
z[1] = 0.20f; trian.
z[2] = 0.25f;
56 obj->insertTriangle( trian );
60 trian.
x[0] = 0.10f; trian.
x[1] = 0.10f; trian.
x[2] = 0.10f;
61 trian.
y[0] =-0.10f; trian.
y[1] =-0.10f; trian.
y[2] = 0.10f;
62 trian.
z[0] = 0.05f; trian.
z[1] = 0.20f; trian.
z[2] = 0.20f;
63 obj->insertTriangle( trian );
64 trian.
x[0] = 0.10f; trian.
x[1] = 0.10f; trian.
x[2] = 0.10f;
65 trian.
y[0] =-0.10f; trian.
y[1] = 0.10f; trian.
y[2] = 0.10f;
66 trian.
z[0] = 0.05f; trian.
z[1] = 0.05f; trian.
z[2] = 0.20f;
67 obj->insertTriangle( trian );
69 trian.
x[0] =-0.20f; trian.
x[1] =-0.20f; trian.
x[2] =-0.20f;
70 trian.
y[0] =-0.10f; trian.
y[1] =-0.10f; trian.
y[2] = 0.10f;
71 trian.
z[0] = 0.05f; trian.
z[1] = 0.25f; trian.
z[2] = 0.25f;
72 obj->insertTriangle( trian );
73 trian.
x[0] =-0.20f; trian.
x[1] =-0.20f; trian.
x[2] =-0.20f;
74 trian.
y[0] =-0.10f; trian.
y[1] = 0.10f; trian.
y[2] = 0.10f;
75 trian.
z[0] = 0.05f; trian.
z[1] = 0.05f; trian.
z[2] = 0.25f;
76 obj->insertTriangle( trian );
79 trian.
x[0] = 0.10f; trian.
x[1] =-0.20f; trian.
x[2] =-0.20f;
80 trian.
y[0] =-0.10f; trian.
y[1] =-0.10f; trian.
y[2] =-0.10f;
81 trian.
z[0] = 0.20f; trian.
z[1] = 0.25f; trian.
z[2] = 0.05f;
82 obj->insertTriangle( trian );
83 trian.
x[0] = 0.10f; trian.
x[1] = 0.10f; trian.
x[2] =-0.20f;
84 trian.
y[0] =-0.10f; trian.
y[1] =-0.10f; trian.
y[2] =-0.10f;
85 trian.
z[0] = 0.20f; trian.
z[1] = 0.05f; trian.
z[2] = 0.05f;
86 obj->insertTriangle( trian );
88 trian.
x[0] = 0.10f; trian.
x[1] =-0.20f; trian.
x[2] =-0.20f;
89 trian.
y[0] = 0.10f; trian.
y[1] = 0.10f; trian.
y[2] = 0.10f;
90 trian.
z[0] = 0.20f; trian.
z[1] = 0.25f; trian.
z[2] = 0.05f;
91 obj->insertTriangle( trian );
92 trian.
x[0] = 0.10f; trian.
x[1] = 0.10f; trian.
x[2] =-0.20f;
93 trian.
y[0] = 0.10f; trian.
y[1] = 0.10f; trian.
y[2] = 0.10f;
94 trian.
z[0] = 0.20f; trian.
z[1] = 0.05f; trian.
z[2] = 0.05f;
95 obj->insertTriangle( trian );
97 trian.
r[0]=trian.
r[1]=trian.
r[2]= 0.05f;
98 trian.
g[0]=trian.
g[1]=trian.
g[2]= 0.05f;
99 trian.
b[0]=trian.
b[1]=trian.
b[2]= 0.05f;
100 trian.
a[0]=trian.
a[1]=trian.
a[2]= 1;
102 trian.
x[0] = 0.00f; trian.
x[1] = 0.00f; trian.
x[2] = 0.05f;
103 trian.
y[0] = 0.11f; trian.
y[1] = 0.11f; trian.
y[2] = 0.11f;
104 trian.
z[0] = 0.00f; trian.
z[1] = 0.10f; trian.
z[2] = 0.05f;
105 obj->insertTriangle( trian );
106 trian.
x[0] = 0.00f; trian.
x[1] = 0.00f; trian.
x[2] = -0.05f;
107 trian.
y[0] = 0.11f; trian.
y[1] = 0.11f; trian.
y[2] = 0.11f;
108 trian.
z[0] = 0.00f; trian.
z[1] = 0.10f; trian.
z[2] = 0.05f;
109 obj->insertTriangle( trian );
111 trian.
x[0] = 0.00f; trian.
x[1] = 0.00f; trian.
x[2] = 0.05f;
112 trian.
y[0] =-0.11f; trian.
y[1] =-0.11f; trian.
y[2] =-0.11f;
113 trian.
z[0] = 0.00f; trian.
z[1] = 0.10f; trian.
z[2] = 0.05f;
114 obj->insertTriangle( trian );
115 trian.
x[0] = 0.00f; trian.
x[1] = 0.00f; trian.
x[2] = -0.05f;
116 trian.
y[0] =-0.11f; trian.
y[1] =-0.11f; trian.
y[2] =-0.11f;
117 trian.
z[0] = 0.00f; trian.
z[1] = 0.10f; trian.
z[2] = 0.05f;
118 obj->insertTriangle( trian );
131 CSetOfObjectsPtr ret = CSetOfObjects::Create();
133 CArrowPtr
obj = CArrow::Create(
138 obj->setColor(1,0,0);
142 obj = CArrow::Create(
146 obj->setColor(0,1,0);
150 obj = CArrow::Create(
154 obj->setColor(0,0,1);
166 CSetOfObjectsPtr ret = CSetOfObjects::Create();
169 vector<TPoint2D> level1;
170 level1.push_back(
TPoint2D(0.31, 0));
171 level1.push_back(
TPoint2D(0.22, 0.24));
172 level1.push_back(
TPoint2D(-0.22, 0.24));
173 level1.push_back(
TPoint2D(-0.31, 0));
174 level1.push_back(
TPoint2D(-0.22, -0.24));
175 level1.push_back(
TPoint2D(0.22, -0.24));
178 obj1->setLocation(0,0,
height);
180 obj1->setColor(0.6,0.6,0.6);
184 vector<TPoint2D> level2;
185 level2.push_back(
TPoint2D(0.16, 0.21));
186 level2.push_back(
TPoint2D(-0.16, 0.21));
187 level2.push_back(
TPoint2D(-0.16, -0.21));
188 level2.push_back(
TPoint2D(0.16, -0.21));
191 obj2->setLocation(0,0,
height);
193 obj2->setColor(0.2,0.2,0.2);
197 vector<TPoint2D> level3;
198 level3.push_back(
TPoint2D(-0.12, 0.12));
199 level3.push_back(
TPoint2D(-0.16, 0.12));
200 level3.push_back(
TPoint2D(-0.16, -0.12));
201 level3.push_back(
TPoint2D(-0.12, -0.12));
204 obj3->setLocation(0,0,
height);
206 obj3->setColor(0.6,0.6,0.6);
211 obj4->setLocation(0,0,0.73);
212 obj4->setColor(0,0,0.9);
216 obj5->setPose(
CPose3D(0.32,0,0.89,0,-1,0));
217 obj5->setColor(0,0,0.9);
228 CSetOfObjectsPtr ret = CSetOfObjects::Create();
232 vector<TPoint2D> level1;
233 level1.push_back(
TPoint2D(0.31, 0));
234 level1.push_back(
TPoint2D(0.22, 0.24));
235 level1.push_back(
TPoint2D(-0.22, 0.24));
236 level1.push_back(
TPoint2D(-0.31, 0));
237 level1.push_back(
TPoint2D(-0.22, -0.24));
238 level1.push_back(
TPoint2D(0.22, -0.24));
241 obj1->setLocation(0,0,
height);
243 obj1->setColor(1.0,0.6,0.0);
247 vector<TPoint2D> level2;
248 level2.push_back(
TPoint2D(0.13, 0.1));
249 level2.push_back(
TPoint2D(-0.13, 0.1));
250 level2.push_back(
TPoint2D(-0.13, -0.1));
251 level2.push_back(
TPoint2D(0.13, -0.1));
254 obj2->setLocation(0,0,
height);
256 obj2->setColor(1.0,0.6,0.2);
260 vector<TPoint2D> level3;
261 level3.push_back(
TPoint2D(0.03, 0.03));
262 level3.push_back(
TPoint2D(-0.03, 0.03));
263 level3.push_back(
TPoint2D(-0.03, -0.03));
264 level3.push_back(
TPoint2D(0.03, -0.03));
268 obj3->setLocation(0,0,
height);
270 obj3->setColor(0.6,0.6,0.6);
274 vector<TPoint2D> level4;
275 level4.push_back(
TPoint2D(0.03, 0.11));
276 level4.push_back(
TPoint2D(-0.03, 0.11));
277 level4.push_back(
TPoint2D(-0.03, -0.11));
278 level4.push_back(
TPoint2D(0.03, -0.11));
282 obj4->setLocation(0,0,
height);
284 obj4->setColor(1.0,0.6,0.0);
292 CSetOfObjectsPtr ret = CSetOfObjects::Create();
295 CArrowPtr
obj = CArrow::Create(
300 obj->setColor(1,0,0);
304 obj = CArrow::Create(
308 obj->setColor(0,1,0);
312 obj = CArrow::Create(
316 obj->setColor(0,0,1);
332 rect->setColor( 1, 0.8, 0 );
334 camera->insert( rect );
337 lCam->setColor( 1,0,0 );
340 rCam->setPose(
CPose3D(0.12,0,0) );
341 rCam->setColor( 0,0,0 );
343 camera->insert( lCam );
344 camera->insert( rCam );
352 CSetOfObjectsPtr ret = CSetOfObjects::Create();
355 CSimpleLinePtr lin = CSimpleLine::Create();
356 lin->setLineWidth(lineWidth);
357 lin->setColor(1,0,0);
358 lin->setLineCoords(0,0,0,
scale,0,0);
362 CSimpleLinePtr lin = CSimpleLine::Create();
363 lin->setLineWidth(lineWidth);
364 lin->setColor(0,1,0);
365 lin->setLineCoords(0,0,0, 0,
scale,0);
369 CSimpleLinePtr lin = CSimpleLine::Create();
370 lin->setLineWidth(lineWidth);
371 lin->setColor(0,0,1);
372 lin->setLineCoords(0,0,0, 0,0,
scale);
380 CSetOfObjectsPtr ret = CSetOfObjects::Create();
383 CSimpleLinePtr lin = CSimpleLine::Create();
384 lin->setLineWidth(lineWidth);
385 lin->setColor(1,0,0);
386 lin->setLineCoords(0,0,0,
scale,0,0);
390 CSimpleLinePtr lin = CSimpleLine::Create();
391 lin->setLineWidth(lineWidth);
392 lin->setColor(0,1,0);
393 lin->setLineCoords(0,0,0, 0,
scale,0);
401 CSetOfObjectsPtr ret = CSetOfObjects::Create();
404 CBoxPtr base = CBox::Create(
TPoint3D(-0.025,-0.025,-0.0575),
TPoint3D(0.025,0.025,-0.0185));
405 base->setColor(0.7,0.7,0.7);
409 CCylinderPtr cyl1 = CCylinder::Create(0.02f,0.02f,0.01f);
410 cyl1->setColor(0,0,0);
411 cyl1->setPose(
CPoint3D(0,0,-0.014));
415 CCylinderPtr cyl2 = CCylinder::Create(0.02f,0.0175f,0.01f);
416 cyl2->setColor(0,0,0);
417 cyl2->setPose(
CPoint3D(0,0,-0.004));
421 CCylinderPtr cyl3 = CCylinder::Create(0.0175f,0.0175f,0.01f);
422 cyl3->setColor(0,0,0);
432 CSetOfObjectsPtr ret = CSetOfObjects::Create();
435 CBoxPtr base = CBox::Create(
TPoint3D(-0.03,-0.03,-0.055),
TPoint3D(0.03,0.03,-0.014));
436 base->setColor(0,0,0);
440 CCylinderPtr cyl1 = CCylinder::Create(0.028f,0.024f,0.028f);
441 cyl1->setColor(0,0,0);
442 cyl1->setPose(
CPose3D(0,0,-0.014));
446 CCylinderPtr cyl2 = CCylinder::Create(0.028f,0.028f,0.01f);
447 cyl2->setColor(1,69/255.0,0);
452 CCylinderPtr cyl3 = CCylinder::Create(0.028f,0.028f,0.01f);
453 cyl3->setColor(0,0,0);
463 CSetOfObjectsPtr ret = CSetOfObjects::Create();
466 CBoxPtr cabin = CBox::Create(
TPoint3D(0.878,0.723,-0.12),
TPoint3D(-0.258,-0.723,-1.690));
467 cabin->setColor(0.7,0.7,0.7);
471 CBoxPtr back = CBox::Create(
TPoint3D(-0.258,0.723,-0.72),
TPoint3D(-5.938,-0.723,-1.690));
472 back->setColor(1,1,1);
476 CBoxPtr boomAxis = CBox::Create(
TPoint3D(-5.938,0.723,-1.0),
TPoint3D(-6.189,-0.723,-1.690));
477 boomAxis->setColor(0,0,0);
478 ret->insert(boomAxis);
481 CBoxPtr boom1 = CBox::Create(
TPoint3D(-5.938,0.723,-1.0),
TPoint3D(-6.189,11.277,-1.620));
482 boom1->setColor(0,1,0);
486 CBoxPtr boom2 = CBox::Create(
TPoint3D(-5.938,-0.723,-1.0),
TPoint3D(-6.189,-11.277,-1.620));
487 boom2->setColor(0,1,0);
491 CCylinderPtr cyl1 = CCylinder::Create(0.716f,0.716f,0.387f,30);
492 cyl1->setColor(0,0,0);
497 CCylinderPtr cyl2 = CCylinder::Create(0.716f,0.716f,0.387f,30);
498 cyl2->setColor(0,0,0);
503 CCylinderPtr cyl1 = CCylinder::Create(0.716f,0.716f,0.387f,30);
504 cyl1->setColor(0,0,0);
509 CCylinderPtr cyl2 = CCylinder::Create(0.716f,0.716f,0.387f,30);
510 cyl2->setColor(0,0,0);
static CCylinderPtr Create()
Classes for serialization, sockets, ini-file manipulation, streams, list of properties-values, timewatch, extensions to STL.
GLenum GLenum GLenum GLenum GLenum scale
CSetOfObjectsPtr OPENGL_IMPEXP RobotGiraff()
Returns a representation of RobotGiraff.
CSetOfObjectsPtr OPENGL_IMPEXP CornerXYZ(float scale=1.0)
Returns three arrows representing a X,Y,Z 3D corner.
GLsizei GLsizei GLuint * obj
CSetOfObjectsPtr OPENGL_IMPEXP CornerXYZEye()
Returns three arrows representing a X,Y,Z 3D corner.
CSetOfObjectsPtr OPENGL_IMPEXP RobotRhodon()
Returns a representation of Rhodon.
This base provides a set of functions for maths stuff.
CSetOfObjectsPtr OPENGL_IMPEXP CornerXYSimple(float scale=1.0, float lineWidth=1.0)
Returns two arrows representing a X,Y 2D corner (just thick lines, fast to render).
CSetOfObjectsPtr OPENGL_IMPEXP 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...
double DEG2RAD(const double x)
Degrees to radians.
CSetOfObjectsPtr OPENGL_IMPEXP RobotPioneer()
Returns a representation of a Pioneer II mobile base.
A class used to store a 3D point.
Classes for 2D/3D geometry representation, both of single values and probability density distribution...
static CPolyhedronPtr 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...
CSetOfObjectsPtr OPENGL_IMPEXP Househam_Sprayer()
Returns a simple 3D model of a househam sprayer.
A class used to store a 3D pose (a 3D translation + a rotation in 3D).
The namespace for 3D scene representation and rendering.
static CPolyhedronPtr CreateCubicPrism(double x1, double x2, double y1, double y2, double z1, double z2)
Creates a cubic prism, given the coordinates of two opposite vertices.
CSetOfObjectsPtr OPENGL_IMPEXP Hokuyo_UTM()
Returns a simple 3D model of a Hokuyo UTM scanner.
GLenum GLsizei GLsizei height
CSetOfObjectsPtr OPENGL_IMPEXP Hokuyo_URG()
Returns a simple 3D model of a Hokuyo URG scanner.
CSetOfObjectsPtr OPENGL_IMPEXP BumblebeeCamera()
Returns a simple 3D model of a PointGrey Bumblebee stereo camera.
static CSetOfObjectsPtr Create()