Oh, it is great to see the ray intersector come out. I'll try it as
soon as possible.

Wang Rui (pronounce 'ray' :)

2012/9/19 PCJohn <[email protected]>:
> Hi Rui and Robert,
>
> I am attaching new RayIntersector class for infinite picking rays, derived 
> from
> LineSegmentIntersector. I tried to share as much code as possible. Send me any
> comments if you have.
>
> The most important decision, I made: I am using two Vec4d for start and end
> point to specify them in homogeneous coordinates (w coordinate can be set to
> zero to indicate point at infinity). I considered it more general to
> alternative option to specify it by two Vec3d, one for start point and second
> for direction. But it can be changed. Or, some constructor getting point and
> direction can be easily added. Ideas?
>
> Second decision: LineSegmentIntersector::Intersection is now sorted by
> distance (not ratio). distance is now prefered as it contains always valid
> value while ratio is valid when using LineSegmentIntersector or when
> RayIntersector's ray is of finite length.
>
> Rui: I hope that RayIntersector will work for your cases. If not, let me know.
>
> Robert: In short, I overriden intersect(), intersects() and intersectAndClip()
> methods of LineSegmentIntersector by homogeneous versions for RayIntersector.
> Then, I was forced to replace some occurences of LineSegmentIntersectors by
> RayIntersector in OSG sources. Finally, I tested it on osgPick example and I
> improved it a little bit.
>
> One note: Picking for objects at infinity is not supported yet as this is not
> what people are usually doing. But it might be not so difficult to implement 
> it
> with RayIntersector.
>
> Summary of changes:
> - RayIntersector class introduced for infinite ray support and infinite
> projection matrix
> - osgPick example extended to demonstrate infinite geometry and infinite
> projection matrix functionality
>
> John
> _______________________________________________
> osg-submissions mailing list
> [email protected]
> http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org
>
_______________________________________________
osg-submissions mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org

Reply via email to