I believe you can use osgUtil::PolytopeIntersector for this purpose, but i didn't used it myself and can't say much more than that.
 
14.01.2013, 12:51, "Yansi Yao" <[email protected]>:
Thanks for your reply, Sergey. I will try it.
BTW, sometimes, I want to detect the intersection between the camera frustum and the terrain. So, is there any way to detect the intersection between a bounding sphere(or box) and the terrain in OSG?
 
Cheers
yaoyansi
 

发件人: Sergey Polischuk <[email protected]>
收件人: OpenSceneGraph Users <[email protected]>
发送日期: 2013年1月14日, 星期一, 4:34 下午
主题: Re: [osg-users] how to keep the camera from being below the terrain?

Hi
 
there is no collision detection in osg. You can use intersectors in osgUtil and trace rays from camera downwards to check distance from ground, or use some physics engine to get proper collision detection.
 
Cheers.
 
13.01.2013, 20:51, "Yansi Yao" <[email protected]>:

Hi all,
I'm going to attach a bounding box or bounding sphere to the camera, and detect the collision between the terrain and the bounding object. But I don't know how to detect this collision in osg. Could you tell me how to do this? or is there any demo for this problem?

Cheers
yaoyansi
,
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


,

_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to