Hi, I am a Java 3d beginner.
I am currently reading the book KJGP and doing fairly well following the examples, however there is one piece of code in chapter 15 I cannot understand clearly. The comments are my current understanding of the code. Please correct me:
[quote] private void initUserPosition()
{
//get viewing platform from simple universe into vp
ViewingPlatform vp = su.getViewingPlatform();
//get the transform group above the viewPlatform into steerTG
TransformGroup steerTG = vp.getViewPlatformTransform();
//set t3d with the same value of steerTG
Transform3D t3d = new Transform3D();
steerTG.getTransform(t3d);
//manipulate t3d's values to be looking at the values specified in lookAt. And invert.
t3d.lookAt( USERPOSN, new Point3d(0,0,0), new Vector3d(0,1,0));
t3d.invert();
//make the value of steerTG the same as the values in t3d.
steerTG.setTransform(t3d);
} // end of initUserPosition()
[/quote]
Now my problem is -how does the change in steerTG is passed to the TransformGroup above the ViewPlatform; when in the above code, the TransformGroup above the ViewPlatform isn’t updated with the values in steerTG through any methods?
Thankyou for your kindness and patience.