Dear All,
 
I am really puzzled by a problem and would appreciate it if anyone could offer any help with it.
 
I create a TransformGroup as shown below and add a series of child TransformGroups each of which has a Box Primitive as their child.
 
       TG
        ||
      //  \\
    TG  TG .....
     ||     ||  
   Box Box
 
I have used PickHighlightBehavior so that each Box on the rendered screen can be chosen and highlighted.
 
Now the logic of my program is such that each Box needs a unique ID. I wish to be able to retrieve that unique ID (just an integer) when the user picks it.
 
PickHighlightBehavior only retrieves the Shape3D that was picked and since the Box class consists of 6 Shape3Ds comprising each face of the Box, I cannot create a hashtable of Shape3D Boxes to unique ids and then do a match on the picked with the hashtable.
 
I have also tried extending both the Box and Appearance classes to store this id but to no avail.
 
Help kindly appeciated,
 
Best Regards,
 
Allistair Crossley

Reply via email to