Re: [JAVA3D] Class cast Exception // Important

2003-01-31 Thread greg baboolal
t > 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 > differe

[JAVA3D] Class cast Exception // Important

2003-01-31 Thread Brobbey,Isaac (neuron)
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.12

Re: [JAVA3D] Class cast Exception

2003-01-30 Thread Kevin Glass
To state the obvious, either: 1) The criteria.nextElement() doesn't return a WakeupOnAWTEvent (Unlikely) 2) The events returned arn't MouseEvents (quite possible) 3) Or the pick ray doesn't hit a "Cone" object (very possible) In any of theses cases, just print out the class of the thing (using .g

Re: [JAVA3D] Class cast Exception

2003-01-30 Thread Brendan Cleary
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. =

[JAVA3D] Class cast Exception

2003-01-30 Thread Brobbey,Isaac (neuron)
Dear all: i am getting a class cast exception Exception occurred during Behavior execution: java.lang.ClassCastException at PickBehavia.processStimulus(Testhandler.java:2184) at javax.media.j3d.BehaviorScheduler.doWork(BehaviorScheduler.java:172) at javax.media.j3d.J3dThre