home *** CD-ROM | disk | FTP | other *** search
/ Late Night VRML 2.0 with Java CD-ROM / code.zip / Ch10 / 5041109.wrl < prev    next >
Text File  |  1996-12-17  |  3KB  |  98 lines

  1. #VRML V2.0 utf8
  2. #Example 11.9 - Default Mapping Test
  3. NavigationInfo {
  4.   type    "EXAMINE"
  5. }
  6. Viewpoint {
  7.   position      -8.263 5.702 14.947
  8.   orientation   -0.586 -0.798 -0.141  0.585
  9.   fieldOfView   0.785
  10. }
  11. Group {
  12.   children   [
  13.     DEF Wide_box Shape {
  14.       appearance    Appearance {
  15.         material    DEF base_color Material {
  16.           ambientIntensity 0.25
  17.           diffuseColor     0.8 0.8 0.8
  18.           shininess 0.2
  19.         }
  20.         texture     ImageTexture {
  21.           url       "mandrill.jpg"
  22.         }
  23.       }
  24.       geometry      IndexedFaceSet {
  25.         coord       Coordinate {
  26.           point    [ -9 1 1,
  27.                    -9 -2 1,
  28.                    -4 -2 1,
  29.                    -4 1 1,
  30.                    -9 1 -1,
  31.                    -9 -2 -1,
  32.                    -4 -2 -1,
  33.                    -4 1 -1 ]
  34.         }
  35.       coordIndex   [ 0, 1, 2, -1, 0, 2, 3, -1,
  36.                    7, 6, 5, -1, 7, 5, 4, -1,
  37.                    3, 2, 6, -1, 3, 6, 7, -1,
  38.                    4, 0, 3, -1, 4, 3, 7, -1,
  39.                    4, 5, 1, -1, 4, 1, 0, -1,
  40.                    1, 5, 6, -1, 1, 6, 2, -1 ]
  41.       }
  42.     }
  43.     DEF Tall_box Shape {
  44.       appearance    Appearance {
  45.         material    USE base_color
  46.         texture     ImageTexture {
  47.           url       "mandrill.jpg"
  48.         }
  49.       }
  50.       geometry      IndexedFaceSet {
  51.         coord       Coordinate {
  52.           point     [ -1.5 4.5 2.5,
  53.                     -1.5 -4.5 2.5,
  54.                     1.5 -4.5 2.5,
  55.                     1.5 4.5 2.5,
  56.                     -1.5 4.5 -2.5,
  57.                     -1.5 -4.5 -2.5,
  58.                     1.5 -4.5 -2.5,
  59.                     1.5 4.5 -2.5 ]
  60.         }
  61.         coordIndex  [ 0, 1, 2, -1, 0, 2, 3, -1,
  62.                     7, 6, 5, -1, 7, 5, 4, -1,
  63.                     3, 2, 6, -1, 3, 6, 7, -1,
  64.                     4, 0, 3, -1, 4, 3, 7, -1,
  65.                     4, 5, 1, -1, 4, 1, 0, -1,
  66.                     1, 5, 6, -1, 1, 6, 2, -1 ]
  67.       }
  68.     }
  69.     DEF Cube Shape {
  70.       appearance    Appearance {
  71.         material    USE base_color
  72.         texture     ImageTexture {
  73.           url       "mandrill.jpg"
  74.         }
  75.       }
  76.       geometry      IndexedFaceSet {
  77.         coord       Coordinate {
  78.           point     [ 4 2.5 2.5,
  79.                     4 -2.5 2.5,
  80.                     9 -2.5 2.5,
  81.                     9 2.5 2.5,
  82.                     4 2.5 -2.5,
  83.                     4 -2.5 -2.5,
  84.                     9 -2.5 -2.5,
  85.                     9 2.5 -2.5 ]
  86.         }
  87.         coordIndex  [ 0, 1, 2, -1, 0, 2, 3, -1,
  88.                     7, 6, 5, -1, 7, 5, 4, -1,
  89.                     3, 2, 6, -1, 3, 6, 7, -1,
  90.                     4, 0, 3, -1, 4, 3, 7, -1,
  91.                     4, 5, 1, -1, 4, 1, 0, -1,
  92.                     1, 5, 6, -1, 1, 6, 2, -1 ]
  93.       }
  94.     }
  95.   ]
  96. }
  97. #EOF
  98.