*I wrote it using a translator. Please understand if there is any
awkwardness in the sentence.*
One object is moving in the path A -> B, B->C, C-D (using AnimationPath).
And I need to know in what path the moving object is moving.
I think you need to know if the line and point intersect to figure this out.
I thought I should use LineSegmentIntersection to check whether a line and
a point intersect.
I found the part in LineSegmentIntersection that sets the line (path)
coordinates, but I don't find a function to check if the
LineSegmentIntersection and point intersect.
---example
osg::Vec3d start(128.0, 37.0, 250); //wgs84, longitude, latitude,
altitude
osg::Vec3d end(128.0, 37.0005, 750); //wgs84, longitude, latitude, altitude
osg::ref_ptr lis = NULL;
lis = new osgEarth::DPLineSegmentIntersector(start, end)
osgUtill::IntersectionVisitor iv(lis.get())
--
--
osg::ref_ptr node = _node
node->accept(iv);
if(lis->containsIntersections())
{
..
I tried running it in the same way as above, but there was no true result
even though the object coordinates belong to the line coordinates.
I think the part of setting the point coordinates in that code is wrong.
How do I set the point coordinates to get the desired result?
--
You received this message because you are subscribed to the Google Groups
"OpenSceneGraph Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to osg-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/osg-users/ff9f8914-3012-4e37-85bf-ed286189c6e4n%40googlegroups.com.
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org