home *** CD-ROM | disk | FTP | other *** search
/ Late Night VRML 2.0 with Java CD-ROM / code.zip / Ch15 / NurbsRevolve.wrl < prev    next >
Text File  |  1997-01-29  |  2KB  |  41 lines

  1. #VRML V2.0 utf8
  2.  
  3.  
  4. PROTO NurbsRevolve [ field SFBool   debug                 FALSE
  5.                      field SFFloat  minAngle              0
  6.                      field SFFloat  maxAngle              6.2831853072
  7.                      field SFInt32  segments             20
  8.                      field SFInt32  profileSegments      20
  9.                      field MFFloat  profileKnotSequence   0
  10.                      field MFFloat  profileControlPoints  0
  11.                      field SFBool   ccw                   TRUE
  12.                      field SFFloat  creaseAngle           0.5
  13.                      field SFBool   solid                 FALSE ] {
  14.  
  15.     DEF IFS IndexedFaceSet {
  16.       coord
  17.           Coordinate { }
  18.       coordIndex []
  19.       ccw         IS ccw
  20.       convex      TRUE
  21.       creaseAngle IS creaseAngle
  22.       solid       IS solid
  23.     }
  24.     DEF surface Script {
  25.       field    SFBool   debug                IS debug
  26.       field    SFFloat  minAngle             IS minAngle
  27.       field    SFFloat  maxAngle             IS maxAngle
  28.       field    SFInt32  segments             IS segments
  29.       field    SFInt32  profileSegments      IS profileSegments
  30.       field    MFFloat  profileKnotSequence  IS profileKnotSequence
  31.       field    MFFloat  profileControlPoints IS profileControlPoints
  32.       eventOut SFNode   coord_changed
  33.       eventOut MFInt32  coordIndex_changed
  34.  
  35.       url "NurbsRevolve.class"
  36.     }
  37.  
  38.     ROUTE surface.coord_changed       TO  IFS.set_coord
  39.     ROUTE surface.coordIndex_changed  TO  IFS.set_coordIndex
  40. }
  41.