home *** CD-ROM | disk | FTP | other *** search
/ Late Night VRML 2.0 with Java CD-ROM / code.zip / Ch10 / 5041118.wrl < prev    next >
Text File  |  1997-01-14  |  3KB  |  119 lines

  1. #VRML V2.0 utf8
  2. #Example 11.18 - Background Node with Images
  3.  
  4. NavigationInfo {
  5.   headlight     FALSE
  6.   type    "WALK"
  7. }
  8. Viewpoint {
  9.   position      -3.06 1.6 7.45
  10.   orientation   0.10 -0.99 0.02  0.368
  11.   fieldOfView   1.5
  12.   description "entry view"
  13. }
  14. DirectionalLight {
  15.   direction     0.58 -0.69 -0.41
  16. }
  17. DEF Panorama_Bg Background {
  18.   groundAngle   1.5
  19.   groundColor   [ 0.05 0.1 0.05,
  20.                   0.05 0.1 0.05 ]
  21.   skyAngle      [ 1.047, 2.094 ]
  22.   skyColor      [ 0.1 0.1 0.5,
  23.                   0.2 0.2 0.6,
  24.                   0.6 0.6 0.7 ]
  25.   backUrl     "bg-back.gif"
  26.   leftUrl     "bg-left.gif"
  27.   frontUrl    "bg-front.gif"
  28.   rightUrl    "bg-right.gif"
  29. }
  30. Group {
  31.   children [
  32.     Transform {
  33.       children DEF house Shape {
  34.         appearance      Appearance {
  35.           material      Material {
  36.             ambientIntensity    0.25
  37.             diffuseColor        0.541 0 0
  38.           }
  39.         }
  40.         geometry        IndexedFaceSet {
  41.           coord Coordinate {
  42.             point       [ -1 1 1,
  43.                       -1 0 1,
  44.                       1 1 1,
  45.                       1 0 1,
  46.                       1 1 -1,
  47.                       1 0 -1,
  48.                       -1 1 -1,
  49.                       -1 0 -1,
  50.                       0 1.722 1,
  51.                       0 1.722 -1,
  52.                       -1 1 -1,
  53.                       -1 0 -1,
  54.                       -1 0 1,
  55.                       -1 1 1,
  56.                       1 1 1,
  57.                       1 0 1,
  58.                       1 0 -1,
  59.                       1 1 -1,
  60.                       -1 0 1,
  61.                       1 0 1,
  62.                       -1 1 1,
  63.                       0 1.722 1,
  64.                       1 1 1 ]
  65.           }
  66.           coordIndex    [ 0, 1, 3, -1, 0, 3, 2, -1,
  67.                     0, 2, 8, -1, 4, 5, 7, -1,
  68.                     4, 7, 6, -1, 4, 6, 9, -1,
  69.                     10, 11, 12, -1, 10, 12, 13, -1,
  70.                     14, 15, 16, -1, 14, 16, 17, -1,
  71.                     18, 11, 16, -1, 18, 16, 19, -1,
  72.                     10, 20, 21, -1, 10, 21, 9, -1,
  73.                     21, 22, 17, -1, 21, 17, 9, -1 ]
  74.         }
  75.       }
  76.       scale     2.395 2.395 2.395
  77.     }
  78.     Transform {
  79.       children  DEF base Shape {
  80.         appearance      Appearance {
  81.           material      Material {
  82.             ambientIntensity    0.24
  83.             diffuseColor        0.05 0.1 0.05
  84.           }
  85.         }
  86.         geometry        IndexedFaceSet {
  87.           coord Coordinate {
  88.               point   [ 0 0 -1,
  89.                         0.383 0 -0.924,
  90.                         0.707 0 -0.707,
  91.                         0.924 0 -0.383,
  92.                         1 0 4.37e-08,
  93.                         0.924 0 0.383,
  94.                         0.707 0 0.707,
  95.                         0.383 0 0.924,
  96.                         1.51e-07 0 1,
  97.                         -0.383 0 0.924,
  98.                         -0.707 0 0.707,
  99.                         -0.924 0 0.383,
  100.                         -1 0 -1.19e-08,
  101.                         -0.924 0 -0.383,
  102.                         -0.707 0 -0.707,
  103.                         -0.383 0 -0.924 ]
  104.           }
  105.           coordIndex    [ 15, 1, 0, -1, 1, 15, 14, -1,
  106.                     1, 14, 2, -1, 2, 14, 13, -1,
  107.                     2, 13, 3, -1, 3, 13, 12, -1,
  108.                     3, 12, 4, -1, 4, 12, 11, -1,
  109.                     4, 11, 5, -1, 5, 11, 10, -1,
  110.                     5, 10, 6, -1, 6, 10, 9, -1,
  111.                     6, 9, 7, -1, 7, 9, 8, -1 ]
  112.         }
  113.       }
  114.       scale     11 11 11
  115.     }
  116.   ]
  117. }
  118. #EOF
  119.