osg::Vec3 projectedPoint = osg::Vec3( x,y,z ) * camera->getViewMatrix() *
camera->getProjectionMatrix();
bool pointInFrustum = osg::BoundingBox( -1, -1, -1, 1,1,1 ).contains(
projectedPoint );

Cheers,
Wojtek Lewandowski

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf Of Robert
Balfour
Sent: Saturday, December 29, 2007 11:12 PM
To: [email protected]
Subject: [osg-users] Is point in view?


Is there a straight forward method to determine if a ground xyz target
point (or geode bbox centerpoint) is currently visible (i.e. within the
current view frustrum)?

I'm drawing a HUD target line, but don't want to draw it if the target
point is not in view.

Thanks.


Bob.
--
Robert E. Balfour, Ph.D.
Exec. V.P. & CTO,  BALFOUR Technologies LLC
960 South Broadway, Suite 108, Hicksville NY 11801
Phone: (516)513-0030  Fax: (516)513-0027  email: [EMAIL PROTECTED]
_______________________________________________
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