Re: [osg-users] Draw line in 3D screen

2012-01-12 Thread Lalit Manchwari
Hi, Thks Robert and Shayne I solve my problem with your direction. Cheers, Lalit -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=44767#44767 ___ osg-users mailing list

Re: [osg-users] Draw line in 3D screen

2012-01-10 Thread Robert Osfield
Hi Lalit, In the past I've tackled problems like drawing from mouse coords into 3D by creating a ray from the mouse coords and then intersecting this with a plane. The maths for computing the intersection point can be handled by the osg::Plane class, there is no need to use the high level scene

Re: [osg-users] Draw line in 3D screen

2012-01-09 Thread Lalit Manchwari
Dear Robert: Thanks for input. I am trying to re-phrase my question. I have loaded a 3D data (X,Y,Z) on screen and can see these points as in screenshot_1. Also, I can, using mouse, draw line through these points (also shown.) However, if I want to draw a line as shown in screenshot_2, I am

Re: [osg-users] Draw line in 3D screen

2012-01-09 Thread Tueller, Shayne R Civ USAF AFMC 519 SMXS/MXDEC
- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Lalit Manchwari Sent: Monday, January 09, 2012 5:50 AM To: osg-users@lists.openscenegraph.org Subject: Re: [osg-users] Draw line in 3D screen Dear Robert: Thanks for input. I am trying

Re: [osg-users] Draw line in 3D screen

2012-01-09 Thread Lalit Manchwari
Dear Shayne I use polytope to pick the 3D coordinate of data. …….. osg::ref_ptrosgUtil::PolytopeIntersector picker; picker = new osgUtil::PolytopeIntersector(osgUtil::Intersector::WINDOW, x-w, y-h, x+w, y+h ); osgUtil::IntersectionVisitor iv( picker ); viewer-getCamera()-accept( iv );

Re: [osg-users] Draw line in 3D screen

2012-01-06 Thread Robert Osfield
Hi Lalit, I suspect you haven't got any replies because it's impossible to work out what you are actually wanting to achieve with drawing your line - you need to provide constraints on where you'd want to place the vertices of the line, unless you tell us what these constraints might be, we can't

Re: [osg-users] Draw line in 3D screen

2011-12-20 Thread Tolga Yilmaz
Hi, a simple line drawing code is below but i'm sure you want more complicated solition. Below you can update the start and end points on the fly by osgGA mouse movement. Code: osg::Vec3 sp(0,-180,120); osg::Vec3 ep(0,480,120); osg::ref_ptrGeometry beam( new osg::Geometry);

[osg-users] Draw line in 3D screen

2011-12-02 Thread Lalit Manchwari
Hi, I am loading a large number of 3D points (X, Y, Z) on OSG. I want to draw line on screen not necessarily passing through loaded points. I am using osgUtil::PolytopeIntersector but it draws lines which essentially pass through loaded points. What can be done to draw line by movement of