Closed phocoena-sinus closed 9 years ago
Can't see the screenshot
A sample screenshot is shown in https://app.box.com/s/2coug8kymqr2q3q6dq2w
I ran your code on Ubuntu 14.04 64bit (mrpt 1.0.2 and 1.2.2) but the arrows look ok to me. Maybe post a full working example? where you fill out the pose of the arrows also.
Thanks for looking into this. Your question made me think of something else, and I think that's what's causing the incorrect rendering I see. Test your code using the values 4428236.059665, 585360.461802, 0 for jeepPose.x(), jeepPose.y() and jeepPose.z() respectively. These values come from the UTM coordinates I was using in my test. If I use local coordinates instead (i.e. much smaller values), everything is rendered correctly.
Hum! Interesting, so it was a cause of floating number accuracy :-) Thanks for writing back for the records.
Perhaps you can still use UTM coordinates if placing stuff inside a CSetOfObjects in local coordinates, then moving that object to UTM coords. It will be up to the graphic card accuracy then...
(Marking as closed)
Thank you!
I am trying to figure out some unexpected effects when rendering OpenGL objects. For instance, when rendering a CornerXYZ object, the tips of the arrows sometimes appear shifted away from the lines--even though the 3 lines are perfectly aligned to each other.
file:///home/lnavarro/Desktop/Screenshot-Sample%20CornerXYZ.png
This happens with mrpt-1.2.2, running on Ubuntu 10.04LTS 32bits and Ubuntu 12.04 32bits.
The relevant sample test code is
mrpt::gui::CDisplayWindow3D *win3D = new mrpt::gui::CDisplayWindow3D("Sample CornerXYZ", 600, 500); win3D->setCameraZoom(70); win3D->setCameraAzimuthDeg(-90); win3D->setCameraElevationDeg(90);
mrpt::opengl::COpenGLScenePtr scene = mrpt::opengl::COpenGLScene::Create(); mrpt::opengl::COpenGLViewportPtr view = scene -> getViewport( "main" );