Login  Register

PickTool.pickAllSorted() returns null when enabling on-screen rendering

Posted by Schorsch on Jul 17, 2015; 8:41am
URL: https://forum.jogamp.org/PickTool-pickAllSorted-returns-null-when-enabling-on-screen-rendering-tp4034922.html

Hi there,

I use a SimpleUniverse with the PickTool from the package com.sun.j3d.utils.picking (and not from pickfast).

If I create the universe with an off-screen Canvas3D, then PickTool.pickAllSorted() returns a proper list of PickResult. However, if I create the universe with an on-screen Canvas3D, then PickTool.pickAllSorted() returns just null.

Can anybody tell me what the problem is here? See the two relevant source files attached.
VirtualMeasurementUniverse.java
Measurement3D.java

Note, that the pickable objects are added to the scene by means of the method Measurement3D.addMeasurementObject(BranchGroup p_oMeasurementObject) where p_oMeasurementObject has the following flags:
        a_oMeasurementObject.setCapability(BranchGroup.ALLOW_CHILDREN_READ);
        a_oMeasurementObject.setCapability(BranchGroup.ALLOW_CHILDREN_WRITE);
        a_oMeasurementObject.setCapability(BranchGroup.ALLOW_CHILDREN_EXTEND);
        a_oMeasurementObject.setCapability(BranchGroup.ALLOW_DETACH);

Thanks a lot in advance,
Schorsch