Hi,

I am wondering if anyone can help me. I have loaded a vrml file into my
Java3D scene, assign a setUserData method to the branchgroup with a
relative
name. I have a separate pick routine that i would like to detect what
object
i have selected by using the getUserData method.

The problem is that i am assigning a name to a branch group and when i
do
the pick i am returned a shape object. I want these objects to be the
same
but i can't find an instruction which will either assign a getUserData
command to shape3D from the vrml loaded file or a pick behaviour which
returns the branchgroup clicked.

//=========LOADER & ASSIGN =============
// Call VRML Loader with 'TopfileA.wrl'
  Scene scene = loadVrmlShape(slocation+fileName);
shapeBG    = scene.getSceneGroup(); // get scene branch group
shapeBG.setUserData("StartObj");


//========= PICKING ===================

Node shapeClicked = null;
    // Get Object Data to determine part
      shapeClicked = (Node) pickResultArray[i].getObject();
      Object shapeSelected = shapeClicked.getUserData();


Paul Watson (Senior Design Consultant)
www.rcid.ncl.ac.uk
Resource Centre for Innovation in Engineering Design
Bruce Building
University of Newcastle Upon Tyne
Newcastle Upon Tyne
NE1 7RU, UK Tel: 0191 222 5306 

==========================================================================To 
unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff JAVA3D-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".

Reply via email to