Try Pangolin(1)

Tried to modify parameters in given examples on https://github.com/stevenlovegrove/Pangolin/tree/master/examples.


Reference: http://docs.ros.org/fuerte/api/pangolin_wrapper/html/index.html.


(1) HelloPangolin.cpp

Original Result: (With pangolin::ProjectionMatrix(1680,1480,420,420,320,240,0.2, 100))


After commenting out "glEnable(GL_DEPTH_TEST);", I got:


 According to https://www.khronos.org/opengles/sdk/docs/man/xhtml/glEnable.xml, GL_DEPTH_TEST, if enabled, do depth comparisons and update the depth buffer.

3D handler syntax:

  
    pangolin::Handler3D shandler(s_cam);
    pangolin::View& d_cam = pangolin::CreateDisplay()
        .SetBounds(0.0, 1.0, 0.0, 1.0, -640.0f/480.0f)
        .SetHandler(&shandler);


//Here "handler" and "s_cam" are just names made by the user.

About .SetBounds and .SetHandler:


Modified some parameters:

With pangolin::ProjectionMatrix(1680,1480,420,420,320,240,0.2, 100), I got:

With pangolin::ProjectionMatrix(1680,1480,420,220,320,240,0.2, 100), I got:

With pangolin::ProjectionMatrix(680,480,420,420,620,240,0.2, 100), I got:


With pangolin::ModelViewLookAt(2,2,-2,0,0,0, pangolin::AxisY), I got the cube flipped horizontally as below:


With pangolin::ModelViewLookAt(2,-2,2,0,0,0, pangolin::AxisY), I got the cube flipped both horizontally and vertically as below:


According to: https://www.opengl.org/sdk/docs/man2/xhtml/glClear.xml, glClear sets the bitplane area of the window to values previously selected by glClearColor, glClearIndex, glClearDepth, glClearStencil, and glClearAccum.


Without glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT), I got:


Because the bitplane area of the window is not cleaned.

 And without d_cam.Activate(s_cam), the result would be:





  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 3
    评论
评论 3
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值