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

OrderedGroup {
 children [
  Background2D {
   backColor 1 1 1
  }
  WorldInfo {
   info [
    "This test shows how to apply affine transformations on a rectangle."
    "The TransformMatrix2D works like the Transform2D node, but it requires giving the coefficients of a 3x2 matrix."
    "It allows for skewing and for simple animations of skewing." 
    "Click on the transformed rectangles to start transformation animations." 
    "cf bifs-2D-positioning-transform2D" 
    "" 
    "GPAC Regression Tests" "$Date: 2007-07-27 09:46:08 $ - $Revision: 1.4 $" 
    "(C) 2002-2006 GPAC Team"
   ]
   title "Apply transformations on local coordinate systems - TransformMatrix2D node"  
  }
  TransformMatrix2D {
   tx 175
   ty 80
   children [
    DEF N1 Shape {
     appearance Appearance {
      material Material2D {
       emissiveColor 0 0 1
       filled TRUE
      }
     }
     geometry Rectangle {
      size 200 100
     }
    }
    Shape {
     appearance DEF N7 Appearance {
      material Material2D {
       emissiveColor 0 0 0
       filled TRUE
      }
     }
     geometry Text {
      string ["translated rectangle"]
      fontStyle DEF N0 FontStyle {
       justify ["MIDDLE" "MIDDLE"]
       size 15
      }
     }
    }
   ]
  }
  DEF N12 TransformMatrix2D {
   mxx 0.707107
   mxy 0.707107
   tx -150
   myx -0.707107
   myy 0.707107
   ty 80
   children [
    USE N1
    Shape {
     appearance USE N7
     geometry Text {
      string ["translated" "and" "Pi/4-rotated rectangle"]
      fontStyle USE N0
     }
    }
    DEF N17 TouchSensor {}
    DEF N4 TimeSensor {
     cycleInterval 2
     startTime -1
    }
    DEF N9 ScalarInterpolator {
     key [0 1]
     keyValue [0.707107 1]
    }
    DEF N8 ScalarInterpolator {
     key [0 1]
     keyValue [0.707107 0]
    }
    DEF N6 ScalarInterpolator {
     key [0 1]
     keyValue [-0.707107 0]
    }
    DEF N5 ScalarInterpolator {
     key [0 1]
     keyValue [0.707107 1]
    }
   ]
  }
  DEF N11 TransformMatrix2D {
   mxy 1
   tx 120
   ty -80
   children [
    USE N1
    Shape {
     appearance USE N7
     geometry Text {
      string ["translated" "and" "Pi/4-X-Skewed rectangle"]
      fontStyle USE N0
     }
    }
    DEF N15 TouchSensor {}
    DEF N3 TimeSensor {
     cycleInterval 2
     startTime -1
    }
    DEF N16 ScalarInterpolator {
     key [0 1]
     keyValue [1 0]
    }
   ]
  }
  DEF N10 TransformMatrix2D {
   tx -50
   myx 1
   ty -50
   children [
    USE N1
    Shape {
     appearance USE N7
     geometry Text {
      string ["translated" "and" "Pi/4-Y-Skewed rectangle"]
      fontStyle USE N0
     }
    }
    DEF N14 TouchSensor {}
    DEF N2 TimeSensor {
     cycleInterval 2
     startTime -1
    }
    DEF N13 ScalarInterpolator {
     key [0 1]
     keyValue [1 0]
    }
   ]
  }
 ]
}

ROUTE N17.touchTime TO N4.startTime
ROUTE N4.fraction_changed TO N9.set_fraction
ROUTE N9.value_changed TO N12.mxx
ROUTE N4.fraction_changed TO N8.set_fraction
ROUTE N8.value_changed TO N12.mxy
ROUTE N4.fraction_changed TO N6.set_fraction
ROUTE N6.value_changed TO N12.myx
ROUTE N4.fraction_changed TO N5.set_fraction
ROUTE N5.value_changed TO N12.myy
ROUTE N15.touchTime TO N3.startTime
ROUTE N3.fraction_changed TO N16.set_fraction
ROUTE N16.value_changed TO N11.mxy
ROUTE N14.touchTime TO N2.startTime
ROUTE N2.fraction_changed TO N13.set_fraction
ROUTE N13.value_changed TO N10.myx

