Problems with rotX, rotY and rotZ

Hello. I am trying to get rotations about an axis to work for me but I can’t get them to work. Basically I have an entire scene created and can’t get it to rotate using rotX, rotY and rotZ.

The scene originally places me at a point along the z-axis but I want the user to be on the x-axis. So I have tried using a 90 degree rotation about the y-axis to get the user to that point but it doesn’t do anything. Below is the transformation group that I am using.

// Transform Group used to rotate entire scene
TransformGroup objRotate = new TransformGroup();
javax.media.j3d.Transform3D tp3d = new javax.media.j3d.Transform3D();
double rot = 1.571;
tp3d.rotY(rot);
objRotate.setTransform(tp3d);
objRoot.addChild(objRotate);

Any ideas? You can view the full source at http://www.astroh.org/SphereMotion.java

Thanks!
Michael

What is objRoot? Where is your Shape3D placed in all of this?

What do oyu mean “places me”. Are you trying to move a shape or your viewpoint? The code you showed suggested you are moving a shape in the scene…

JK

I’m trying to move the perspective of the person viewing the shapes. I figured rotating the shapes in one direction would be just like moving the viewer in the opposite direction (or opposite rotation in this case).

objRoot is a branchgroup that consists of all of the shapes that I have created. I added all of my shapes to objRoot before I am attempting this transformation. These are mainly spheres and ellipsoids.

I’d rather move the user instead of the shapes in my transform but am unsure how to do it without simply rotating the shapes.

If you view my source at the above mentioned link, the initial branchgroup that is created pretty much includes the necessary information and there isn’t much beyond it that is needed.