Положение 3d Фигуры

  • Автор темы Guest
  • Дата начала
G

Guest

#1
Доброго времени суток.

Создал вращающуюся фигуру
Код:
public universe(){
super(SimpleUniverse.getPreferredConfiguration());
SimpleUniverse Universe = new SimpleUniverse(this);
BranchGroup scene  = new BranchGroup();

BoundingSphere bounds = new BoundingSphere(new Point3d(0.0f,0.0f,0.0f),100.0);
TransformGroup transformGroup = new TransformGroup();
transformGroup.setCapability(transformGroup.ALLOW_TRANSFORM_WRITE);
transformGroup.setCapability(transformGroup.ALLOW_TRANSFORM_READ);

Appearance appearance = new Appearance();
Material  material = new Material();
appearance.setMaterial(material);

ViewingPlatform viewingPlatform = Universe.getViewingPlatform();
viewingPlatform.setNominalViewingTransform();

Box shape = new Box(0.3f, 0.03f, 0.08f, Box.GENERATE_NORMALS | Box.GENERATE_TEXTURE_COORDS,appearance);

Alpha alpha = new Alpha();
alpha.setIncreasingAlphaDuration(5000);

Transform3D transform3D = new Transform3D();
transform3D.rotX(0);

RotationInterpolator spinner = new RotationInterpolator(alpha, transformGroup);
spinner.setAxisOfRotation(transform3D);
spinner.setSchedulingBounds(bounds);

transformGroup.addChild(spinner);  
transformGroup.addChild(shape);

lightColor = new Color3f();
directionLight = new DirectionalLight();
lightColor = new Color3f();
lightColor.set(Color.yellow);	 
directionLight.setColor(lightColor);
directionLight.setInfluencingBounds(bounds);	 

scene.addChild(directionLight);
scene.addChild(transformGroup);

Universe.addBranchGraph(scene);
}
Не могу понять как можно поменять координаты расположения этой фигуры. Если ее не крутить то через метод setTranslation.