Re: [osg-users] LineSegment and Plane Intersection
Hi Renan, There isn't a convenience function in Plane or LineSegment for computing the intersection point, but there are maths functions in Plane to help you. Rather than me try to explain the maths of how to compute a intersection of line with a plane it would be best to consult online texts written on vector maths as these will make a much better job of it than I. Robert. On Feb 17, 2008 11:45 AM, Renan Mendes [EMAIL PROTECTED] wrote: Hi, everyone. I'm having some trouble with computing the coordinates of the intersection between a osg::Plane and an osg::LineSegment. In addition, I'd like to be able to compute only the intersection with the plane, and forget about the rest of my scene... Is it possible? Thanks, Renan M Z Mendes ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] LineSegment and Plane Intersection
Hi, Robert. I am aware of the analytical way of solving my problems. Thanks, anyway. Renan M Z Mendes ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] LineSegment and Plane Intersection
The osgUtil::IntersectionVisitor has the foolowing applys: virtual voidapply (osg::Node node) virtual voidapply (osg::Geode geode) virtual voidapply (osg::Billboard geode) virtual voidapply (osg::Group group) virtual voidapply (osg::LOD lod) virtual voidapply (osg::PagedLOD lod) virtual voidapply (osg::Transform transform) virtual voidapply (osg::Projection projection) virtual voidapply (osg::Camera camera) That means that can call the accept method of your plane Geode, and as argument you have an osgUtil::IntersectionVisitor with the Intersector set to osgUtil::LineSegmentIntersector. The osgUtil::LineSegmentIntersector object will the contain the intersections. Renan Mendes wrote: Hi, Robert. I am aware of the analytical way of solving my problems. Thanks, anyway. Renan M Z Mendes ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org begin:vcard fn:Per Rosengren n:Rosengren;Per org:KTH;CVAP adr:;;KTH;Stockholm;;SE-100 44;Sweden email;internet:[EMAIL PROTECTED] title:Ph.D. student tel;work:+46 8 790 6203 tel;fax:+46 8 723 0302 note:PGP keyID: 0xD40DD8E0 x-mozilla-html:FALSE url:http://www.csc.kth.se/~perrose/ version:2.1 end:vcard ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org