tree.wrl

 tank.wrl  cafe.wrl  stavba.wrl  sibenice.wrl  tw.wrl  tree.wrl  hud.wrl  garaz2.wrl  fence.wrl  table.wrl  u4.wrl 
Zpět Zpět
   1 : #VRML V2.0 utf8
   2 : 
   3 : WorldInfo {
   4 :  info "Author: Martin Petricek"
   5 :  title "Strom"
   6 : }
   7 : 
   8 : PROTO Tree [
   9 :  exposedField SFVec3f pos 0 0 0 #pozice v prostoru
  10 : ]{
  11 :  Transform {
  12 :   translation IS pos
  13 :   children [
  14 :    DEF Bush Shape {
  15 :     geometry IndexedFaceSet {
  16 :      coord Coordinate {
  17 :       point [-1 1 0,-1 3 0, 1 3 0, 1 1 0]
  18 :      }
  19 :      coordIndex [
  20 :       0 1 2 3 0 -1
  21 :       0 3 2 1 0 -1
  22 :      ]
  23 :     }
  24 :     appearance Appearance {
  25 :      texture ImageTexture {
  26 :       url "tree.gif"
  27 :      }
  28 :     }
  29 :    }
  30 :    Transform {
  31 :     rotation 0 1 0 1.57
  32 :     children USE Bush
  33 :    }
  34 :    Transform {
  35 :     scale 0.7 0.7 0.7
  36 :     center 0 0.5 0
  37 :     rotation 0 1 0 0.8
  38 :     children USE Bush
  39 :    }
  40 :    Transform {
  41 :     scale 0.7 0.7 0.7
  42 :     center 0 0.5 0
  43 :     rotation 0 1 0 -0.7
  44 :     children USE Bush
  45 :    }
  46 :    Transform {
  47 :     translation 0 0.5 0
  48 :     bboxCenter 0 1.5 0
  49 :     bboxSize 2 3 2
  50 :     children Shape {
  51 :      appearance Appearance {
  52 :       material Material {
  53 :        diffuseColor 0.4 0.1 0
  54 :       }
  55 :      }
  56 :      geometry Cylinder {
  57 :       height 1
  58 :       radius 0.07
  59 :       bottom FALSE
  60 :       top FALSE
  61 :      }
  62 :     }
  63 :    }
  64 :   ]
  65 :  }
  66 : }