Hello to everyone.
I'm studying the Java3D tutorial and I just finished the first chapter.
I'm trying to answer the third question posed in the last paragraph of the first chapter (1.11 Self Test) but I can not combine the rotation and the spin target transform of HelloJava3Dd into one TransformGroup object.
I modified the code as follows (in createSceneGraph method):
BranchGroup objRoot = new BranchGroup();
Transform3D rotate = new Transform3D();
Transform3D tempRotate = new Transform3D();
TransformGroup objSpin = new TransformGroup(rotate);
Alpha rotationAlpha = new Alpha(-1, 4000);
RotationInterpolator rotator = new RotationInterpolator(rotationAlpha, objSpin);
BoundingSphere bounds = new BoundingSphere();
The problem is that i only see the spin target transform and the cube remains in its original position without being rotated, though the object is created departing from TransformGroup object Transform3D.
I hope I was clear,
Edited by: 892275 on Oct 19, 2011 8:15 AM
Edited by: 892275 on Oct 19, 2011 8:16 AM