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

OrderedGroup {
 children [
  Background2D {
   backColor 1 1 1
  }
  WorldInfo {
   info [
    "This test shows how to apply transformations to texture independantly of the transformation on the shape." 
    "The TextureTransform node is used here." 
    "" 
    "GPAC Regression Tests" "$Date: 2007-07-27 09:46:08 $ - $Revision: 1.3 $" 
    "(C) 2002-2006 GPAC Team"
   ]
   title "Transforming Textures"      
  }
  Transform2D {
   translation -150 100
   children [
    Shape {
     appearance Appearance {
      texture DEF IMG ImageTexture {
       url [od:10]
      }
      textureTransform DEF TXT1 TextureTransform {
       center 0.5 0.5
      }
     }
     geometry DEF REC Rectangle {
      size 200 100
     }
    }
    Transform2D {
     translation 0 -70
     children [
      Shape {
       appearance DEF TEXTAPP Appearance {
        material Material2D {
         emissiveColor 0 0 0
         filled TRUE
        }
       }
       geometry Text {
        string ["Drag mouse to change" "rotation angle"]
        fontStyle DEF FS FontStyle {
         justify ["MIDDLE" "MIDDLE"]
         size 14
        }
       }
      }
     ]
    }
    DEF PS1 PlaneSensor2D {
     maxPosition 400 400
     minPosition -400 -400
    }
   ]
  }
  Transform2D {
   translation -150 -100
   children [
    Shape {
     appearance Appearance {
      texture USE IMG
      textureTransform DEF TXT2 TextureTransform {
       center 0.5 0.5
       rotation 0.78
      }
     }
     geometry USE REC
    }
    Transform2D {
     translation 0 -70
     children [
      Shape {
       appearance USE TEXTAPP
       geometry Text {
        string ["Drag mouse to change" "rotation center"]
        fontStyle USE FS
       }
      }
     ]
    }
    DEF PS2 PlaneSensor2D {
     maxPosition 100 50
     minPosition -100 -50
    }
   ]
  }
  Transform2D {
   translation 150 100
   children [
    Shape {
     appearance Appearance {
      texture USE IMG
      textureTransform DEF TXT3 TextureTransform {}

     }
     geometry USE REC
    }
    Transform2D {
     translation 0 -70
     children [
      Shape {
       appearance USE TEXTAPP
       geometry Text {
        string ["Drag mouse to" "translate texture"]
        fontStyle USE FS
       }
      }
     ]
    }
    DEF PS3 PlaneSensor2D {
     maxPosition 400 400
     minPosition -400 -400
    }
   ]
  }
  Transform2D {
   translation 150 -100
   children [
    Shape {
     appearance Appearance {
      texture USE IMG
      textureTransform DEF TXT4 TextureTransform {
       rotation 0.78
      }
     }
     geometry USE REC
    }
    Transform2D {
     translation 0 -70
     children [
      Shape {
       appearance USE TEXTAPP
       geometry Text {
        string ["Drag mouse to change" "texture scaling"]
        fontStyle USE FS
       }
      }
     ]
    }
    DEF PS4 PlaneSensor2D {
     maxPosition 100 100
     minPosition -100 -100
    }
   ]
  }
  DEF V1 Valuator {
   Factor1 0.01
  }
  DEF V2 Valuator {
   Factor1 0.005
   Factor2 0.01
   Offset1 0.5
   Offset2 0.5
  }
  DEF V3 Valuator {
   Factor1 -0.005
   Factor2 -0.01
  }
  DEF V4 Valuator {
   Factor1 0.1
   Factor2 0.1
  }
  DEF TS TimeSensor {
   cycleInterval 4
   loop TRUE
  }
  DEF SI ScalarInterpolator {
   key [0 0.5 1]
   keyValue [0 1.56 0]
  }
 ]
}

ROUTE PS1.translation_changed TO V1.inSFVec2f
ROUTE V1.outSFFloat TO TXT1.rotation
ROUTE TS.fraction_changed TO SI.set_fraction
ROUTE SI.value_changed TO TXT2.rotation
ROUTE PS2.translation_changed TO V2.inSFVec2f
ROUTE V2.outSFVec2f TO TXT2.center
ROUTE PS3.translation_changed TO V3.inSFVec2f
ROUTE V3.outSFVec2f TO TXT3.translation
ROUTE PS4.translation_changed TO V4.inSFVec2f
ROUTE V4.outSFVec2f TO TXT4.scale

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

