Go to the documentation of this file.
40 win.setCameraAzimuthDeg(-50);
41 win.setCameraElevationDeg(40);
42 win.setCameraZoom(19);
43 win.setCameraPointingToPoint(2, 2, 0);
49 mrpt::make_aligned_shared<opengl::CGridPlaneXY>(
50 -20, 20, -20, 20, 0, 1);
51 obj->setColor(0.4, 0.4, 0.4);
52 theScene->insert(
obj);
64 theScene->insert(
obj);
71 theScene->insert(
obj);
77 obj->setName(
"slerp_obj");
79 theScene->insert(
obj);
83 win.unlockAccess3DScene();
85 cout <<
"\n Close the window to exit.\n";
88 static const double MOVE_PERIOD = 1.0;
89 static const double MOVE_PERIOD2 = 2 * MOVE_PERIOD;
94 double t = ::fmod(tic.
Tac(), MOVE_PERIOD2);
98 t = 1 - (
t - MOVE_PERIOD) / MOVE_PERIOD;
108 obj1->setPose(pose_interp);
116 win.unlockAccess3DScene();
120 std::this_thread::sleep_for(5ms);
134 catch (std::exception& e)
136 std::cout <<
"MRPT exception caught: " << e.what() << std::endl;
141 printf(
"Untyped exception!!");
std::shared_ptr< CGridPlaneXY > Ptr
GLenum GLsizei GLenum format
A high-performance stopwatch, with typical resolution of nanoseconds.
GLsizei GLsizei GLuint * obj
std::shared_ptr< CRenderizable > Ptr
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
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...
Classes for 2D/3D geometry representation, both of single values and probability density distribution...
void slerp(const CQuaternion< T > &q0, const CQuaternion< T > &q1, const double t, CQuaternion< T > &q)
SLERP interpolation between two quaternions.
double Tac() noexcept
Stops the stopwatch.
mrpt::gui::CDisplayWindow3D::Ptr win
A RGB color - floats in the range [0,1].
Lightweight 3D pose (three spatial coordinates, plus three angular coordinates).
std::shared_ptr< CSetOfObjects > Ptr
Classes for creating GUI windows for 2D and 3D visualization.
This base provides a set of functions for maths stuff.
std::shared_ptr< COpenGLScene > Ptr
The namespace for 3D scene representation and rendering.
A graphical user interface (GUI) for efficiently rendering 3D scenes in real-time.
@ MRPT_GLUT_BITMAP_TIMES_ROMAN_24
Page generated by Doxygen 1.8.17 for MRPT 1.9.9 Git: ad3a9d8ae Tue May 1 23:10:22 2018 -0700 at miƩ 12 jul 2023 10:03:34 CEST | |