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.J3dThread.run(J3dThread.java:250)

 from my behavoir code below , any Ideas ?

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);
                        Cone someCone = (Cone)sceneGraphPath.getObject();

                        float Ht=someCone.getHeight();
                        System.out.println("cone height="+" "+Ht);
                }
}


thanks,

Isaac

===========================================================================
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