<?xml version="1.0" encoding="utf-8" standalone="no" ?>
<vehicle type="Claas_Liner_4000">
	<annotation>Copyright (C) GIANTS Software GmbH, All Rights Reserved.</annotation>
    <name>
        <en>Claas Liner 4000</en>
        <de>Claas Liner 4000</de>
    </name>
	<typeDesc>$l10n_TypeDesc_Windrower</typeDesc>
    <filename>Claas_Liner_4000.i3d</filename>

    <size width="5" length="12" lengthOffset="-5" />

    <wheels autoRotateBackSpeed="2.0">
        <wheel driveMode="0" repr="0" radius="0.54" deltaY="0.1" suspTravel="0.2" spring="50" damper="30" mass="0.8" />
        <wheel driveMode="0" repr="1" radius="0.54" deltaY="0.1" suspTravel="0.2" spring="50" damper="30" mass="0.8" />
		<wheel driveMode="0" repr="0" radius="0.54" deltaY="0.1" suspTravel="0.2" spring="50" damper="30" mass="0.8" />
        <wheel driveMode="0" repr="1" radius="0.54" deltaY="0.1" suspTravel="0.2" spring="50" damper="30" mass="0.8" />
	</wheels>

	<groundReferenceNode index="0>" threshold="1.7" />
	<powerTakeoffInput index="0>27" rotSpeed="-1000" />
    <lights count="1">
        <light1 index="9" />
    </lights>

	<lightCoronas>
		<lightCorona index="10" />
	</lightCoronas>
	
	<lightsaddon lightsStayOn="true">
		<light type="dirLeft" index="0>30|0" />
		<light type="dirRight" index="0>30|1" />	
	</lightsaddon>

	<brakeLights>
		<brakeLight index="0>28" />
	</brakeLights>

    <cuttingAreas count="4">
        <cuttingArea1 startIndex="13|0|0|2" widthIndex="13|0|0|3" heightIndex="13|0|0|4" foldMinLimit="0" foldMaxLimit="0.2" />
        <cuttingArea2 startIndex="16|0|0|2" widthIndex="16|0|0|3" heightIndex="16|0|0|4" foldMinLimit="0" foldMaxLimit="0.2" />
        <cuttingArea3 startIndex="18|1" widthIndex="18|2" heightIndex="18|3" foldMinLimit="0" foldMaxLimit="0.2" />
        <cuttingArea4 startIndex="20|1" widthIndex="20|2" heightIndex="20|3" foldMinLimit="0" foldMaxLimit="0.2" />
    </cuttingAreas>

    <windrowerDropAreas count="4">
        <windrowerDropArea1 startIndex="13|0|0|5" widthIndex="13|0|0|6" heightIndex="13|0|0|7"/>
        <windrowerDropArea2 startIndex="16|0|0|5" widthIndex="16|0|0|6" heightIndex="16|0|0|7"/>
		<windrowerDropArea3 startIndex="2" widthIndex="3" heightIndex="4"/>
        <windrowerDropArea4 startIndex="5" widthIndex="6" heightIndex="7"/>
    </windrowerDropAreas>

    <windrowerSound file="$data/vehicles/tools/tedder.wav" pitchOffset="1" volume="0.9"/>  

    <attacherJoint rootNode="6>" index="6>0" jointType="implement" rotLimitScale="1 0 1" transLimitScale="0.05 0.05 0.05" allowsJointTransLimitMovement="true" allowsJointRotLimitMovement="true" />

	<isDefaultLowered value="true"/>
    <needsLowering value="false" />
    <allowsLowering value="false" />

    <support animationName="moveSupport" />

    <animation animationClip="windrowerClipSource" rootNode="13|0|0|8|0" speedScale="3.5"/>

	<movingTools>
        <!-- support -->
        <movingTool index="0>25" componentJointIndex="0" anchorActor="0"/>

        <!-- backArmLeft joint -->
        <movingTool index="0>21" componentJointIndex="2" anchorActor="0">
            <dependentPart index="0>20" />
        </movingTool>
        <!-- backArmRight joint -->
        <movingTool index="0>22" componentJointIndex="1" anchorActor="0">
            <dependentPart index="0>18" />
        </movingTool>
        <!-- frontArmLeft joint -->
        <movingTool index="0>23" componentJointIndex="4" anchorActor="0">
            <dependentPart index="0>16" />
        </movingTool>
        <!-- frontArmRight joint -->
        <movingTool index="0>24" componentJointIndex="3" anchorActor="0">
            <dependentPart index="0>13" />
        </movingTool>

		<!-- rightArmFrontMiddle -->
        <movingTool index="0>13|0">
            <!-- lift cylinder -->
            <dependentPart index="0>13|1" />
            <dependentPart index="0>13|2" />
        </movingTool>

        <!-- frontOuterArmRight -->
        <movingTool index="0>13|0|0">
            <!-- lift cylinder -->
            <dependentPart index="0>13|2" />
        </movingTool>

		<!-- leftArmFrontMiddle -->
        <movingTool index="0>16|0">
            <!-- lift cylinder -->
            <dependentPart index="0>16|1" />
            <dependentPart index="0>16|2" />
        </movingTool>

        <!-- frontOuterArmLeft -->
        <movingTool index="0>16|0|0">
            <!-- lift cylinder -->
            <dependentPart index="0>16|2" />
        </movingTool>
    </movingTools>

    <movingParts>
        <movingPart index="0>18|4" scaleZ="true" referencePoint="0>26|0" referenceFrame="0>18" invertZ="true"/>

		<movingPart index="0>20|4" scaleZ="true" referencePoint="0>26|1" referenceFrame="0>20" invertZ="true"/>

        <!-- frontArmRight -->
        <movingPart index="0>13" referencePoint="4>0" referenceFrame="0>24" isActiveDirty="true" useLocalOffset="true" limitedAxis="3">
            <!-- lift cylinder -->
            <dependentPart index="0>11" />
            <dependentPart index="0>12" />
            <dependentPart index="0>13|0|0|8" />
        </movingPart>

        <!-- frontArmLeft -->
        <movingPart index="0>16" referencePoint="5>0" referenceFrame="0>23" isActiveDirty="true" useLocalOffset="true" limitedAxis="3">
            <!-- lift cylinder -->
            <dependentPart index="0>14" />
            <dependentPart index="0>15" />
            <dependentPart index="0>16|0|0|8" />
        </movingPart>

        <!-- frontRightWindrowerBase -->
        <movingPart index="0>13|0|0|8" referenceFrame="4>0" />

        <!-- frontLeftWindrowerBase -->
        <movingPart index="0>16|0|0|8" referenceFrame="5>0" />

        <!-- backArmRight -->
        <movingPart index="0>18" referencePoint="2>0" referenceFrame="0>22" isActiveDirty="true" limitedAxis="3">
            <!-- lift cylinder -->
            <dependentPart index="0>17" />
            <dependentPart index="0>18|4" />
            <dependentPart index="0>18|5" />
        </movingPart>

		<!-- backArmLeft -->
        <movingPart index="0>20" referencePoint="3>0" referenceFrame="0>21" isActiveDirty="true" limitedAxis="3">
            <!-- lift cylinder -->
            <dependentPart index="0>19" />
            <dependentPart index="0>20|4" />
            <dependentPart index="0>20|5" />
        </movingPart>

        <!-- backRightWindrowerBase -->
        <movingPart index="0>18|5" referenceFrame="2>0" />

        <!-- backLeftWindrowerBase -->
        <movingPart index="0>20|5" referenceFrame="3>0" />

		<!-- rightArmFrontMainHydraulics -->
        <movingPart index="0>11" referencePoint="0>13|4" referenceFrame="0>13" invertZ="false">
            <translatingPart index="0>11|0" />
        </movingPart>

		<!-- rightArmFrontMainHydraulics -->
        <movingPart index="0>12" referencePoint="0>13|3" referenceFrame="0>13" invertZ="false">
            <translatingPart index="0>12|0" />
        </movingPart>

		<!-- rightArmFrontMiddleHydraulics01 -->
        <movingPart index="0>13|1" referencePoint="0>13|0|1" referenceFrame="0>13" invertZ="false">
            <translatingPart index="0>13|1|0" />
        </movingPart>

		<!-- rightArmFrontMiddleHydraulics02 -->
        <movingPart index="0>13|2" referencePoint="0>13|0|0|0" referenceFrame="0>13" invertZ="false">
            <translatingPart index="0>13|2|0" />
        </movingPart>

		<!-- leftArmFrontMainHydraulics -->
        <movingPart index="0>14" referencePoint="0>16|3" referenceFrame="0>16" invertZ="false">
            <translatingPart index="0>14|0" />
        </movingPart>

		<!-- leftArmFrontMainHydraulics -->
        <movingPart index="0>15" referencePoint="0>16|4" referenceFrame="0>16" invertZ="false">
            <translatingPart index="0>15|0" />
        </movingPart>

		<!-- rightArmFrontMiddleHydraulics01 -->
        <movingPart index="0>16|1" referencePoint="0>16|0|1" referenceFrame="0>16" invertZ="false">
            <translatingPart index="0>16|1|0" />
        </movingPart>

		<!-- rightArmFrontMiddleHydraulics02 -->
        <movingPart index="0>16|2" referencePoint="0>16|0|0|0" referenceFrame="0>16" invertZ="false">
            <translatingPart index="0>16|2|0" />
        </movingPart>

		<!-- rightArmBackHydraulics -->
        <movingPart index="0>17" referencePoint="0>18|0" referenceFrame="0>18" invertZ="false">
            <translatingPart index="0>17|0" />
        </movingPart>

		<!-- leftArmBackHydraulics -->
        <movingPart index="0>19" referencePoint="0>20|0" referenceFrame="0>20" invertZ="false">
            <translatingPart index="0>19|0" />
        </movingPart>
    </movingParts>

    <animations>
        <!-- move support wheel down/up -->
        <animation name="moveSupport">
            <part node="25" startTime="0" duration="0.6" startTrans="0.107 0.385 -0.587" endTrans="0.107 0 -0.587" />
        </animation>

        <animation name="rightFoldFront">
            <part node="0>24" startTime="0" endTime="8.0" startRot="0 0 0 " endRot="0 0 -90"/>
            <part node="0>24|0" startTime="0" endTime="8.0" startRot="0 0 0 " endRot="0 100 0"/>
            <part node="0>24|0|0" startTime="0" endTime="8.0" startRot="0 0 0 " endRot="0 -100 0"/>
            <part startTime="0" endTime="8.0" componentJointIndex="3" endRotLimit="0 0 0" endTransLimit="0 0 0" />

            <!--part node="4>0" startTime="0" endTime="8.0" startRot="0 0 0 " endRot="0 100 0"/-->
            <part node="0>13|0" startTime="0" endTime="8.0" startRot="0 90 0 " endRot="0 190 0"/>
            <part node="0>13|0|0" startTime="0" endTime="8.0" startRot="0 0 0 " endRot="0 -100 0"/>
        </animation>

		<animation name="leftFoldFront">
            <part node="0>23" startTime="0" endTime="8.0" startRot="0 0 0 " endRot="0 0 90"/>
            <part node="0>23|0" startTime="0" endTime="8.0" startRot="0 0 0 " endRot="0 -100 0"/>
            <part node="0>23|0|0" startTime="0" endTime="8.0" startRot="0 0 0 " endRot="0 100 0"/>
            <part startTime="0" endTime="8.0" componentJointIndex="4" endRotLimit="0 0 0" endTransLimit="0 0 0" />

            <!--part node="5>0" startTime="0" endTime="8.0" startRot="0 0 0 " endRot="0 -100 0"/-->
            <part node="0>16|0" startTime="0" endTime="8.0" startRot="0 -90 0 " endRot="0 -190 0"/>
            <part node="0>16|0|0" startTime="0" endTime="8.0" startRot="0 0 0 " endRot="0 100 0"/>
        </animation>

		<animation name="rightFoldBack">
            <part node="0>22" startTime="0" endTime="8.0" startRot="0 0 0 " endRot="0 0 -90"/>
            <part startTime="0" endTime="8.0" componentJointIndex="1" endRotLimit="0 0 0" endTransLimit="0 0 0" />
        </animation>

		<animation name="leftFoldBack">
            <part node="0>21" startTime="0" endTime="8.0" startRot="0 0 0 " endRot="0 0 90"/>
            <part startTime="0" endTime="8.0" componentJointIndex="2" endRotLimit="0 0 0" endTransLimit="0 0 0" />
        </animation>
    </animations>

	<foldingParts startMoveDirection="1" foldMiddleAnimTime="0.3">
        <foldingPart animationName="rightFoldFront" speedScale="1.0" />
        <foldingPart animationName="leftFoldFront" speedScale="1.1" />
        <foldingPart animationName="rightFoldBack" speedScale="1.2" />
        <foldingPart animationName="leftFoldBack" speedScale="1.3" />
    </foldingParts>
	
    <components count="7">
        <component1 centerOfMass="0.3 0 -4.5" solverIterationCount="20" />
        <component2 centerOfMass="0 0 0" solverIterationCount="20" />
        <component3 centerOfMass="0 -0.6 0" solverIterationCount="20" />
        <component4 centerOfMass="0 -0.6 0" solverIterationCount="20" />
        <component5 centerOfMass="0 -0.6 0" solverIterationCount="20" />
        <component6 centerOfMass="0 -0.6 0" solverIterationCount="20" />
        <component7 centerOfMass="0 0 0" solverIterationCount="20" />
        <joint component1="0" component2="1" index="0>25|0" rotLimit="0 0 0" transLimit="0 0 0" />
        <joint component1="0" component2="2" index="0>22|0" rotLimit="9 0 9" transLimit="0 0.4 0" /> <!-- right back -->
        <joint component1="0" component2="3" index="0>21|0" rotLimit="9 0 9" transLimit="0 0.4 0" /> <!-- left back -->
        <joint component1="0" component2="4" index="0>24|0|0|0" rotLimit="9 0 9" transLimit="0 0.4 0" /> <!-- right front -->
        <joint component1="0" component2="5" index="0>23|0|0|0" rotLimit="9 0 9" transLimit="0 0.4 0" /> <!-- left front -->
        <joint component1="0" component2="6" index="6>1" rotLimit="0 60 0" transLimit="0 0 0" /> <!-- attacher-->
        <collisionPair component1="2" component2="3" enabled="false" />
        <collisionPair component1="4" component2="5" enabled="false" />
    </components>

    <schemaOverlay file="Schemas/Claas_UnSelected.png" fileSelected="Schemas/Claas_Selected.png" width="1" height="0.5" attacherJointPosition="0 0"/>

	<!--Feldwegstaub Anfang-->
	<drivingParticles threshold="0.005">
        <drivingParticle position=" 1.33 0 -5.72" rotation="0 0 0" file="PSystem/dustParticleSystem.i3d" wheel="1" minSpeed="5" maxSpeed="60"/>
        <drivingParticle position="-1.33 0 -5.72" rotation="0 0 0" file="PSystem/dustParticleSystem.i3d" wheel="2" minSpeed="5" maxSpeed="60"/>
	</drivingParticles>
	<!--Feldwegstaub Ende-->
	
	<!--Feldstaub Anfang-->
	<wheelParticleSystems file="PSystem/wheelParticleSystem.i3d" >
        <wheelParticleSystem node="31|0"  />
        <wheelParticleSystem node="31|1"  />
	    <wheelParticleSystem node="31|0"  />
	    <wheelParticleSystem node="31|1"  />
	</wheelParticleSystems>	
	<!--Feldstaub Ende-->
</vehicle>