我正在寫一個Java Applet唱歌Java3D,並希望在單擊按鈕時重置鼠標在MouseRotate行爲中的旋轉。相關代碼如下:如何在Java3D中重置鼠標旋轉?
BoundingSphere bound =
new BoundingSphere(new Point3d(0.0,0.0,0.0), 100.0);
MouseRotate mouseRotate = new MouseRotate();
TransformGroup modelGroup = new TransformGroup();
mouseRotate.setTransformGroup(modelGroup);
modelGroup.addChild(mouseRotate);
mouseRotate.setSchedulingBounds(bound);
謝謝,但它沒有奏效。每當我使用initialize()方法時,出現以下錯誤: 線程「AWT-EventQueue-0」中的異常java.lang.IllegalStateException:必須從initialize或processStimulus調用wakeupOn – Hassan 2011-12-25 06:17:49