OpenInventor: Problems applying SoRayPickAction

Hi there,

i’ve got a problem using SGI Inventor. I’ve already posted this on the sgi dev-mailing list. Maybe someone can help me here (or at least can point me to a more specific forum).

Now my problem:

I am currently implementing an Node, which should position three Shapenode’s(the DiagnosticMirrors-Objects in the following source) with respect to the current Cameraview (or, in other words, places those nodes in the camera-coordinate system).

The node is inherited from SoShape and at initialisation creates an internal network of those shapenodes (as follows):

void SoAllSurfaceMirrors::createNetwork(){

root							 = new SoSeparator();


mirMirrorOne					 = new SoDiagnosticMirror;
mirMirrorTwo					 = new SoDiagnosticMirror;
mirMirrorThree					 = new SoDiagnosticMirror;

camCoords					     = new SoTransform;
pitch						     = new SoTransform;
extension						 = new SoTransform;
scale							 = new SoTransform;
tsfMirror				  	     = new SoTransform;



SoSeparator *sepMirrorOne       = new SoSeparator;




   ... (and so on)


This network is rendered into a Texture in the GLRender-Method using an SoGLRenderaction which shares its context with the calling (the SoGLRenderAction which called GLRender) SoGLRenderaction.
(this part works just fine).

Now i want to change the appearance of the Shape/DiagnosticMirror-Node based on user-input (e.g. draw/highlight the mirrors in a different color, if the user’s mouse cursor is over those objects). Basically i need to be able to pick those nodes of the internal network.

Therefore i tried to use the handleEvent-Method (afaik the SoHandleEventAction is doing picking as well) which didn’t turned out to be working. (Of course it doesn’t, since the Action doesn’t know anything about the internal network)

The next thing i tried, was invoking an SoRayPickAction on the network which doesn’t work either because this action needs an existing camera volume to be able to pick something.

Now, if i create a new (internal) network which consists of a new seperator and two childs:SoOrthographic/PerspectiveCamera and the already existing root, the SoRayPickAction is doing something. Unfortunately the viewvolume of the camera in the internal network does not update to the view volume of the “outer” camera.

So my question: Is there a way to set the ViewVolume of the internal camera/the SoRaypickaction (to the ViewVolume etc. of the outer camera)?


P.S.: Please let me know if you need further sources

Very interested, set the ViewVolume of the internal camera/the SoRaypickaction? it seem can’t support currently.