Important: The information in this document is obsolete and should not be used for new development.
Although the default representation for a cubic panorama is
six square faces of a cube, it is possible to depart from this standard
representation. When doing so, a new atom must be added to the pano
sample atom container. The atom type is 'cufa'.
The atom is an array of data structures of type QTVRCubicFaceData.
Each entry in the array describes one face of whatever polyhedron
is being defined. QTVRCubicFaceData is
defined as follows:
struct QTVRCubicFaceData { |
float orientation[4]; //see Table 3 |
float center[2]; // see Figure 23 |
float aspect; // 1.0 |
float skew; // set to 0 |
}; |
typedef struct QTVRCubicFaceDataQTVRCubicFaceData; |
The mathematical explanation of these data structures is beyond
the scope of this document but will be described in a separate Apple
Technote at http://developer.apple.com/technotes/index.html. Table
1-3 shows what values QuickTime uses for the default representation
of six square sides.
The values shown in Table 1-3 will work, since quaternions can be multiplied by -1 and still represent the same orientation. However, it is standard practice to make the largest, and then the first element be positive.
Orientation (quaternion) |
Center |
Aspect |
Skew |
|||||
|---|---|---|---|---|---|---|---|---|
w |
x |
y |
z |
x |
y |
|||
+1 |
0 |
0 |
0 |
0 |
0 |
1 |
0 |
# front |
+.5 |
0 |
-.5 |
0 |
0 |
0 |
1 |
0 |
# right |
0 |
0 |
1 |
0 |
0 |
0 |
1 |
0 |
# back |
+.5 |
0 |
+.5 |
0 |
0 |
0 |
1 |
0 |
# left |
+.5 |
+.5 |
0 |
0 |
0 |
0 |
1 |
0 |
# top |
+.5 |
-.5 |
0 |
0 |
0 |
0 |
1 |
0 |
# bottom |
Figure 1-40 shows QTVR cubic values in 2 x 2 and 3 x 3 matrices. These values are represented in a resolution-independent format. In particular, the co-ordinates for the center are in units of one-half of the image height, specifically (height - 1)/2.
Last updated: 2001-10-01