Hello:

I would appreciate any help/advice to direct me in the right direction->

I need to project a marker on a sphere in such a way that its 
coordinates when projected back on the viewport (screen coordinates) 
remain constant regardless camera movements/panning/dragging/pitch 
changes, etc. For a number of reasons this cannot be done using intersector.

The marker has to follow the camera motion "gliding" on the sphere's 
surface in any direction (or a little above it) but the projected 
coordinates should not change and ideally be located in the center of 
the viewport.

If that were done using the intersector the OSG code would be, e.g.:

---
if 
(viewer->computeIntersections(ea.getWindowX()+0.5*ea.getWindowWidth(),ea.getWindowY()+0.5*ea.getWindowHeight(),intersections))
        {
          const osgUtil::LineSegmentIntersector::Intersection& 
intersection = *(intersections.begin());

          osg::Vec3 markerXYZ = intersection.getWorldIntersectPoint(); 
// marker on the sphere
         .....
}

Appreciate any guidance/advice,
Janusz Goldasz
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to