home *** CD-ROM | disk | FTP | other *** search
/ The Best of Windows 95.com 1996 September / WIN95_09962.iso / vrml / MWE105.ZIP / EExamples / Street.vxr < prev    next >
Text File  |  1996-01-25  |  2KB  |  77 lines

  1. #VRML V1.0 ascii
  2.  
  3. Separator {
  4.     # Options: ON OFF AUTO
  5.     renderCulling AUTO
  6.     
  7.     OUTPUT_TO Street.wrl
  8.     
  9.     DEF BackgroundColor Info {
  10.         string  ".1 .2 .7"
  11.     }
  12.  
  13.     PerspectiveCamera {
  14.         position 0 2 10
  15.         focalDistance 5
  16.         heightAngle 45'deg
  17.     }
  18.     
  19.     DEF param PARAMETERS {
  20.         fields [ SFFloat streetWidth ]
  21.         streetWidth 20'ft
  22.     }
  23.     
  24.     Wall {
  25.         fields [ SFLong placement, SFFloat width, MFFloat height, 
  26.             MFFloat elevation, MFVec2f data ] 
  27.         placement -1 # -1: Inside, 1: Outside 
  28.         width param:streetWidth
  29.         height [ 6'in ]
  30.         elevation [ -6'in ]
  31.         data [param:streetWidth/2 0, param:streetWidth/2 -1000'ft] # Describe the (x,y) coordinates of the wall here
  32.     }
  33.     
  34.     LOOP {
  35.         fields [ SFLong start, SFLong end, SFLong step, SFLong position ]
  36.         start 0
  37.         end 5
  38.         step 1
  39.         
  40.         Separator {
  41.             # Options: ON OFF AUTO
  42.             renderCulling AUTO
  43.             
  44.             Transform {
  45.                 translation -param:streetWidth/2 0 -position*100'ft
  46.             }
  47.             
  48.             PARAMETERS {
  49.                 fields [SFVec3f centerLOD, SFFloat streetLightHeight, SFFloat streetLightArmLength ]
  50.                 centerLOD -param:streetWidth/2 0 -position*100'ft
  51.                 streetLightHeight 20'ft
  52.                 streetLightArmLength 2'ft
  53.             
  54.                 INCLUDE StreetLight.vxr
  55.             }
  56.         }
  57.         
  58.         Separator {
  59.             # Options: ON OFF AUTO
  60.             renderCulling AUTO
  61.             
  62.             Transform {
  63.                 translation param:streetWidth/2 0 -position*100'ft
  64.                 rotation 0 1 0 pi()
  65.             }
  66.             
  67.             PARAMETERS {
  68.                 fields [SFVec3f centerLOD, SFFloat streetLightHeight, SFFloat streetLightArmLength ]
  69.                 centerLOD param:streetWidth/2 0 -position*100'ft
  70.                 streetLightHeight 20'ft
  71.                 streetLightArmLength 2'ft
  72.             
  73.                 INCLUDE StreetLight.vxr
  74.             }
  75.         }
  76.     }
  77. }