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
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
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
-
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
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 );
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
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);
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
8 matches
Mail list logo