As a remedial solution, why don't you set the TriangleFanArray's userData with a ref to the Cone object, i.e ta.setUserdata(someCone), assuming the two are associated with each other.
ps. did you ever post your solution to the setcapabilites stuff you claimed to be the last 1% :) --- "Brobbey,Isaac (neuron)" <[EMAIL PROTECTED]> wrote: > Dear all: > > this is my scenegraphPath > > scenegraphPath = javax.media.j3d.Locale@10dc656 : > com.sun.j3d.utils.geometry.Cone, > Protein@1584807 : > javax.media.j3d.Shape3Djavax.media.j3d.TriangleFanArray@e0e515 > > LocalToVworld Transform: > 0.0375749076740305, -0.005965948985267853, > -0.012350453208999744, > 0.121357668535 > 06424 > > i want to get the cone from the scenegraphPath, any > Ideas ? > this is my code snippet > > public void processStimulus (Enumeration > criteria) > { > SceneGraphPath sceneGraphPath=null; > AWTEvent[] event = > ((WakeupOnAWTEvent)criteria.nextElement()).getAWTEvent(); > for (int i=0; i<event.length; i++) > { > int x = > ((MouseEvent)event[i]).getX(); > int y = > ((MouseEvent)event[i]).getY(); > System.out.println("x="+" > "+x); > PickRay pickRay = > generatePickRay(x,y); > > sceneGraphPath = > branchGroup.pickAny(pickRay); > System.out.println("scene > graph="+" > "+sceneGraphPath.toString()); > Cone someCone = > (Cone)sceneGraphPath.getObject(); > > float > Ht=someCone.getHeight(); > System.out.println("cone > height="+" "+Ht); > } > } > > i know there a cone in the path, ,but how do i do a > cast to retrieve the > cone ? it seems like i am getting something > different other than a cone from > the terminal Node. > > thanks, > > Isaac > -----Original Message----- > From: Brendan Cleary > To: [EMAIL PROTECTED] > Sent: 1/30/03 1:30 PM > Subject: Re: [JAVA3D] Class cast Exception > > Try doing a System.out.println(sceneGraphPath) to > see what the paths > terminal node is, this is the node that getNode() > returns. > If its not a Cone object (and it probably won't be), > this is what is > causing > the cast exception. > > ======================================================================== > === > 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". > > =========================================================================== > 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". __________________________________________________ Do you Yahoo!? Yahoo! Mail Plus - Powerful. Affordable. Sign up now. http://mailplus.yahoo.com =========================================================================== 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".