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

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