#VRML V2.0 utf8 # # PROTOS without behaviors or metaphors # PROTO FSM [ field SFVec3f position 0 0 0 exposedField SFBool input FALSE eventIn SFString set_state field SFString start_state "" field MFNode states [] field MFNode transitions [] eventIn SFFloat set_clock ] { Transform { translation IS position children [ Group {children IS states} Group {children IS transitions} ] #children } #Transform } #PROTO FSM PROTO FSM_STATE [ eventIn SFFloat set_clock exposedField SFBool enabled FALSE field SFNode node NULL field SFNode nodeG NULL field MFNode audio [] exposedField MFNode geometry [] field MFString behavior "" ] { Transform { children [ Group {children IS audio} Group {children IS geometry} DEF S Script { eventIn SFFloat set_clock IS set_clock field SFNode node IS node field SFNode nodeG IS nodeG url IS behavior } #DEF S ] #children } #Transform } #PROTO FSM_STATE PROTO FSM_TRANSITION [ eventIn SFFloat set_clock exposedField SFBool enabled FALSE eventOut SFString state_changed field SFNode from NULL field SFNode to NULL field SFNode fsm NULL field SFNode object NULL exposedField MFNode geometry [] field MFString behavior "" ] { Group { children [ Group {children IS geometry} DEF S Script { eventIn SFFloat set_clock IS set_clock eventOut SFString state_changed IS state_changed field SFNode from IS from field SFNode to IS to field SFNode fsm IS fsm field SFNode object IS object url IS behavior } #Script ] #children } #Group } #PROTO FSM_TRANSITION # # OBJECT PROTOS # PROTO SPHERE [ exposedField SFFloat transparency 0.0 field SFVec3f text_position -1 1 0 field MFString name "State" field SFVec3f position 0 0 0 ] { Group { children [ Transform { translation IS position children Billboard { children Transform { translation IS text_position children Shape { geometry Text {string IS name} } #Shape } #Transform } #Billboard } #Transform Text Transform { translation IS position children Shape { appearance Appearance { material Material { diffuseColor 1.0 0.0 0.0 transparency IS transparency}} geometry Sphere {} } #Shape } #Transform Sphere ] #children } #Group } #PROTO SPHERE PROTO ARROW [ field SFVec3f local_frame 0 0 0 field SFVec3f translation 0 0 0 field SFRotation rotation 0 0 1 3.14 field SFVec3f cylinder_translation 0 0 0 field SFVec3f cone_translation 0 0 0 field SFRotation cone_rotation 0 0 0 0 ] { Group { children [ Transform { translation IS local_frame children Transform { translation IS translation rotation IS rotation children [ Transform { translation IS cylinder_translation children Shape { appearance Appearance { material DEF MAT Material { diffuseColor 0 0.7 0 } } geometry Cylinder { radius 0.25 height 1} } #Shape } #Transform Transform { translation IS cone_translation rotation IS cone_rotation children Shape { appearance Appearance { material USE MAT } geometry Cone { bottomRadius 0.45 height 1} } #Shape } #Transform ] #children } #Transform } #Transform ] #children } #Group } #PROTO ARROW