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!

setting the view

843799Dec 14 2001 — edited Dec 15 2001
I am using the SimpleUniverse and want to set the view to (0, 2, 2) such that the "eye position" is 2meters up the Y axis and 2 meters up the z axis. However, no matter what values I put in the vector, only the Z axis seems to be changed. Thus, I seem to only be able to move closer or farther away from the origin. Here is my code snipet:

mainScene = createSceneGraph();
u = new SimpleUniverse(c);
ViewingPlatform viewingPlatform = u.getViewingPlatform();
TransformGroup vpTrans = viewingPlatform.getViewPlatformTransform();
Transform3D transform = new Transform3D();
Vector3f translate = new Vector3f(0.0f, 2.0f, 2.0f);
transform.setTranslation(translate);
vpTrans.setTransform(transform);

The object I am viewing is a room, and right now my "eye level" is on the floor. Can anyone tell me what I am doing wrong?
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jan 12 2002
Added on Dec 14 2001
3 comments
116 views