aboutsummaryrefslogtreecommitdiffstats
path: root/src/ConfiguredUniverse/j3d1x3-cave
blob: d9a1472d32c27c4b4ae79355369b72761e3fae37 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
/*
 *	@(#)j3d1x3-cave 1.3 01/10/29 18:35:26
 *
 * Copyright (c) 1996-2001 Sun Microsystems, Inc. All Rights Reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 *
 * - Redistributions of source code must retain the above copyright
 *   notice, this list of conditions and the following disclaimer.
 *
 * - Redistribution in binary form must reproduce the above copyright
 *   notice, this list of conditions and the following disclaimer in
 *   the documentation and/or other materials provided with the
 *   distribution.
 *
 * Neither the name of Sun Microsystems, Inc. or the names of
 * contributors may be used to endorse or promote products derived
 * from this software without specific prior written permission.
 *
 * This software is provided "AS IS," without a warranty of any
 * kind. ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND
 * WARRANTIES, INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY
 * EXCLUDED. SUN AND ITS LICENSORS SHALL NOT BE LIABLE FOR ANY DAMAGES
 * SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR
 * DISTRIBUTING THE SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN
 * OR ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR
 * FOR DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR
 * PUNITIVE DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF
 * LIABILITY, ARISING OUT OF THE USE OF OR INABILITY TO USE SOFTWARE,
 * EVEN IF SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
 *
 * You acknowledge that Software is not designed,licensed or intended
 * for use in the design, construction, operation or maintenance of
 * any nuclear facility.
 */

/*
 ************************************************************************
 *  
 * Java 3D configuration file for a cave environment.  This cave
 * consists of 3 projectors with 3 screens to the left, front, and right
 * of the user, all at 90 degrees to each other.
 * 
 * The projectors in the VirtualPortal sample site are actually turned
 * on their sides to get more height.  Screen 0 is rotated 90 degrees
 * counter-clockwise, while screens 1 and 2 are rotated 90 degrees
 * clockwise.
 * 
 ************************************************************************
 */

// Create new screen objects and associate them with logical names and numbers.
// These numbers are used as indices to retrieve the AWT GraphicsDevice from
// the array that GraphicsEnvironment.getScreenDevices() returns.
// 
// NOTE: The GraphicsDevice order in the array is specific to the local
// site and display system.
// 
(NewScreen              left    0)
(NewScreen              center  1)
(NewScreen              right   2)


// Set the available image areas as well as their positition and orientation
// relative to the tracker base.   Although this config file doesn't enable
// head tracking, the tracker base is still needed as a point of reference to
// describe the position and orientation of the screens relative to the
// environment. 
// 
// From the orientation of a user standing within this VirtualPortal site and
// facing the center screen, the tracker base is along the vertical midline of
// the screen, 0.248 meters down from the top edge, and 1.340 meters in front
// of it.  The tracker base is oriented so that its +X axis points to the left,
// its +Y axis points toward the screen, and its +Z axis points toward the
// floor.
// 
(ScreenAttribute        left    PhysicalScreenWidth     2.480)
(ScreenAttribute        left    PhysicalScreenHeight    1.705)
(ScreenAttribute        left    WindowSize              NoBorderFullScreen)
(ScreenAttribute        left    TrackerBaseToImagePlate
                                (( 0.0  0.0 -1.0  2.230)
                                 ( 0.0 -1.0  0.0  1.340)
                                 (-1.0  0.0  0.0  0.885)))

(ScreenAttribute        center  PhysicalScreenWidth     2.485)
(ScreenAttribute        center  PhysicalScreenHeight    1.745)
(ScreenAttribute        center  WindowSize              NoBorderFullScreen)
(ScreenAttribute        center  TrackerBaseToImagePlate
                                (( 0.0  0.0  1.0  0.248)
                                 (-1.0  0.0  0.0  0.885)
                                 ( 0.0 -1.0  0.0  1.340)))

(ScreenAttribute        right   PhysicalScreenWidth     2.480)
(ScreenAttribute        right   PhysicalScreenHeight    1.775)
(ScreenAttribute        right   WindowSize              NoBorderFullScreen)
(ScreenAttribute        right   TrackerBaseToImagePlate
                                (( 0.0  0.0  1.0  0.2488)
                                 ( 0.0 -1.0  0.0  1.340)
                                 ( 1.0  0.0  0.0  0.860)))

// Set the location of the center of coexistence relative to the tracker base.
// Here it set to the center of the center screen.  This config file will set
// the location of the user's eyes relative to this point.  The default view
// attach policy of NOMINAL_SCREEN used by ConfiguredUniverse will place the
// origin of the view platform in coexistence coordinates at the center of
// coexistence. 
// 
(NewPhysicalEnvironment         VirtualPortal)
(PhysicalEnvironmentAttribute   VirtualPortal
                                CoexistenceToTrackerBase
                                ((-1.0  0.0  0.0  0.000)
                                 ( 0.0  0.0 -1.0  1.340)
                                 ( 0.0 -1.0  0.0  0.994)))

// The above center of coexistence is appropriate for the sample geometry
// files available in the programs/examples directory.  Often a more
// immersive point of view is required for larger virtual worlds.  This can be
// achieved by placing the center of coexistence closer to the nominal position
// of the user's head, so that the view platform origin in coexistence
// coordinates will map there as well.
// 
// Here we set the location of the center of coexistence 0.5 meters along the
// tracker base +Z axis, 1.737 meters from the floor (about 5 ft 8.4 inches).
// 
// (PhysicalEnvironmentAttribute   VirtualPortal
//                                 CoexistenceToTrackerBase
//                                 ((-1.0  0.0  0.0  0.0)
//                                  ( 0.0  0.0 -1.0  0.0)
//                                  ( 0.0 -1.0  0.0  0.5)))


// Now define the view.
// 
(NewView        view0)
(ViewAttribute  view0   Screen                  left)
(ViewAttribute  view0   Screen                  center)
(ViewAttribute  view0   Screen                  right)
(ViewAttribute  view0   PhysicalEnvironment     VirtualPortal)

// Set the user eye position in the display environment.  It is set here to
// 1.340 meters back from the center screen (directly under the tracker), and
// 1.737 meters from the floor (about 5 ft 8.4 inches).
//
(ViewAttribute  view0   CenterEyeInCoexistence  (0.0 0.494 1.340))

// Here is an alternative center eye position to use with the immersive
// coexistence coordinate system defined in comments above.
// 
// (ViewAttribute  view0   CenterEyeInCoexistence  (0.0 0.0 0.0))

// Set the screen scale.  This is scale factor from virtual to physical
// coordinates.
// 
(ViewAttribute  view0   ScreenScalePolicy       SCALE_SCREEN_SIZE)

// Alternative for explict scaling.
// 
// (ViewAttribute  view0   ScreenScalePolicy       SCALE_EXPLICIT)
// (ViewAttribute  view0   ScreenScale             5.00)

// No stereo viewing for this configuration.
// 
(ViewAttribute  view0   StereoEnable            False)