Hi Aurelien,

You can't computationally intersect infinitely thin lines with with
infinitely thin line segments so what you are asking specifically
isn't possible.

What you are probably after is intersecting a scene with a cone or
cylinder rather a line segment.  Is is that you are implementing
screen picking?  What exactly you trying to achieve will affect what
approach you will want to take.

Robert.

On Tue, Oct 11, 2011 at 5:16 PM, Aurelien Albert
<[email protected]> wrote:
> Hi,
>
> I've implemented picking in my application using 
> "pView->computeIntersection(...)" which use a LineSegmentIntersector
>
> In my scene, I have some custom geometry and one of these custom geometry is 
> made of lines, like this :
>
>
> Code:
> p_geode = new osg::Geode()
> p_geometry = new osg::Geometry();
> p_vertices = my vertices array;
> p_primitive = new osg::DrawArrays();
>
> p_primitive->setMode(osg::PrimitiveSet::LINE_STRIP);
> p_primitive->setFirst(0);
> p_primitive->setCount(p_vertices->size());
> p_geometry->setVertexArray(p_vertices);
> p_geometry->addPrimitiveSet(p_primitive);
>
> p_geode->addDrawable(p_geometry);
>
>
>
> This geode is never intersected by the LineSegmentIntersector.
>
> If I use a PolytopeIntersector, this geode can be picked.
>
> In my company, we have C++ code which compute segment-segment intersection, 
> so, as a personal training, I would like to extend LineSegmentIntersector to 
> intersect the lines geode with our code.
>
> Could someone show me where to start ?
>
> Regards,
> Aurelien
>
> ------------------
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=43319#43319
>
>
>
>
>
> _______________________________________________
> 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