ViewingPlatform

Hi, im starting with java3d and im using the simple universe. I set the ViewingPlatform by using the SimpleUniverse.getViewingPlatform.setNominalViewingPlatform() method. That sets the ViewingPlatform to view the x axis in the range from -1 to 1. How can i set it myself? I cant find any tutorial around the internet... do you know about any?

[349 byte] By [Batsupa] at [2007-11-27 5:37:42]
# 1

This might help.

TransformGroup viewTG = universe.getViewingPlatform().getViewPlatformTransform();

t3d = new Transform3D();

vec = new Vector3d(0, 0, 20);

t3d.setTranslation(vec);

viewTG.setTransform(t3d);

This code moves the camera back a bit

Good luck

Dytea at 2007-7-12 15:10:17 > top of Java-index,Security,Cryptography...
# 2
Ok so the Vector3d defines the camera position in the code you've written.I think it sould help thanks...
Batsupa at 2007-7-12 15:10:17 > top of Java-index,Security,Cryptography...
# 3
Problem Update!I would like to not only position the camera but also turn it. Like if i wanted camera positioned at [0,10,30] and looking on [0,0,0].
Batsupa at 2007-7-12 15:10:17 > top of Java-index,Security,Cryptography...
# 4
You can download the JAVA 3d Tutorial of SUN,then it can tell you how to do it .Use the Mouse Behavior Classes.
adwara at 2007-7-12 15:10:17 > top of Java-index,Security,Cryptography...