home *** CD-ROM | disk | FTP | other *** search
/ Late Night VRML 2.0 with Java CD-ROM / code.zip / Ch15 / NurbsCurve.wrl < prev    next >
Text File  |  1997-01-23  |  793b  |  28 lines

  1. #VRML V2.0 utf8
  2.  
  3.  
  4. PROTO NurbsCurve [ field   SFBool   debug          FALSE
  5.                    field   SFInt32  segments      20
  6.                    field   MFFloat  knotSequence   0
  7.                    field   MFFloat  controlPoints  0 ] {
  8.  
  9.     DEF ILS IndexedLineSet {
  10.       coord
  11.           Coordinate { }
  12.       coordIndex []
  13.     }
  14.     DEF curve Script {
  15.       field    SFBool   debug         IS debug
  16.       field    SFInt32  segments      IS segments
  17.       field    MFFloat  knotSequence  IS knotSequence
  18.       field    MFFloat  controlPoints IS controlPoints
  19.       eventOut SFNode   coord_changed
  20.       eventOut MFInt32  coordIndex_changed
  21.  
  22.       url "NurbsCurve.class"
  23.     }
  24.  
  25.     ROUTE curve.coord_changed       TO  ILS.set_coord
  26.     ROUTE curve.coordIndex_changed  TO  ILS.set_coordIndex
  27. }
  28.