Java Reference
In-Depth Information
Figure 22 shows the view branch of the scene graph, the important code segment, the
result and the display configuration in creating a portal view of a virtual world using three
monitor panels with a tilting angle of 45 degrees.
As shown, each panel of the system has its ViewPlatform and View objects. The
TransformGroups of these panels come under a parent TransformGroup associated with
Figure 22. Portal view system
1.
public Transform3D vpTransform3D(int mode)
2.
{
3.
Transform3D transform3D = new Transform3D();
4.
switch (mode) {
5.
case LEFT_VIEW:
6.
transform3D.rotY(rightAngle/2);
7.
break;
8.
case FRONT_VIEW: break;
9.
case RIGHT_VIEW:
10.
transform3D.rotY(-rightAngle/2);
11.
break;
12. }
13.
transform3D.setTranslation(new Vector3f(0.0f, 0.0f, 1.0f));
14.
return transform3D;
15. }
Left Panel
Front Panel
Right Panel
Search WWH ::




Custom Search