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 600
     pixelHeight 300
    }
   }
  }
  ES_Descriptor {
   ES_ID 2
   decConfigDescr DecoderConfigDescriptor {
    streamType 1
   }
  }
 ]
}

OrderedGroup {
 children [
  Background2D {
   backColor 1 1 1
  }
  WorldInfo {
   info [
    "This test shows the use of the PlaneSensor2D node, and its auto-offset property." 
    "The PlaneSensor2D is used to detect mouse motion between mouse down and mouse up." 
    "This allows to move objects between mouse down and mouse up." 
    "The auto-offset is used to automatically store the mouse position at mouse release and use it as the offset to the next translation." 
    "This tests shows two images (clipped by circles) which can be dragged." 
    "" 
    "GPAC Regression Tests" "$Date: 2007-07-27 09:46:07 $ - $Revision: 1.3 $" 
    "(C) 2002-2006 GPAC Team"]
   title "PlaneSensor2D for dragging objects"
  }
  DEF T1 Transform2D {
   translation -150 0
   children [
    DEF S Shape {
     appearance Appearance {
      texture ImageTexture {
       url [od:10]
       repeatS FALSE
       repeatT FALSE
      }
     }
     geometry Circle {
      radius 100
     }
    }
    Shape {
     appearance DEF APP Appearance {
      material Material2D {
       emissiveColor 0 0 0
       filled TRUE
      }
     }
     geometry Text {
      string ["Auto-offset on"]
      fontStyle DEF FS FontStyle {
       justify ["MIDDLE"]
       size 24
      }
     }
    }
    DEF PS1 PlaneSensor2D {
     maxPosition 200 200
     minPosition -200 -200
     offset -150 0
    }
   ]
  }
  DEF T2 Transform2D {
   translation 150 0
   children [
    USE S
    Shape {
     appearance USE APP
     geometry Text {
      string ["Auto-offset off"]
      fontStyle USE FS
     }
    }
    DEF PS2 PlaneSensor2D {
     autoOffset FALSE
     maxPosition 200 200
     minPosition -200 -200
     offset 150 0
    }
   ]
  }
 ]
}

ROUTE PS1.translation_changed TO T1.translation
ROUTE PS2.translation_changed TO T2.translation

AT 0 {
  UPDATE OD [
   ObjectDescriptor {
    objectDescriptorID 10
    esDescr [
     ES_Descriptor {
      ES_ID 20
      muxInfo MuxInfo {
       fileName "../auxiliary_files/sky.jpg"
      }
     }
    ]
   }
  ]
}

