home *** CD-ROM | disk | FTP | other *** search
/ PC Format (UK) 83 / PCFORMAT83.iso / Tech / Do3D / Do3dEval.exe / PROGRAMS.Z / standardnodes.wrl < prev    next >
Encoding:
Text File  |  1998-02-17  |  14.7 KB  |  489 lines

  1. #VRML V2.0 utf8
  2. #
  3. # **************************************************
  4. # * VRML 2.0 Parser
  5. # * Copyright (C) 1996 Silicon Graphics, Inc.
  6. # *
  7. # * Author(s)    : Gavin Bell
  8. # *                Daniel Woods (first port)
  9. # **************************************************
  10. #
  11. # Definitions for all of the nodes built-in to the spec.
  12. # Taken almost directly from the VRML 2.0 final spec:
  13.  
  14. PROTO Anchor [
  15.   eventIn      MFNode   addChildren
  16.   eventIn      MFNode   removeChildren
  17.   exposedField MFNode   children        []
  18.   exposedField SFString description     "" 
  19.   exposedField MFString parameter       []
  20.   exposedField MFString url             []
  21.   field        SFVec3f  bboxCenter      0 0 0
  22.   field        SFVec3f  bboxSize        -1 -1 -1
  23. ] { }
  24.  
  25. PROTO Appearance [
  26.   exposedField SFNode material          NULL
  27.   exposedField SFNode texture           NULL
  28.   exposedField SFNode textureTransform  NULL
  29. ] { }
  30.  
  31. PROTO AudioClip [
  32.   exposedField   SFString description  ""
  33.   exposedField   SFBool   loop         FALSE
  34.   exposedField   SFFloat  pitch        1.0
  35.   exposedField   SFTime   startTime    0
  36.   exposedField   SFTime   stopTime     0
  37.   exposedField   MFString url          []
  38.   eventOut       SFTime   duration_changed
  39.   eventOut       SFBool   isActive
  40. ] { }
  41.  
  42. PROTO Background [
  43.   eventIn      SFBool   set_bind
  44.   exposedField MFFloat  groundAngle  []
  45.   exposedField MFColor  groundColor  []
  46.   exposedField MFString backUrl      []
  47.   exposedField MFString bottomUrl    []
  48.   exposedField MFString frontUrl     []
  49.   exposedField MFString leftUrl      []
  50.   exposedField MFString rightUrl     []
  51.   exposedField MFString topUrl       []
  52.   exposedField MFFloat  skyAngle     []
  53.   exposedField MFColor  skyColor     [ 0 0 0  ]
  54.   eventOut     SFBool   isBound
  55. ] { }
  56.  
  57. PROTO Billboard [
  58.   eventIn      MFNode   addChildren
  59.   eventIn      MFNode   removeChildren
  60.   exposedField SFVec3f  axisOfRotation  0 1 0
  61.   exposedField MFNode   children        []
  62.   field        SFVec3f  bboxCenter      0 0 0
  63.   field        SFVec3f  bboxSize        -1 -1 -1
  64. ] { }
  65.  
  66. PROTO Box [
  67.   field    SFVec3f size  2 2 2 
  68. ] { }
  69.  
  70. PROTO Collision [ 
  71.   eventIn      MFNode   addChildren
  72.   eventIn      MFNode   removeChildren
  73.   exposedField MFNode   children        []
  74.   exposedField SFBool   collide         TRUE
  75.   field        SFVec3f  bboxCenter      0 0 0
  76.   field        SFVec3f  bboxSize        -1 -1 -1
  77.   field        SFNode   proxy           NULL
  78.   eventOut     SFTime   collideTime
  79. ] { }
  80.  
  81. PROTO Color [
  82.   exposedField MFColor color     []
  83. ] { }
  84.  
  85. PROTO ColorInterpolator [
  86.   eventIn      SFFloat set_fraction
  87.   exposedField MFFloat key       []
  88.   exposedField MFColor keyValue  []
  89.   eventOut     SFColor value_changed
  90. ] { }
  91.  
  92. PROTO Cone [
  93.   field     SFFloat   bottomRadius 1
  94.   field     SFFloat   height       2
  95.   field     SFBool    side         TRUE
  96.   field     SFBool    bottom       TRUE
  97. ] { }
  98.  
  99. PROTO Coordinate [
  100.   exposedField MFVec3f point  []
  101. ] { }
  102.  
  103. PROTO CoordinateInterpolator [
  104.   eventIn      SFFloat set_fraction
  105.   exposedField MFFloat key       []
  106.   exposedField MFVec3f keyValue  []
  107.   eventOut     MFVec3f value_changed
  108. ] { }
  109.  
  110. PROTO Cylinder [
  111.   field    SFBool    bottom  TRUE
  112.   field    SFFloat   height  2
  113.   field    SFFloat   radius  1
  114.   field    SFBool    side    TRUE
  115.   field    SFBool    top     TRUE
  116. ] { }
  117.  
  118. PROTO CylinderSensor [
  119.   exposedField SFBool     autoOffset TRUE
  120.   exposedField SFFloat    diskAngle  0.262
  121.   exposedField SFBool     enabled    TRUE
  122.   exposedField SFFloat    maxAngle   -1
  123.   exposedField SFFloat    minAngle   0
  124.   exposedField SFFloat    offset     0
  125.   eventOut     SFBool     isActive
  126.   eventOut     SFRotation rotation_changed
  127.   eventOut     SFVec3f    trackPoint_changed
  128. ] { }
  129.  
  130. PROTO DirectionalLight [
  131.   exposedField SFFloat ambientIntensity  0 
  132.   exposedField SFColor color             1 1 1
  133.   exposedField SFVec3f direction         0 0 -1
  134.   exposedField SFFloat intensity         1 
  135.   exposedField SFBool  on                TRUE 
  136. ] { }
  137.  
  138. PROTO ElevationGrid [
  139.   eventIn      MFFloat  set_height
  140.   exposedField SFNode   color             NULL
  141.   exposedField SFNode   normal            NULL
  142.   exposedField SFNode   texCoord          NULL
  143.   field        SFBool   ccw               TRUE
  144.   field        SFBool   colorPerVertex    TRUE
  145.   field        SFFloat  creaseAngle       0
  146.   field        MFFloat  height            []
  147.   field        SFBool   normalPerVertex   TRUE
  148.   field        SFBool   solid             TRUE
  149.   field        SFInt32  xDimension        0
  150.   field        SFFloat  xSpacing          0.0
  151.   field        SFInt32  zDimension        0
  152.   field        SFFloat  zSpacing          0.0
  153.  
  154. ] { }
  155.  
  156. PROTO Extrusion [
  157.   eventIn MFVec2f    set_crossSection
  158.   eventIn MFRotation set_orientation
  159.   eventIn MFVec2f    set_scale
  160.   eventIn MFVec3f    set_spine
  161.   field   SFBool     beginCap         TRUE
  162.   field   SFBool     ccw              TRUE
  163.   field   SFBool     convex           TRUE
  164.   field   SFFloat    creaseAngle      0
  165.   field   MFVec2f    crossSection     [ 1 1, 1 -1, -1 -1, -1 1, 1 1 ]
  166.   field   SFBool     endCap           TRUE
  167.   field   MFRotation orientation      0 0 1 0
  168.   field   MFVec2f    scale            1 1
  169.   field   SFBool     solid            TRUE
  170.   field   MFVec3f    spine            [ 0 0 0, 0 1 0 ]
  171. ] { }
  172.  
  173. PROTO Fog [
  174.   exposedField SFColor  color            1 1 1
  175.   exposedField SFString fogType          "LINEAR"
  176.   exposedField SFFloat  visibilityRange  0
  177.   eventIn      SFBool   set_bind
  178.   eventOut     SFBool   isBound
  179. ] { }
  180.  
  181. PROTO FontStyle [
  182.   field SFString family     "SERIF"
  183.   field SFBool   horizontal  TRUE
  184.   field MFString justify     "BEGIN"
  185.   field SFString language    ""
  186.   field SFBool   leftToRight TRUE
  187.   field SFFloat  size       1.0
  188.   field SFFloat  spacing     1.0
  189.   field SFString style       "PLAIN"
  190.   field SFBool   topToBottom TRUE
  191. ] { }
  192.  
  193. PROTO Group [
  194.   eventIn      MFNode  addChildren
  195.   eventIn      MFNode  removeChildren
  196.   exposedField MFNode  children   []
  197.   field        SFVec3f bboxCenter 0 0 0
  198.   field        SFVec3f bboxSize   -1 -1 -1
  199. ] { }
  200.  
  201. PROTO ImageTexture [
  202.   exposedField MFString url     []
  203.   field        SFBool   repeatS TRUE
  204.   field        SFBool   repeatT TRUE
  205. ] { }
  206.  
  207. PROTO IndexedFaceSet [ 
  208.   eventIn       MFInt32 set_colorIndex
  209.   eventIn       MFInt32 set_coordIndex
  210.   eventIn       MFInt32 set_normalIndex
  211.   eventIn       MFInt32 set_texCoordIndex
  212.   exposedField  SFNode  color             NULL
  213.   exposedField  SFNode  coord             NULL
  214.   exposedField  SFNode  normal            NULL
  215.   exposedField  SFNode  texCoord          NULL
  216.   field         SFBool  ccw               TRUE
  217.   field         MFInt32 colorIndex        []
  218.   field         SFBool  colorPerVertex    TRUE
  219.   field         SFBool  convex            TRUE
  220.   field         MFInt32 coordIndex        []
  221.   field         SFFloat creaseAngle       0
  222.   field         MFInt32 normalIndex       []
  223.   field         SFBool  normalPerVertex   TRUE
  224.   field         SFBool  solid             TRUE
  225.   field         MFInt32 texCoordIndex     []
  226. ] { }
  227.  
  228. PROTO IndexedLineSet [
  229.   eventIn       MFInt32 set_colorIndex
  230.   eventIn       MFInt32 set_coordIndex
  231.   exposedField  SFNode  color             NULL
  232.   exposedField  SFNode  coord             NULL
  233.   field         MFInt32 colorIndex        []
  234.   field         SFBool  colorPerVertex    TRUE
  235.   field         MFInt32 coordIndex        []
  236. ] { }
  237.  
  238. PROTO Inline [
  239.   exposedField MFString url        []
  240.   field        SFVec3f  bboxCenter 0 0 0
  241.   field        SFVec3f  bboxSize   -1 -1 -1
  242. ] { }
  243.  
  244. PROTO LOD [
  245.   exposedField MFNode  level    [] 
  246.   field        SFVec3f center   0 0 0
  247.   field        MFFloat range    [] 
  248. ] { }
  249.  
  250. PROTO Material [
  251.   exposedField SFFloat ambientIntensity  0.2
  252.   exposedField SFColor diffuseColor      0.8 0.8 0.8
  253.   exposedField SFColor emissiveColor     0 0 0
  254.   exposedField SFFloat shininess         0.2
  255.   exposedField SFColor specularColor     0 0 0
  256.   exposedField SFFloat transparency      0
  257. ] { }
  258.  
  259. PROTO MovieTexture [
  260.   exposedField SFBool   loop       FALSE
  261.   exposedField SFFloat  speed      1
  262.   exposedField SFTime   startTime  0
  263.   exposedField SFTime   stopTime   0
  264.   exposedField MFString url       []
  265.   field        SFBool   repeatS    TRUE
  266.   field        SFBool   repeatT    TRUE
  267.   eventOut     SFFloat  duration_changed
  268.   eventOut     SFBool   isActive
  269. ] { }
  270.  
  271. PROTO NavigationInfo [
  272.   eventIn      SFBool   set_bind
  273.   exposedField MFFloat  avatarSize       [ 0.25, 1.6, 0.75 ]
  274.   exposedField SFBool   headlight        TRUE
  275.   exposedField SFFloat  speed            1.0 
  276.   exposedField MFString type             "WALK" 
  277.   exposedField SFFloat  visibilityLimit  0.0 
  278.   eventOut     SFBool   isBound
  279. ] { }
  280.  
  281. PROTO Normal [
  282.   exposedField MFVec3f vector []
  283. ] { }
  284.  
  285. PROTO NormalInterpolator [
  286.   eventIn      SFFloat set_fraction
  287.   exposedField MFFloat key       []
  288.   exposedField MFVec3f keyValue  []
  289.   eventOut     MFVec3f value_changed
  290. ] { }
  291.  
  292. PROTO OrientationInterpolator [
  293.   eventIn      SFFloat    set_fraction
  294.   exposedField MFFloat    key       []
  295.   exposedField MFRotation keyValue  []
  296.   eventOut     SFRotation value_changed
  297. ] { }
  298.  
  299. PROTO PixelTexture [
  300.   exposedField SFImage  image      0 0 0
  301.   field        SFBool   repeatS    TRUE
  302.   field        SFBool   repeatT    TRUE
  303. ] { }
  304.  
  305. PROTO PlaneSensor [
  306.   exposedField SFBool  autoOffset  TRUE
  307.   exposedField SFBool  enabled     TRUE
  308.   exposedField SFVec2f maxPosition -1 -1
  309.   exposedField SFVec2f minPosition 0 0
  310.   exposedField SFVec3f offset      0 0 0
  311.   eventOut     SFBool  isActive
  312.   eventOut     SFVec3f trackPoint_changed
  313.   eventOut     SFVec3f translation_changed
  314. ] { }
  315.  
  316. PROTO PointLight [
  317.   exposedField SFFloat ambientIntensity  0 
  318.   exposedField SFVec3f attenuation       1 0 0
  319.   exposedField SFColor color             1 1 1 
  320.   exposedField SFFloat intensity         1
  321.   exposedField SFVec3f location          0 0 0
  322.   exposedField SFBool  on                TRUE 
  323.   exposedField SFFloat radius            100
  324. ] { }
  325.  
  326. PROTO PointSet [
  327.   exposedField  SFNode  color      NULL
  328.   exposedField  SFNode  coord      NULL
  329. ] { }
  330.  
  331. PROTO PositionInterpolator [
  332.   eventIn      SFFloat set_fraction
  333.   exposedField MFFloat key       []
  334.   exposedField MFVec3f keyValue  []
  335.   eventOut     SFVec3f value_changed
  336. ] { }
  337.  
  338. PROTO ProximitySensor [
  339.   exposedField SFVec3f    center      0 0 0
  340.   exposedField SFVec3f    size        0 0 0
  341.   exposedField SFBool     enabled     TRUE
  342.   eventOut     SFBool     isActive
  343.   eventOut     SFVec3f    position_changed
  344.   eventOut     SFRotation orientation_changed
  345.   eventOut     SFTime     enterTime
  346.   eventOut     SFTime     exitTime
  347. ] { }
  348.  
  349. PROTO ScalarInterpolator [
  350.   eventIn      SFFloat set_fraction
  351.   exposedField MFFloat key       []
  352.   exposedField MFFloat keyValue  []
  353.   eventOut     SFFloat value_changed
  354. ] { }
  355.  
  356. PROTO Script [
  357.   exposedField MFString url           [ ] 
  358.   field        SFBool   directOutput  FALSE
  359.   field        SFBool   mustEvaluate  FALSE
  360. ] { }
  361.  
  362. PROTO Shape [
  363.   field SFNode appearance NULL
  364.   field SFNode geometry   NULL
  365. ] { }
  366.  
  367. PROTO Sound [
  368.   exposedField SFVec3f  direction     0 0 1
  369.   exposedField SFFloat  intensity     1
  370.   exposedField SFVec3f  location      0 0 0
  371.   exposedField SFFloat  maxBack       10
  372.   exposedField SFFloat  maxFront      10
  373.   exposedField SFFloat  minBack       1
  374.   exposedField SFFloat  minFront      1
  375.   exposedField SFFloat  priority      0
  376.   exposedField SFNode   source        NULL
  377.   field        SFBool   spatialize    TRUE
  378. ] { }
  379.  
  380. PROTO Sphere [
  381.   field SFFloat radius  1
  382. ] { }
  383.  
  384. PROTO SphereSensor [
  385.   exposedField SFBool     autoOffset TRUE
  386.   exposedField SFBool     enabled    TRUE
  387.   exposedField SFRotation offset     0 1 0 0
  388.   eventOut     SFBool     isActive
  389.   eventOut     SFRotation rotation_changed
  390.   eventOut     SFVec3f    trackPoint_changed
  391. ] { }
  392.  
  393. PROTO SpotLight [
  394.   exposedField SFFloat ambientIntensity  0 
  395.   exposedField SFVec3f attenuation       1 0 0
  396.   exposedField SFFloat beamWidth         1.570796
  397.   exposedField SFColor color             1 1 1 
  398.   exposedField SFFloat cutOffAngle       0.785398 
  399.   exposedField SFVec3f direction         0 0 -1
  400.   exposedField SFFloat intensity         1  
  401.   exposedField SFVec3f location          0 0 0  
  402.   exposedField SFBool  on                TRUE
  403.   exposedField SFFloat radius            100
  404. ] { }
  405.  
  406. PROTO Switch [
  407.   exposedField    MFNode  choice      []
  408.   exposedField    SFInt32 whichChoice -1
  409. ] { }
  410.  
  411. PROTO Text [
  412.   exposedField  MFString string    []
  413.   field         SFNode   fontStyle NULL
  414.   field         MFFloat  length    []
  415.   field         SFFloat  maxExtent 0.0
  416. ] { }
  417.  
  418. PROTO TextureCoordinate [
  419.   exposedField MFVec2f point []
  420. ] { }
  421.  
  422. PROTO TextureTransform [
  423.   exposedField SFVec2f center      0 0
  424.   exposedField SFFloat rotation    0
  425.   exposedField SFVec2f scale       1 1
  426.   exposedField SFVec2f translation 0 0
  427. ] { }
  428.  
  429. PROTO TimeSensor [
  430.   exposedField SFTime   cycleInterval 1
  431.   exposedField SFBool   enabled       TRUE
  432.   exposedField SFBool   loop          FALSE
  433.   exposedField SFTime   startTime     0
  434.   exposedField SFTime   stopTime      0
  435.   eventOut     SFTime   cycleTime
  436.   eventOut     SFFloat  fraction_changed
  437.   eventOut     SFBool   isActive
  438.   eventOut     SFTime   time
  439. ] { }
  440.  
  441. PROTO TouchSensor [
  442.   exposedField SFBool  enabled TRUE
  443.   eventOut     SFVec3f hitNormal_changed
  444.   eventOut     SFVec3f hitPoint_changed
  445.   eventOut     SFVec2f hitTexCoord_changed
  446.   eventOut     SFBool  isActive
  447.   eventOut     SFBool  isOver
  448.   eventOut     SFTime  touchTime
  449. ] { }
  450.  
  451. PROTO Transform [
  452.   eventIn      MFNode      addChildren
  453.   eventIn      MFNode      removeChildren
  454.   exposedField SFVec3f     center           0 0 0
  455.   exposedField MFNode      children         []
  456.   exposedField SFRotation  rotation         0 0 1  0
  457.   exposedField SFVec3f     scale            1 1 1
  458.   exposedField SFRotation  scaleOrientation 0 0 1  0
  459.   exposedField SFVec3f     translation      0 0 0
  460.   field        SFVec3f     bboxCenter       0 0 0
  461.   field        SFVec3f     bboxSize         -1 -1 -1
  462. ] { }
  463.  
  464. PROTO Viewpoint [
  465.   eventIn      SFBool     set_bind
  466.   exposedField SFFloat    fieldOfView    0.785398
  467.   exposedField SFBool     jump           TRUE
  468.   exposedField SFRotation orientation    0 0 1  0
  469.   exposedField SFVec3f    position       0 0 10
  470.   field        SFString   description    ""
  471.   eventOut     SFTime     bindTime
  472.   eventOut     SFBool     isBound
  473. ] { }
  474.  
  475. PROTO VisibilitySensor [
  476.   exposedField SFVec3f center   0 0 0
  477.   exposedField SFBool  enabled  TRUE
  478.   exposedField SFVec3f size     0 0 0
  479.   eventOut     SFTime  enterTime
  480.   eventOut     SFTime  exitTime
  481.   eventOut     SFBool  isActive
  482. ] { }
  483.  
  484. PROTO WorldInfo [
  485.   field MFString info  []
  486.   field SFString title ""
  487. ] { }
  488.  
  489.