Closed ebadi closed 3 years ago
I just compiled on Windows. Same behavior. Not ideal, but at least it is consistent across platforms. :)
As 3D navigation also does not work, I suspect mouse events are not forwarded to the OSG component at all.
Thanks, so it is probably has nothing to do with the version mismatch (osgQt, OSG, etc). I am now debugging this part of the cod. It seems that mOsgMain->PickNode
never returns a valid node.
I even tried to change the code as below but that was not the solution.
OSGObjectNode *lLastPicked = mOsgMain->PickNode(width()-e->x(), height()-e->y());
It seems that mViewer->computeIntersections(x,y,intersections)
in OSGMain::PickNode
returns no node. In this line we have valid mouse coordinates (x,y) but the function returns false eventhough there are nodes in the viewport (either after loading the sample .xodr file or after drawing a basic road).
computeIntersections
public boolean computeIntersections(float x,
float y,
INTERSECTVISITORHitList hits)
compute, from normalized mouse coords, for all Cameras, intersections with the scene. parameters:
Parameters:
x - float
y - float
hits - openscenegraph.osgUtil.INTERSECTVISITORHitList
Ok, now I got access to a Windows machine and I see that the OpenRoadEd's Windows binary acts exactly the same as our version of OpenRoadEd. In the tree view, you can select a node and its corresponding object changes its color (as shown below). When you click on an object in 3D view nothing changes in the tree view which is consistent across platforms. Please reopen this issue if I am missing sth :)
Using Windows pre-compiled binary, it is possible to select an element in 3D view area to see its properties, however on Linux, clicking and selecting an item is not possible.
I suspect that the issue has something to do with the CameraManipulator class.
To Check: Whether the version compiled on Windows with Qt5 behaves correctly.