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 400
    }
   }
  }
 ]
}

OrderedGroup {
 children [
  Background2D {
   backColor 1 1 1
  }
  WorldInfo {
   info [
    "This test shows a mixed usage of TouchSensor and PlaneSensor2D nodes on a single shape."
    "In some circumstances, the object can be dragged and in some other, it can be clicked." 
    "" 
    "GPAC Regression Tests" "$Date: 2007-07-27 09:46:07 $ - $Revision: 1.3 $" 
    "(C) 2002-2006 GPAC Team"
   ]
   title "Nested Sensors"
  }
  Transform2D {
   translation 0 -150
   children [
    Shape {
     appearance DEF APP Appearance {
      material Material2D {
       emissiveColor 0 0 0
       filled TRUE
      }
     }
     geometry Text {
      string ["PlaneSensor2D and TouchSensor:" "Drag the shape on the blue part" "and click on the center"]
      fontStyle DEF FS FontStyle {
       justify ["MIDDLE"]
       size 20
      }
     }
    }
   ]
  }
  DEF T1 Transform2D {
   children [
    DEF TS TouchSensor {}
    DEF PS PlaneSensor2D {
     maxPosition 200 200
     minPosition -200 -200
    }
    Shape {
     appearance DEF A1 Appearance {
      material DEF M1 Material2D {
       emissiveColor 0 0 1
       filled TRUE
      }
     }
     geometry Circle {
      radius 60
     }
    }
    Transform2D {
     children [
      Shape {
       appearance Appearance {
        material DEF M2 Material2D {
         emissiveColor 1 0 1
         filled TRUE
        }
       }
       geometry Circle {
        radius 40
       }
      }
      DEF TS2 TouchSensor {}
     ]
    }
   ]
  }
  DEF C1 Conditional {
   buffer {
    REPLACE M1.filled BY FALSE
   }
  }
  DEF C2 Conditional {
   buffer {
    REPLACE M1.filled BY TRUE
   }
  }
  DEF C3 Conditional {
   buffer {
    REPLACE M2.emissiveColor BY 0 1 0
   }
  }
  DEF C4 Conditional {
   buffer {
    REPLACE M2.emissiveColor BY 1 0 1
   }
  }
 ]
}

ROUTE TS.isOver TO C1.activate
ROUTE TS.isOver TO C2.reverseActivate
ROUTE TS2.isActive TO C3.activate
ROUTE TS2.isActive TO C4.reverseActivate
ROUTE PS.translation_changed TO T1.translation

