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 the usage of the ProximitySensor2D node"
    "Two ProximitySensor2D nodes are placed on a single shape. The Shape is a 300x300 rectangle, and the ProximitySensor2D nodes define two areas centered on the rectangle: a 50x50 rectangle and a 200x200 rectangle." 
    "When the mouse enters or exits an area, an action is triggered."
    "Here, nothing happens when the mouse enters the object, then it turns red if the mouse enters the first area, and it turns empty if the mouse enters the second area." 
    "" 
    "GPAC Regression Tests" "$Date: 2007-07-27 09:46:07 $ - $Revision: 1.3 $" 
    "(C) 2002-2006 GPAC Team"
   ]
   title "ProximitySensor2D"
  }
  DEF T1 Transform2D {
   children [
    Shape {
     appearance Appearance {
      material DEF M1 Material2D {
       emissiveColor 0.5 0.6 0.4
       filled TRUE
      }
     }
     geometry Rectangle {
      size 300 300
     }
    }
    DEF PSOUT ProximitySensor2D {
     size 200 200
    }
    DEF PSIN ProximitySensor2D {
     size 50 50
    }
   ]
  }
  DEF CIN Conditional {
   buffer {
    REPLACE M1.filled BY FALSE
   }
  }
  DEF RCIN Conditional {
   buffer {
    REPLACE M1.filled BY TRUE
   }
  }
  DEF COUT Conditional {
   buffer {
    REPLACE M1.emissiveColor BY 1 0 0
   }
  }
  DEF RCOUT Conditional {
   buffer {
    REPLACE M1.emissiveColor BY 0.5 0.6 0.4
   }
  }
 ]
}

ROUTE PSOUT.isActive TO COUT.activate
ROUTE PSOUT.isActive TO RCOUT.reverseActivate
ROUTE PSIN.isActive TO CIN.activate
ROUTE PSIN.isActive TO RCIN.reverseActivate

