<?xml version="1.0" encoding="utf-8" standalone="no" ?>
<vehicle type="TC320" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../shared/xml/schema/vehicle.xsd">
    <annotation>Copyright (C) GIANTS Software GmbH, All Rights Reserved.</annotation>

    <storeData>
        <name>TC 320</name>
        <specs>
            <workingWidth>1.8</workingWidth>
            <neededPower>25</neededPower>
        </specs>
        <functions>
            <function>$l10n_function_tedder</function>
        </functions>
        <image>store_kuhnTC320.dds</image>
        <price>8490</price>
        <lifetime>600</lifetime>
        <rotation>0</rotation>
        <brand>KUHN</brand>
        <category>tedders</category>
		<shopTranslationOffset>0 0.55 0</shopTranslationOffset>
        <shopRotationOffset>0 0 0</shopRotationOffset>
        <vertexBufferMemoryUsage>2504704</vertexBufferMemoryUsage>
        <indexBufferMemoryUsage>367104</indexBufferMemoryUsage>
        <textureMemoryUsage>983040</textureMemoryUsage>
        <audioMemoryUsage>0</audioMemoryUsage>
        <instanceVertexBufferMemoryUsage>0</instanceVertexBufferMemoryUsage>
        <instanceIndexBufferMemoryUsage>0</instanceIndexBufferMemoryUsage>
	</storeData>

    <base>
        <typeDesc>$l10n_typeDesc_tedder</typeDesc>
        <filename>kuhnTC320.i3d</filename>
        <size width="3.55" length="2.2" height="0.85" lengthOffset="-0.05" />
        <speedLimit value="18" />
         <components>
            <component centerOfMass="0 0.5 0.3" solverIterationCount="15" mass="457" />
        </components>
        <schemaOverlay attacherJointPosition="0 0" name="IMPLEMENT" />
        <mapHotspot type="TOOL" />
    </base>
	
	<wheels>
        <wheelConfigurations>
            <wheelConfiguration name="$l10n_configuration_valueDefault" price="0">
                <wheels>
                    <wheel filename="wheels/6.00-9.xml" isLeft="true" hasTireTracks="true">
                        <physics tipOcclusionAreaGroupId="2" restLoad="0.1" repr="rotating_wheel_left" driveNode="wheelLeft" forcePointRatio="0.3" initialCompression="20" suspTravel="0.03" spring="35" damper="50" frictionScale="0.2" rotationDamping="0.0001" brakeFactor="0" versatileYRot="true" yOffset="0.01" rotMax="23" rotMin="-23"/>
                        <tire maxDeformation="0.01"/>
					</wheel>
                    <wheel filename="wheels/6.00-9.xml" isLeft="false" hasTireTracks="true">
                        <physics tipOcclusionAreaGroupId="2" restLoad="0.1" repr="rotating_wheel_right" driveNode="wheelRight" forcePointRatio="0.3" initialCompression="20" suspTravel="0.03" spring="35" damper="50" frictionScale="0.2" rotationDamping="0.0001" brakeFactor="0" versatileYRot="true" yOffset="0.01" rotMax="23" rotMin="-23"/>
                        <tire maxDeformation="0.01"/>
					</wheel>
                </wheels>
            </wheelConfiguration>
        </wheelConfigurations>
    </wheels>

    <attachable>
        <inputAttacherJoints>
            <inputAttacherJoint node="attacherJoint" jointType="implement" topReferenceNode="topReferenceNode" lowerRotLimitScale="0 0 0" upperRotLimitScale="0 0 0" lowerTransLimitScale="0 0.3 0" upperTransLimitScale="0 0 0" upperRotationOffset="1" isDefaultLowered="false" needsLowering="true" allowsLowering="true" >
				<distanceToGround lower="0.32" upper="0.75" />
				<bottomArm widths="0.9 0.9" ballType="1"/>
            </inputAttacherJoint>
        </inputAttacherJoints>
        <steeringAxleAngleScale startSpeed="1" endSpeed="90" backwards="true" />
        <support animationName="moveSupport" />
		<brakeForce force="0.6"/>
    </attachable>
	
	<powerTakeOffs>
        <input inputAttacherJointIndices="1" inputNode="ptoInputNode" aboveAttacher="true" detachNode="ptoDetachNode" materialTemplateName="SHARED_BLACK2" decalMaterialTemplateName="WALTERSCHEID_YELLOW1"/>
		
		<sounds>
            <turnedOn template="tractorPTO" volumeScale="0.6" linkNode="attacherJoint"/>
        </sounds>
    </powerTakeOffs>

    <powerConsumer ptoRpm="400" neededMinPtoPower="5" neededMaxPtoPower="10"/>

    <groundReferenceNodes>
        <groundReferenceNode node="groundReferenceNode" threshold="0.2" />
    </groundReferenceNodes>
	
	<workAreas>
        <workArea type="tedder" functionName="processTedderArea" preprocessFunctionName="preprocessTedderArea" disableBackwards="true" >
            <area startNode="workAreaStart" widthNode="workAreaWidth" heightNode="workAreatHeight" />
            <groundReferenceNode index="1" />
            <tedder dropWindrowWorkAreaIndex="2"/>
            <onlyActiveWhenLowered value="true"/>
        </workArea>

        <workArea type="auxiliary" >
            <area startNode="dropAreaStart" widthNode="dropAreaWidth" heightNode="dropAreaHeight" />
        </workArea>
    </workAreas>
	
	<workModes>
        <workMode name="1.0 m">
            <animation name="foldWorkMode" speed="-1" stopTime="0"/>
            <workAreas>
                <workArea workAreaIndex="1" dropAreaIndex="2"/>
            </workAreas>
        </workMode>
        <workMode name="1.40 m">
            <animation name="foldWorkMode" speed="-1" stopTime="0.20"/>
            <workAreas>
                <workArea workAreaIndex="1" dropAreaIndex="2"/>
            </workAreas>
        </workMode>
        <workMode name="1.80 m">
            <animation name="foldWorkMode" speed="-1" stopTime="0.40"/>
            <workAreas>
                <workArea workAreaIndex="1" dropAreaIndex="2"/>
            </workAreas>
        </workMode>
        <workMode name="2.2 0m">
            <animation name="foldWorkMode" speed="-1" stopTime="0.60"/>
            <workAreas>
                <workArea workAreaIndex="1" dropAreaIndex="2"/>
            </workAreas>
        </workMode>
		<workMode name="2.60 m">
            <animation name="foldWorkMode" speed="-1" stopTime="0.80"/>
            <workAreas>
                <workArea workAreaIndex="1" dropAreaIndex="2"/>
            </workAreas>
        </workMode>
        <workMode name="3.10 m">
            <animation name="foldWorkMode" speed="-1" stopTime="1"/>
            <workAreas>
                <workArea workAreaIndex="1" dropAreaIndex="2"/>
            </workAreas>
        </workMode>
    </workModes>
	
	<animations>
		<animation name="foldWorkMode">
            <part node="windrower_left"	startTime="0" endTime="0.20" startRot="0 30.304 0" endRot="0 18.891 0" />
            <part node="windrower_right"	startTime="0" endTime="0.20" startRot="0 -65.725 0" endRot="0 -53.457 0" />
			
            <part node="windrower_left"	startTime="0.20001" endTime="0.4" startRot="0 18.891 0" endRot="0 6.526 0" />
            <part node="windrower_right"	startTime="0.20001" endTime="0.4" startRot="0 -53.457 0" endRot="0 -41.42 0" />
						
            <part node="windrower_left"	startTime="0.40001" endTime="0.60" startRot="0 6.526 0" endRot="0 -5.835 0" />
            <part node="windrower_right"	startTime="0.40001" endTime="0.60" startRot="0 -41.42 0" endRot="0 -29.533 0" />
			
            <part node="windrower_left"	startTime="0.60001" endTime="0.80" startRot="0 -5.835 0" endRot="0 -17.947 0" />
            <part node="windrower_right"	startTime="0.60001" endTime="0.80" startRot="0 -29.533 0" endRot="0 -17.282 0" />
			
			<part node="windrower_left"	startTime="0.80001" endTime="1" startRot="0 -17.947 0" endRot="0 -29.216 0" />
            <part node="windrower_right"	startTime="0.80001" endTime="1" startRot="0 -17.282 0" endRot="0 -6.205 0" />
			
            <part node="dropAreaStart" 		startTime="0" 		endTime="0.20" 	startTrans="0.25 0 -0.338" 	endTrans="0.375 0 -0.338"/>
            <part node="dropAreaWidth" 		startTime="0" 		endTime="0.20" 	startTrans="-0.25 0 -0.338" endTrans="-0.375 0 -0.338"/>
            <part node="dropAreaHeight" 	startTime="0" 		endTime="0.20" 	startTrans="0.25 0 -0.969" 	endTrans="0.375 0 -0.969"/>
			
            <part node="dropAreaStart" 		startTime="0.20001" endTime="0.4" startTrans="0.375 0 -0.338" 	endTrans="0.5 0 -0.338"/>
            <part node="dropAreaWidth" 		startTime="0.20001" endTime="0.4" startTrans="-0.375 0 -0.338" 	endTrans="-0.5 0 -0.338"/>
            <part node="dropAreaHeight" 	startTime="0.20001" endTime="0.4" startTrans="0.375 0 -0.969" 	endTrans="0.5 0 -0.969"/>
			
            <part node="dropAreaStart" 		startTime="0.40001" endTime="0.60" startTrans="0.5 0 -0.338" 	endTrans="0.625 0 -0.338"/>
            <part node="dropAreaWidth" 		startTime="0.40001" endTime="0.60" startTrans="-0.5 0 -0.338"   endTrans="-0.625 0 -0.338"/>
            <part node="dropAreaHeight" 	startTime="0.40001" endTime="0.60" startTrans="0.5 0 -0.969" 	endTrans="0.625 0 -0.969"/>
			
            <part node="dropAreaStart" 		startTime="0.60001" endTime="0.80" startTrans="0.625 0 -0.338" 	endTrans="1.107 0 -0.338" />
            <part node="dropAreaWidth" 		startTime="0.60001" endTime="0.80" startTrans="-0.625 0 -0.338" endTrans="-1.107 0 -0.338" />
            <part node="dropAreaHeight" 	startTime="0.60001" endTime="0.80" startTrans="0.625 0 -0.969"  endTrans="1.107 0 -0.969" />
			
			<part node="dropAreaStart" 		startTime="0.80001" endTime="1" startTrans="1.107 0 -0.338" 	endTrans="1.375 0 -0.338" />
            <part node="dropAreaWidth" 		startTime="0.80001" endTime="1" startTrans="-1.107 0 -0.338" 	endTrans="-1.375 0 -0.338" />
            <part node="dropAreaHeight" 	startTime="0.80001" endTime="1" startTrans="1.107 0 -0.969" 	endTrans="1.375 0 -0.969" />	
			
			<part node="particleLeft"	startTime="0" endTime="0.20" startRot="-30 20 0" endRot="-30 20 0" />
            <part node="particleRight"	startTime="0" endTime="0.20" startRot="-30 -20 0" endRot="-30 -20 0" />
			
            <part node="particleLeft"	startTime="0.20001" endTime="0.4" startRot="-30 15 0" endRot="-30 15 0" />
            <part node="particleRight"	startTime="0.20001" endTime="0.4" startRot="-30 -15 0" endRot="-30 -15 0" />
						
            <part node="particleLeft"	startTime="0.40001" endTime="0.60" startRot="-30 10 0" endRot="-30 10 0" />
            <part node="particleRight"	startTime="0.40001" endTime="0.60" startRot="-30 -10 0" endRot="-30 -10 0" />
			
            <part node="particleLeft"	startTime="0.60001" endTime="0.80" startRot="-30 5 0" endRot="-30 5 0" />
            <part node="particleRight"	startTime="0.60001" endTime="0.80" startRot="-30 -5 0" endRot="-30 -5 0" />
			
			<part node="particleLeft"	startTime="0.80001" endTime="1" startRot="-30 0 0" endRot="-30 0 0" />
            <part node="particleRight"	startTime="0.80001" endTime="1" startRot="-30 0 0" endRot="-30 0 0" />
			
			<sound template="clackVar6"       startTime="0.20"  direction="1" volumeScale="2" pitchScale="1" />
			<sound template="clackVar6"       startTime="0.20001"  direction="1" volumeScale="2" pitchScale="1" />
			<sound template="clackVar6"       startTime="0.40001"  direction="1" volumeScale="2" pitchScale="1" />
			<sound template="clackVar6"       startTime="0.60001"  direction="1" volumeScale="2" pitchScale="1" />
			<sound template="clackVar6"       startTime="0.80001"  direction="1" volumeScale="2" pitchScale="1" />
        </animation>
		
		<animation name="moveSupport">
			<part node="supportArm_vis" startTime="0.1" endTime="0.5" startTrans="0.516 0.075 0.807" endTrans="0.516 -0.264 0.807"/>
			
			<part node="splintSupportArm" startTime="0" endTime="0.1" startTrans="0 0.486 0.69" endTrans="0 0.486 0.797"/>
			<part node="splintSupportArm" startTime="0.5" endTime="0.6" startTrans="0 0.486 0.797" endTrans="0 0.486 0.69"/>
			
			<sound template="clackVar5" startTime="0.1"  volumeScale="2" pitchScale="1" linkNode="supportArm_vis"/>
            <sound template="clackVar1" startTime="0" volumeScale="1" pitchScale="3" linkNode="supportArm_vis"/>	
        </animation>
    </animations>
	
	<tedder fillTypeConverter="TEDDER">
        <animationNodes>
            <animationNode node="rotor" rotAxis="2" rotSpeed="1500" turnOnFadeTime="1" turnOffFadeTime="3"/>
        </animationNodes>

        <effects>
            <effect workAreaIndex="1">
                <effectNode effectClass="TypedMotionPathEffect" effectType="TEDDER" linkNode="particleLeft">
                    <motionPathEffect textureFilename="$data/effects/tedder/arrays/sharedTedderArrayLeft.dds" numRows="4" rowLength="28" minFade="0.03"/>
                </effectNode>
                <effectNode effectClass="TypedMotionPathEffect" effectType="TEDDER" linkNode="particleRight">
                    <motionPathEffect textureFilename="$data/effects/tedder/arrays/sharedTedderArrayRight.dds" numRows="4" rowLength="28" minFade="0.03"/>
                </effectNode>
				<effectNode effectNode="smokeEmitter" effectClass="ParticleEffect" particleType="smoke" materialType="smokeParticle" worldSpace="false" emitCountScale="0.3"/>
			</effect>
        </effects>
    </tedder>
	
	<turnOnVehicle turnOffIfNotAllowed="true">
        <sounds>
            <work file="sounds/work_loop.wav" innerRadius="5.0" outerRadius="80.0" fadeOut="0.1" >
                <volume indoor="0.8" outdoor="1.3"/>
                <pitch indoor="1.0" outdoor="1.0" >
					<modifier type="SPEED" value="0.00" modifiedValue="1.00" />
					<modifier type="SPEED" value="1.00" modifiedValue="0.90" />
				</pitch>
				<lowpassGain indoor="0.2" outdoor="0.7" />
            </work>
        </sounds>
    </turnOnVehicle>
	
	 <designConfigurations title="$l10n_ui_brands">
        <designConfiguration name="$l10n_configuration_kuhnOldDesign" price="0" vehicleBrand="KUHN" vehicleName="TC 320">
            <objectChange node="kuhnOldDesign"  visibilityActive="true" visibilityInactive="false"/>
			
			<objectChange node="kuhnNewDesign"  visibilityActive="false" visibilityInactive="true"/>
			<objectChange node="DecalWindrowerLeft"  visibilityActive="false" visibilityInactive="true"/>
			<objectChange node="DecalWindrowerRight"  visibilityActive="false" visibilityInactive="true"/>
			<objectChange node="deutzFahrDesign"  visibilityActive="false" visibilityInactive="true"/>
			
			<objectChange node="conditionerPlanesWhite"  visibilityActive="true" visibilityInactive="false"/>
			<objectChange node="conditionerPlanesGrey"  visibilityActive="false" visibilityInactive="false"/>
			<objectChange node="conditionerPlanesBlack"  visibilityActive="false" visibilityInactive="false"/>
        </designConfiguration>
		<designConfiguration name="$l10n_configuration_kuhnNewDesign" price="0" vehicleBrand="KUHN" vehicleName="TC 320">
            <objectChange node="kuhnNewDesign"  visibilityActive="true" visibilityInactive="false"/>
			<objectChange node="DecalWindrowerLeft"  visibilityActive="true" visibilityInactive="false"/>
			<objectChange node="DecalWindrowerRight"  visibilityActive="true" visibilityInactive="false"/>
			
			<objectChange node="kuhnOldDesign"  visibilityActive="false" visibilityInactive="true"/>
			<objectChange node="deutzFahrDesign"  visibilityActive="false" visibilityInactive="true"/>
			
			<objectChange node="conditionerPlanesWhite"  visibilityActive="false" visibilityInactive="false"/>
			<objectChange node="conditionerPlanesGrey"  visibilityActive="true" visibilityInactive="false"/>
			<objectChange node="conditionerPlanesBlack"  visibilityActive="false" visibilityInactive="false"/>				
        </designConfiguration>
        <designConfiguration name="Deutz-Fahr" price="0" vehicleBrand="DEUTZFAHR" vehicleName="TC 3.32">
            <objectChange node="deutzFahrDesign"  visibilityActive="true" visibilityInactive="false"/>
			
			<objectChange node="kuhnOldDesign"  visibilityActive="false" visibilityInactive="true"/>
			<objectChange node="kuhnNewDesign"  visibilityActive="false" visibilityInactive="true"/>
			<objectChange node="DecalWindrowerLeft"  visibilityActive="false" visibilityInactive="true"/>
			<objectChange node="DecalWindrowerRight"  visibilityActive="false" visibilityInactive="true"/>
			
			<objectChange node="conditionerPlanesWhite"  visibilityActive="false" visibilityInactive="false"/>
			<objectChange node="conditionerPlanesGrey"  visibilityActive="false" visibilityInactive="false"/>
			<objectChange node="conditionerPlanesBlack"  visibilityActive="true" visibilityInactive="false"/>
			<material materialSlotName="KRED_calibratedPaint" materialTemplateName="DEUTZ_GREEN5"/>
			<material materialSlotName="KGREY_calibratedPaint" materialTemplateName="DEUTZ_BLACK1"/>
        </designConfiguration>
    </designConfigurations>
	
	<windBending>
        <windBendingNodes>
		    <windBendingNode node="conditionerPlanesWhite"      maxBending="0.02" maxBendingSpeed="20" decalNode="conditionerPlaneDecalOldDesign"/>
			<windBendingNode node="conditionerPlanesGrey"      maxBending="0.02" maxBendingSpeed="20" decalNode="conditionerPlaneDecalNewDesign"/>
			<windBendingNode node="conditionerPlanesBlack"      maxBending="0.02" maxBendingSpeed="20"/>
        </windBendingNodes>
    </windBending>
	
	<ai>
        <needsLowering value="true" />
        <areaMarkers leftNode="aiMarkerLeft" rightNode="aiMarkerRight" backNode="aiMarkerBack" />
        <collisionTrigger node="aiCollisionNode" width="2.55" height="1"/>
        <agentAttachment width="2.55" height="1" length="1.2" lengthOffset="0"/>
    </ai>
	
	<foliageBending>
        <bendingNode minX="-1.5" maxX="1.5" minZ="-0.6" maxZ="0.5" yOffset="0.2" />
    </foliageBending>
	
	<wearable wearDuration="480" workMultiplier="5" fieldMultiplier="2"/>
    <washable dirtDuration="90" washDuration="1" workMultiplier="4" fieldMultiplier="2"/>
	
    <i3dMappings>
        <i3dMapping id="TC320_main_component1" node="0>" />
        <i3dMapping id="TC320_vis" node="0>0" />
		<i3dMapping id="attachable" node="0>0|0" />
        <i3dMapping id="topReferenceNode" node="0>0|0|0" />
		<i3dMapping id="attacherJoint" node="0>0|0|1" />
		<i3dMapping id="ptoInputNode" node="0>0|0|2" />
		<i3dMapping id="ptoDetachNode" node="0>0|0|3" />
		<i3dMapping id="supportArm_vis" node="0>0|0|4|0" />
		<i3dMapping id="splintSupportArm" node="0>0|0|4|1" />
		<i3dMapping id="wheels" node="0>0|1" />
		<i3dMapping id="rotating_wheel_left" node="0>0|1|0" />
		<i3dMapping id="wheelLeft" node="0>0|1|0|0" />
		<i3dMapping id="rotating_wheel_right" node="0>0|1|1" />
		<i3dMapping id="wheelRight" node="0>0|1|1|0" />
		<i3dMapping id="workAreaStart" node="0>0|2|0" />
        <i3dMapping id="workAreaWidth" node="0>0|2|1" />
        <i3dMapping id="workAreatHeight" node="0>0|2|2" />
        <i3dMapping id="dropAreaStart" node="0>0|2|3" />
        <i3dMapping id="dropAreaWidth" node="0>0|2|4" />
        <i3dMapping id="dropAreaHeight" node="0>0|2|5" />
        <i3dMapping id="groundReferenceNode" node="0>0|2|6" />
		<i3dMapping id="aiMarkerLeft" node="0>0|3|0|0" />
        <i3dMapping id="aiMarkerRight" node="0>0|3|0|1" />
        <i3dMapping id="aiMarkerBack" node="0>0|3|0|2" />
        <i3dMapping id="aiCollisionNode" node="0>0|3|1" />
		<i3dMapping id="effects" node="0>0|4" />
		<i3dMapping id="particleLeft" node="0>0|4|0" />
		<i3dMapping id="particleRight" node="0>0|4|1" />
		<i3dMapping id="smokeEmitter" node="0>0|4|2" />
		<i3dMapping id="windrower_left" node="0>0|5|0|0" />
		<i3dMapping id="DecalWindrowerLeft" node="0>0|5|0|0|0" />
		<i3dMapping id="windrower_right" node="0>0|5|0|1" />
		<i3dMapping id="DecalWindrowerRight" node="0>0|5|0|1|0" />
		<i3dMapping id="rotor" node="0>0|5|1" />
		<i3dMapping id="conditionerPlanesWhite" node="0>0|6|2|0" />
		<i3dMapping id="conditionerPlanesGrey" node="0>0|6|2|1" />
		<i3dMapping id="conditionerPlanesBlack" node="0>0|6|2|2" />
		<i3dMapping id="kuhnOldDesign" node="0>0|6|3|0" />
		<i3dMapping id="conditionerPlaneDecalOldDesign" node="0>0|6|3|0|1" />
		<i3dMapping id="kuhnNewDesign" node="0>0|6|3|1" />
		<i3dMapping id="conditionerPlaneDecalNewDesign" node="0>0|6|3|1|1" />
		<i3dMapping id="deutzFahrDesign" node="0>0|6|3|2" />
    </i3dMappings>
</vehicle>	