InitialObjectDescriptor {
 objectDescriptorID 1
 audioProfileLevelIndication 255
 visualProfileLevelIndication 254
 sceneProfileLevelIndication 1
 graphicsProfileLevelIndication 1
 ODProfileLevelIndication 1
 esDescr [
  ES_Descriptor {
   ES_ID 1
   decConfigDescr DecoderConfigDescriptor {
    streamType 3
    decSpecificInfo BIFSConfig {
     isCommandStream true
     pixelMetric true
     pixelWidth 400
     pixelHeight 300
    }
   }
  }
  ES_Descriptor {
   ES_ID 2
   decConfigDescr DecoderConfigDescriptor {
    streamType 1
   }
  }
 ]
}

OrderedGroup {
 children [
  Background2D {
   backColor 1 1 1
  }
  WorldInfo {
   info [
    "This test shows usage of the InputSensor node to detect keys and trigger of events"
    "The InputSensor in this case has a url which points to a specific pseudo-media object. This object contains one stream, called interaction stream."
    "This stream is made of Device Data Frame whose content is specialized depending on the kind of input device."
    "The InputSensor node in the scene specifies how to dispatch the content of the DDF."
    "For each piece of information in the DDF, a REPLACE command is associated."
    "The value of the target property is replaced by the associated content from the DDF."
    "" 
    "If the configuration of the stream says 'StringSensor', like here, the input device is a keyboard and the DDF content is as follows:"
    "- the string being edited/input," 
    "and the previous string after final editing (return key)"
    "In this example, the target nodes are Text nodes which display the string being edited and the final one." 
    "" 
    "GPAC Regression Tests" "$Date: 2007-07-27 09:46:07 $ - $Revision: 1.3 $" 
    "(C) 2002-2006 GPAC Team"
   ]
   title "InputSensor Node for detecting string input (StringSensor)"
  }
  Transform2D {
   children [
    Shape {
     appearance DEF APP Appearance {
      material Material2D {
       emissiveColor 0 0 0
       filled TRUE
      }
     }
     geometry Text {
      string ["StringSensor"]
      fontStyle FontStyle {
       justify ["MIDDLE" "MIDDLE"]
       size 30
      }
     }
    }
   ]
  }
  Transform2D {
   translation -50 -30
   children [
    Shape {
     appearance USE APP
     geometry Text {
      string ["enteredText"]
      fontStyle DEF FS FontStyle {
       justify ["MIDDLE" "MIDDLE"]
       size 20
      }
     }
    }
   ]
  }
  Transform2D {
   translation 90 -30
   children [
    Shape {
     appearance USE APP
     geometry DEF N3 Text {
      string [""]
      fontStyle USE FS
     }
    }
   ]
  }
  Transform2D {
   translation -50 -50
   children [
    Shape {
     appearance USE APP
     geometry Text {
      string ["finalText"]
      fontStyle USE FS
     }
    }
   ]
  }
  Transform2D {
   translation 90 -50
   children [
    Shape {
     appearance USE APP
     geometry DEF N2 Text {
      string [""]
      fontStyle USE FS
     }
    }
   ]
  }
  InputSensor {
   url [od:10]
   buffer {
    REPLACE N3.string[0] BY ""
    REPLACE N2.string[0] BY ""
   }
  }
 ]
}


AT 0 {
  UPDATE OD [
   ObjectDescriptor {
    objectDescriptorID 10
    esDescr [
     ES_Descriptor {
      ES_ID 5
      decConfigDescr DecoderConfigDescriptor {
       streamType 10
       decSpecificInfo UIConfig {
        deviceName "StringSensor"
       }
      }
     }
    ]
   }
  ]
}

