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 300
     pixelHeight 300
    }
   }
  }
 ]
}

OrderedGroup {
 children [
  Background2D {
   backColor 1 1 0
  }
  WorldInfo {
   info [
    "This test shows the usage of the OrderedGroup node." 
    "The OrderedGroup node is similar to the Group node but allows for more possibilities."
    "The difference is the addition of the 'order' property which explicitely gives the display order of the children of the OrderedGroup."
    "Order varies from 0 to N-1, where N is the number of children. [3 2 1 0] will display the children in reverse order."
    "This test shows how to interactively change the order based on a click."
    "If you click on the rectangle or the circle, and keep the mouse button down, the display order is reversed. If you release the button, the display order goes back to initial."
    ""
    "GPAC Regression Tests" "$Date: 2007-07-27 09:46:08 $ - $Revision: 1.3 $" 
    "(C) 2002-2006 GPAC Team"
   ]
   title "OrderedGroup"
  }
  DEF OG OrderedGroup {
   order [1 0]
   children [
    DEF S1 Shape {
     appearance DEF A1 Appearance {
      material Material2D {
       emissiveColor 1 1 1
       filled TRUE
      }
     }
     geometry Rectangle {
      size 160 60
     }
    }
    Shape {
     appearance Appearance {
      material Material2D {
       emissiveColor 0 1 1
       filled TRUE
      }
     }
     geometry Circle {
      radius 40
     }
    }
    DEF TS TouchSensor {}
   ]
  }
  DEF C Conditional {
   buffer {
    REPLACE OG.order BY [0 1]
   }
  }
  DEF RC Conditional {
   buffer {
    REPLACE OG.order BY [1 0]
   }
  }
 ]
}

ROUTE TS.isActive TO C.activate
ROUTE TS.isActive TO RC.reverseActivate

