1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
|
//----------------------début de la création de la rotation--------------------------------
TransformGroup WinRSpin=new TransformGroup();
// permet de modifier l'objet pendant l'execution
WinRSpin.setCapability(TransformGroup.ALLOW_TRANSFORM_WRITE);
// on crée un fonction de rotation au cours du temps
Alpha rotationAlphaWinRSpin=new Alpha(-1,4000);
Transform3D rot = new Transform3D();
rot.rotX((float)Math.PI/- 2.0f);
// on crée un comportement qui va appliquer la rotation à l'objet voulu
RotationInterpolator rotatorWinRSpin=new RotationInterpolator(rotationAlphaWinRSpin,WinRSpin, rot, 0.50f,(float)(2.0*Math.PI));
// on définit la zone sur laquelle va s'appliquer la rotation
BoundingSphere boundsWinRSpin=new BoundingSphere();
rotatorWinRSpin.setSchedulingBounds(boundsWinRSpin);
WinRSpin.addChild(rotatorWinRSpin);
//----------------------début de la création de la rotation-------------------------------- |
Partager