<?xml version="1.0" encoding="utf-8" standalone="no" ?>
<vehicle type="cutter_builtInCutterTrailer">
    <annotation>Copyright (C) GIANTS Software GmbH, All Rights Reserved.</annotation>
    <name>
        <en>Case IH 3162 cutter</en>
        <de>Case IH 3162 Schneidwerk</de>
    </name>
    <typeDesc>$l10n_TypeDesc_Cutter</typeDesc>
    <filename>data/vehicles/cutters/caseIH/caseIH3162Cutter.i3d</filename>

    <size width="16" length="4.0" />

    <speedLimit value="10" />

    <cutterMovingDirection>1</cutterMovingDirection>

    <wheels autoRotateBackSpeed="2.0">
        <wheel  restLoad="1.5" repr="1>0" radius="0.37" initialCompression="50" suspTravel="0.05" spring="50" damper="30" mass="0.04" doBrakeOnLift="true" />
        <wheel  restLoad="1.5" repr="1>1" radius="0.37" initialCompression="50" suspTravel="0.05" spring="50" damper="30" mass="0.04" doBrakeOnLift="true" />
        <wheel  restLoad="0.9" repr="2>0" radius="0.24" initialCompression="50" suspTravel="0.05" spring="30" damper="30" mass="0.04" doBrakeOnLift="true" />
        <wheel  restLoad="1.0" repr="2>1" radius="0.24" initialCompression="50" suspTravel="0.05" spring="30" damper="30" mass="0.04" doBrakeOnLift="true" />
    </wheels>
    <brakeForce>0.2</brakeForce>

    <lightCoronas>
        <lightCorona index="0>0|12|0" />
        <lightCorona index="0>0|3|3|1" />
    </lightCoronas>

    <brakeLights>
        <brakeLight index="0>0|12|1" />
        <brakeLight index="0>0|3|3|0" />
    </brakeLights>

    <turnSignals>
        <turnSignalLeft index="0>0|12|2|0" />
        <turnSignalLeft index="0>0|13|1" />
        <turnSignalRight index="0>0|13|0" />
        <turnSignalRight index="0>0|3|3|2" />
    </turnSignals>

    <reelspikes turnedOnRotNodeRef="2">
        <spike node="0>0|3|2|0|0">
            <key time="0" rotX="0" />
            <key time="0.1" rotX="-10" />
            <key time="0.2"  rotX="-25" />
            <key time="0.3" rotX="-45" />
            <key time="0.4" rotX="-125" />
            <key time="0.5" rotX="-120" />
            <key time="0.6" rotX="-115" />
            <key time="0.7" rotX="-115" />
            <key time="0.8" rotX="-100" />
            <key time="0.85" rotX="-75" />
            <key time="0.9" rotX="-30" />
            <key time="1"    rotX="0" />
        </spike>
        <spike node="0>0|3|2|0|1">
            <key time="0" rotX="0" />
            <key time="0.1" rotX="-5" />
            <key time="0.2"  rotX="-80" />
            <key time="0.3" rotX="-100" />
            <key time="0.4" rotX="-95" />
            <key time="0.5" rotX="-90" />
            <key time="0.6" rotX="-85" />
            <key time="0.65" rotX="-70" />
            <key time="0.7" rotX="-45" />
            <key time="0.8" rotX="20" />
            <key time="0.9" rotX="20" />
            <key time="1"    rotX="0" />
        </spike>
        <spike node="0>0|3|2|0|2">
            <key time="0" rotX="0" />
            <key time="0.1" rotX="-65" />
            <key time="0.2"  rotX="-55" />
            <key time="0.3" rotX="-50" />
            <key time="0.4" rotX="-45" />
            <key time="0.45" rotX="-45" />
            <key time="0.5" rotX="-20" />
            <key time="0.6" rotX="60" />
            <key time="0.7" rotX="60" />
            <key time="0.8" rotX="50" />
            <key time="0.9" rotX="40" />
            <key time="1"    rotX="0" />
        </spike>
        <spike node="0>0|3|2|0|3">
            <key time="0" rotX="0" />
            <key time="0.1" rotX="0" />
            <key time="0.2"  rotX="0" />
            <key time="0.3" rotX="20" />
            <key time="0.35" rotX="45" />
            <key time="0.4" rotX="85" />
            <key time="0.45" rotX="130" />
            <key time="0.5" rotX="120" />
            <key time="0.6" rotX="115" />
            <key time="0.7" rotX="95" />
            <key time="0.8" rotX="75" />
            <key time="0.9" rotX="-5" />
            <key time="1"    rotX="0" />
        </spike>
        <spike node="0>0|3|2|0|4">
            <key time="0" rotX="0" />
            <key time="0.1" rotX="5" />
            <key time="0.15"  rotX="20" />
            <key time="0.2" rotX="50" />
            <key time="0.25" rotX="95" />
            <key time="0.3" rotX="115" />
            <key time="0.4" rotX="105" />
            <key time="0.5" rotX="85" />
            <key time="0.6" rotX="85" />
            <key time="0.7" rotX="10" />
            <key time="0.8" rotX="-20" />
            <key time="0.9" rotX="-10" />
            <key time="1"    rotX="0" />
        </spike>
        <spike node="0>0|3|2|0|5">
            <key time="0" rotX="0" />
            <key time="0.1" rotX="90" />
            <key time="0.2" rotX="95" />
            <key time="0.3" rotX="75" />
            <key time="0.4" rotX="70" />
            <key time="0.5" rotX="10" />
            <key time="0.6" rotX="-50" />
            <key time="0.7" rotX="-45" />
            <key time="0.8" rotX="-40" />
            <key time="0.9" rotX="-30" />
            <key time="0.9" rotX="-25" />
            <key time="1"    rotX="0" />
        </spike>
    </reelspikes>

    <turnedOnRotationNodes>
        <turnedOnRotationNode index="0>0|6"     type="cutter" rotAxis="1" rotSpeed="800" turnOnFadeTime="2" turnOffFadeTime="2"/>
        <turnedOnRotationNode index="0>0|3|2|0" type="cutter" rotAxis="1" rotSpeed="200" turnOnFadeTime="2" turnOffFadeTime="2"/>
    </turnedOnRotationNodes>

    <workAreas>
        <workArea startIndex="0>2" widthIndex="0>3" heightIndex="0>4" type="cutter" />
    </workAreas>

    <inputAttacherJoints>
        <inputAttacherJoint index="0>1"         jointType="cutter" allowsLowering="true" upperDistanceToGround="1.2" lowerDistanceToGround="0.87" indexPTO="0>8" rotSpeedPTO="0" />
        <inputAttacherJoint index="3>0|0|0|0|0" jointType="trailerLow" rootNode="3>" allowsLowering="false" rotLimitSpring="100 100 100" rotLimitDamping="100 100 100" transLimitSpring="100 100 100" transLimitDamping="100 100 100"/>
    </inputAttacherJoints>

    <cutterMovingDirection>1</cutterMovingDirection>

    <cutterTurnedOnScrollers>
        <cutterTurnedOnScroller index="0>0|7" scrollSpeed="-2" scrollLength="1" shaderParameterName="offsetUV" shaderParameterComponent="1" toggleVisibility="false" turnOnFadeTime="2" turnOffFadeTime="2"/>
    </cutterTurnedOnScrollers>

    <foldingParts turnOnFoldMaxLimit="1" turnOnFoldMinLimit="0.9" turnOffOnFold="true" unfoldWarning="FirstFoldUpTheTool" >
        <foldingPart animationName="foldWheels" speedScale="1" />
    </foldingParts>

    <mouseControls>
        <mouseControl iconFilename="$dataS2/menu/mouseControlsHelp/reel_arm_movement.png" axis="AXIS_FRONTLOADER_ARM" />
        <mouseControl iconFilename="$dataS2/menu/mouseControlsHelp/reel_movement.png" axis="AXIS_FRONTLOADER_TOOL" />
    </mouseControls>

    <movingTools>
        <movingTool index="0>0|3|2" transSpeed="0.1" transAcceleration="10" transMax="1.8892" transMin="1.33165" translationAxis="3" axis="AXIS_FRONTLOADER_TOOL" invertAxis="false" mouseAxis="AXIS_FRONTLOADER_TOOL" invertMouseAxis="false" speedFactor="0.9" disableInTrailerMode="true" />
        <movingTool index="0>0|3" rotSpeed="20" rotAcceleration="50" rotMax="-2.83" rotMin="-32" axis="AXIS_FRONTLOADER_ARM" invertAxis="false" mouseAxis="AXIS_FRONTLOADER_ARM" invertMouseAxis="true" speedFactor="0.9" disableInTrailerMode="true">
            <dependentPart index="0>0|4" />
            <dependentPart index="0>0|5" />
        </movingTool>

        <movingTool index="0>0|1|1|1">
            <dependentPart index="0>0|1|1|0" />
        </movingTool>
        <movingTool index="0>0|1|0|0">
            <dependentPart index="0>0|1|0|1" />
        </movingTool>
        <movingTool index="0>0|0|0" componentJointIndex="1" anchorActor="0"/>
        <movingTool index="0>0|0|0|0" componentJointIndex="1" anchorActor="0"/>
        <movingTool index="0>0|2" componentJointIndex="0" anchorActor="0"/>
    </movingTools>

    <movingParts>
        <!-- back axis-->
        <movingPart index="0>0|1|1|0" referencePoint="0>0|1|1|1|0" referenceFrame="0>0|1|1|1|0">
            <translatingPart index="0>0|1|1|0|0" />
        </movingPart>
        <movingPart index="0>0|1|0|1" referencePoint="0>0|1|0|0|0" localReferencePoint="0>0|1|0|1|0" referenceFrame="0>0|1|0|3">
            <dependentPart index="0>0|1|0|1|0" />
            <dependentPart index="0>0|1|0|2" />
        </movingPart>
        <movingPart index="0>0|1|0|1|0" referencePoint="0>0|1|0|0|0" referenceFrame="0>" scaleZ="true" />
        <movingPart index="0>0|1|0|2" referencePoint="0>0|1|0|1|1" referenceFrame="0>">
            <translatingPart index="0>0|1|0|2|0" />
        </movingPart>

        <!-- reel hydraulic -->
        <movingPart index="0>0|4" referencePoint="0>0|3|0" referenceFrame="0>0|3|0">
            <translatingPart index="0>0|4|0" />
        </movingPart>
        <movingPart index="0>0|5" referencePoint="0>0|3|1" referenceFrame="0>0|3|1">
            <translatingPart index="0>0|5|0" />
        </movingPart>
    </movingParts>

    <animations>
        <animation name="foldWheels">
            <part node="3>0" startTime="0" endTime="0.05" visibility="true" />
            <part node="3>0" startTime="0.05" endTime="0.1" visibility="false" />
            <part node="0>0|11" startTime="0" endTime="0.05" visibility="false" />
            <part node="0>0|11" startTime="0.05" endTime="0.1" visibility="true" />
            <part componentJointIndex="1" startTime="0" endTime="1" startRotLimit="0 0 0" endRotLimit="0 0 0" />
            <part componentJointIndex="2" startTime="0" endTime="1" startRotLimit="0 0 0" endRotLimit="0 0 0" />
            <part node="0>0|1|1|1" startTime="0" endTime="1" startRot="0 0 0" endRot="0 -90 0" />

            <part node="0>0|12" startTime="0" endTime="0.05" visibility="true" />
            <part node="0>0|12" startTime="0.05" endTime="0.1" visibility="false" />
            <part node="0>0|3|3" startTime="0" endTime="0.05" visibility="true" />
            <part node="0>0|3|3" startTime="0.05" endTime="0.1" visibility="false" />
            <part node="0>0|13" startTime="0" endTime="0.05" visibility="false" />
            <part node="0>0|13" startTime="0.05" endTime="0.1" visibility="true" />

            <part node="0>0|0|0|0" startTime="1" endTime="2" startRot="0 0 0" endRot="0 90 0" />
            <part node="0>0|1|0|0" startTime="1" endTime="3" startRot="0 0 0" endRot="180 0 0" />
            <part node="0>0|0|0" startTime="2" endTime="3" startRot="0 0 0" endRot="140 0 0" />
            <part node="0>0|2" startTime="2" endTime="3" startTrans="-1.85939 0.48284 -0.3411" endTrans="-1.85939 1.48274 -0.60314" startRot="0 0 0" endRot="-23 0 0" />
        </animation>

        <animation name="drawbarSetup">
            <part componentJointIndex="1" startTime="0" endTime="1" startRotLimit="0 120 0" endRotLimit="0 0 0"/>
            <part componentJointIndex="2" startTime="0" endTime="1" startRotLimit="0 0 20" endRotLimit="0 0 5"/>
        </animation>
    </animations>

    <aiLeftMarker index="0>5" />
    <aiRightMarker index="0>6" />
    <aiTrafficCollisionTrigger index="0>7" />
    <forceSelectionOnAttach value="false" />

    <dynamicMount forceLimitScale="1" />

    <cylinderedHydraulicSound file="$data/vehicles/shared/hydraulicUp.wav" pitchOffset="0.8" volume="0.4" />
    <threshingParticleSystem position="0 0 -1" rotation="0 0 0" file="$data/vehicles/particleAnimations/shared/threshingCutterParticles.i3d" />
    <preferedCombineSize>3</preferedCombineSize>
    <fruitTypes fruitTypes="wheat rape barley"/>

    <speedRotatingParts>
        <speedRotatingPart index="0>0|1|0|0|1|0" wheelIndex="0" foldMinLimit="0" foldMaxLimit="0.01" />
        <speedRotatingPart index="0>0|1|1|1|1|0" wheelIndex="1" foldMinLimit="0" foldMaxLimit="0.01"/>
    </speedRotatingParts>

    <cutterTestAreas>
        <cutterTestArea startIndex="0>10|0" widthIndex="0>10|0|0" heightIndex="0>10|0|1" />
        <cutterTestArea startIndex="0>10|1" widthIndex="0>10|1|0" heightIndex="0>10|1|1" />
        <cutterTestArea startIndex="0>10|2" widthIndex="0>10|2|0" heightIndex="0>10|2|1" />
        <cutterTestArea startIndex="0>10|3" widthIndex="0>10|3|0" heightIndex="0>10|3|1" />
        <cutterTestArea startIndex="0>10|4" widthIndex="0>10|4|0" heightIndex="0>10|4|1" />
        <cutterTestArea startIndex="0>10|5" widthIndex="0>10|5|0" heightIndex="0>10|5|1" />
        <cutterTestArea startIndex="0>10|6" widthIndex="0>10|6|0" heightIndex="0>10|6|1" />
        <cutterTestArea startIndex="0>10|7" widthIndex="0>10|7|0" heightIndex="0>10|7|1" />
        <cutterTestArea startIndex="0>10|8" widthIndex="0>10|8|0" heightIndex="0>10|8|1" />
        <cutterTestArea startIndex="0>10|9" widthIndex="0>10|9|0" heightIndex="0>10|9|1" />
    </cutterTestAreas>

    <cutterEffects>
        <cutterEffect fruitType="wheat" effectClass="CutterEffect" >
            <effectNode node="0|0|0|0" linkNode="0>9" speedScale="0.0018" filename="$data/vehicles/particleAnimations/caseIH/caseIH3162Cutter.i3d" />
            <effectNode node="0|0|0|1" linkNode="0>9" useInterpolation="true" useMaxValue="true" minOffset="7" filename="$data/vehicles/particleAnimations/caseIH/caseIH3162Cutter.i3d" />
            <effectNode node="0|0|0|2" linkNode="0>9" useInterpolation="true" minOffset="7" filename="$data/vehicles/particleAnimations/caseIH/caseIH3162Cutter.i3d" />
        </cutterEffect>
        <cutterEffect fruitType="barley" effectClass="CutterEffect" >
            <effectNode node="0|0|1|0" linkNode="0>9" speedScale="0.0018" filename="$data/vehicles/particleAnimations/caseIH/caseIH3162Cutter.i3d" />
            <effectNode node="0|0|1|1" linkNode="0>9" useInterpolation="true" useMaxValue="true" minOffset="7" filename="$data/vehicles/particleAnimations/caseIH/caseIH3162Cutter.i3d" />
            <effectNode node="0|0|1|2" linkNode="0>9" useInterpolation="true" minOffset="7" filename="$data/vehicles/particleAnimations/caseIH/caseIH3162Cutter.i3d" />
        </cutterEffect>
        <cutterEffect fruitType="rape" effectClass="CutterEffect" >
            <effectNode node="0|0|2|0" linkNode="0>9" speedScale="0.0018" filename="$data/vehicles/particleAnimations/caseIH/caseIH3162Cutter.i3d" />
            <effectNode node="0|0|2|1" linkNode="0>9" useInterpolation="true" useMaxValue="true" minOffset="7" filename="$data/vehicles/particleAnimations/caseIH/caseIH3162Cutter.i3d" />
            <effectNode node="0|0|2|2" linkNode="0>9" useInterpolation="true" minOffset="7" filename="$data/vehicles/particleAnimations/caseIH/caseIH3162Cutter.i3d" />
        </cutterEffect>
    </cutterEffects>

    <spareParts>
        <sparePart index="0>0|9|0" visibility="true" />
        <sparePart index="0>0|9|1" visibility="false" />
    </spareParts>

    <color value="0.5647 0.0086 0.0086 1.0" />

    <washable dirtDuration="120" washDuration="1" workMultiplier="4" />

    <components count="4">
        <component1 centerOfMass="0 0.7 -0.1" solverIterationCount="10" />
        <component2 centerOfMass="0 0.4 0" solverIterationCount="10" />
        <component3 centerOfMass="0 0.4 0" solverIterationCount="10" />
        <component4 centerOfMass="0 0.4 0" solverIterationCount="10" />
        <joint component1="0" component2="1" index="0>0|2" rotLimit="0 0 0" transLimit="0 0 0" />
        <joint component1="0" component2="2" index="0>0|0|0|0" rotLimit="0 120 0" transLimit="0 0 0" /> <!-- y -->
        <joint component1="2" component2="3" index="2>3" rotLimit="0 0 5" transLimit="0 0 0" /><!-- z -->
        <collisionPair component1="0" component2="3" enabled="false" />
    </components>

    <schemaOverlay file="$dataS2/menu/schemas/implementSchema.png" fileSelected="$dataS2/menu/schemas/implementSchemaSelected.png" width="0.5" height="0.5" attacherJointPosition="0 0"/>

</vehicle>
