Skip to Main Content

Java SE (Java Platform, Standard Edition)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Java 3D: making a sphere rotate like a planet.

843799Mar 27 2006 — edited Mar 27 2006
Hey guys, could anyone possible show me to make a spher rotate on its axis, like a plant? I'm fairly new to java 3d.


Sphere sp = new Sphere(.4f, Sphere.GENERATE_TEXTURE_COORDS, earthApp);
t.set(1.0, new Vector3d(0f, 0f, 0f));
TransformGroup tg1 = new TransformGroup(t);
tg1.addChild(sp);

mainTG.addChild(tg1);

That basically puts a sphere in the middle of the screen, earthApp references a file called earth.JPG which colours the sphere to make it look like the earth.

But i need help rotating it guys!
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Apr 24 2006
Added on Mar 27 2006
1 comment
465 views