[osg-users] [Auto-Reply] I'm driving right now - I'll get bac...

2020-11-17 Thread OpenSceneGraph Users
[Auto-Reply]  I'm driving right now - I'll get back to you later.
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] I want to know whether a line and a point intersect.

2020-11-17 Thread OpenSceneGraph Users
*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


Re: [osg-users] How can I know the number of GUIEventAdapter::USER in the message queue for GUIEventHandler?

2020-11-17 Thread OpenSceneGraph Users
On Tue, 17 Nov 2020 at 11:55, OpenSceneGraph Users <
osg-users@lists.openscenegraph.org> wrote:

> Thank you for your questions.I want to know if the sent
> GUIEventAdapter::USER message has been processed completely.
>
> Check whether GUIEventAdapter::USER has been processed completely. Should
> I count the USER by myself?
>

It's up to your application to decide when your USER events are "processed
completely", as what "processed completely" is completely meaningless to
the OSG itself.

It really feels like you are asking questions from the community when you
are the only one who can answer it.

You have access to the whole OSG code base.  You can build in debug, step
through every single line of code.  You have everything you need to figure
out what is going on.

We know NOTHING about your application, only *you* know about your
application and what you mean.  We aren't omnipotent. We can't see inside
your head, look over your shoulder to your code.

You will need to determine the answers from here.
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org