PolytopeIntersector should do what you want, alternately you can fire off
lines from the four corners of the screen.


On Mon, Jan 14, 2013 at 2:36 AM, Sergey Polischuk <[email protected]> wrote:

> 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
>
>


-- 
Chris 'Xenon' Hanson, omo sanza lettere. [email protected]
http://www.alphapixel.com/
Training * Consulting * Contracting
3D * Scene Graphs (Open Scene Graph/OSG) * OpenGL 2 * OpenGL 3 * OpenGL 4 *
GLSL * OpenGL ES 1 * OpenGL ES 2 * OpenCL
Digital Imaging * GIS * GPS * osgEarth * Terrain * Telemetry * Cryptography
* Digital Audio * LIDAR * Kinect * Embedded * Mobile * iPhone/iPad/iOS *
Android
@alphapixel <https://twitter.com/alphapixel> facebook.com/alphapixel (775)
623-PIXL [7495]
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to