Table of Contents Chapter Index Previous Slide Next Slide 306
Understanding the Prototype Interface

Creating New Node Types

Understanding the Prototype Interface
  • PROTO declares a new node type:
  • name - the new node type name
  • fields and events - interface to the prototype
  • PROTO Robot [
        field    MFString name "Bill"
        field    SFBool   enabled TRUE
        eventIn  SFBool   set_enabled
        eventOut SFVec3f  position_changed
    ] { . . . }