<?xml version="1.0" encoding="utf-8" standalone="no" ?>
<vehicle type="tedder">
    <annotation>Copyright (C) GIANTS Software GmbH, All Rights Reserved.</annotation>

    <storeData>
        <name>KH4S</name>
        <functions>
            <function>$l10n_function_tedder</function>
        </functions>
        <specs>
            <neededPower>50</neededPower>
            <workingWidth>4.0</workingWidth>>
        </specs>
        <rotation>0</rotation>
        <image>store.dds</image>
        <price>2500</price>
        <lifetime>600</lifetime>
        <brand>FAHR</brand>
        <category>tedders</category>
        <vertexBufferMemoryUsage>206080</vertexBufferMemoryUsage>
        <indexBufferMemoryUsage>39480</indexBufferMemoryUsage>
        <textureMemoryUsage>1398256</textureMemoryUsage>
        <instanceVertexBufferMemoryUsage>0</instanceVertexBufferMemoryUsage>
        <instanceIndexBufferMemoryUsage>0</instanceIndexBufferMemoryUsage>
    </storeData>

    <base>
        <typeDesc>$l10n_typeDesc_tedder</typeDesc>
        <filename>fahr4.i3d</filename>
        <size width="5.5" length="1" />
        <components>
            <component centerOfMass="0 0.1 0" solverIterationCount="10" mass="650" />
        </components>
        <schemaOverlay attacherJointPosition="0 0">
            <default name="DEFAULT_IMPLEMENT"/>
            <selected name="DEFAULT_IMPLEMENT_SELECTED"/>
        </schemaOverlay>
    </base>
	
	<attachable>
        <inputAttacherJoints>
            <inputAttacherJoint node="0>6" jointType="implement" topReferenceNode="0>7">
                <distanceToGround lower="0.5" upper="1" />
            </inputAttacherJoint>
        </inputAttacherJoints>
        <lowerAnimation name="lowerAnimation" />
        <support animationName="moveSupport" />
        <brakeForce>0.01</brakeForce>
    </attachable>
	
	<powerTakeOffs>
        <input inputAttacherJointIndices="1" detachNode="0>5|1" inputNode="0>5|0" aboveAttacher="true" />
    </powerTakeOffs>
	
    <wheels>

        <hubs>
            <hub linkNode="0>0|2"    filename="$data/shared/wheels/hubs/hubSmall_n0_1.xml" isLeft="true" scale="0.142 0.142 0.142" />
            <hub linkNode="0>4|0"    filename="$data/shared/wheels/hubs/hubSmall_n0_1.xml" isLeft="false"  scale="0.142 0.142 0.142" />
            <hub linkNode="0>2|2"      filename="$data/shared/wheels/hubs/hubSmall_n0_1.xml" isLeft="false"  scale="0.142 0.142 0.142" />
            <hub linkNode="0>4|1"      filename="$data/shared/wheels/hubs/hubSmall_n0_1.xml" isLeft="true" scale="0.142 0.142 0.142" />
        </hubs>
		
        <dynamicallyLoadedWheels>
            <dynamicallyLoadedWheel linkNode="0>2|2"   filename="$data/shared/wheels/trelleborg/T510/16x6_50R8.xml" isLeft="false"/>
            <dynamicallyLoadedWheel linkNode="0>0|2"       filename="$data/shared/wheels/trelleborg/T510/16x6_50R8.xml" isLeft="true"/>
            <dynamicallyLoadedWheel linkNode="0>4|0"   filename="$data/shared/wheels/trelleborg/T510/16x6_50R8.xml" isLeft="false"/>
            <dynamicallyLoadedWheel linkNode="0>4|1"       filename="$data/shared/wheels/trelleborg/T510/16x6_50R8.xml" isLeft="true"/>
        </dynamicallyLoadedWheels>		
    </wheels>
	
    <speedRotatingParts>
        <speedRotatingPart node="0>2|2"   radius="0.13" groundReferenceNodeIndex="1" />
        <speedRotatingPart node="0>0|2"   radius="0.13" groundReferenceNodeIndex="1" />
        <speedRotatingPart node="0>4|1"   radius="0.13" groundReferenceNodeIndex="1" />
        <speedRotatingPart node="0>4|0"   radius="0.13" groundReferenceNodeIndex="1" />
    </speedRotatingParts>	
	
    <powerConsumer ptoRpm="450" neededMinPtoPower="1" neededMaxPtoPower="11" />			

    <groundReferenceNodes>
        <groundReferenceNode node="0>" threshold="0.3" />
    </groundReferenceNodes>
			
    <workAreas>
        <workArea type="tedder" functionName="processTedderArea" preprocessFunctionName="preprocessTedderArea" disableBackwards="true" >
            <area startNode="0>8|0|0" widthNode="0>8|0|1" heightNode="0>8|0|2" />
            <groundReferenceNode index="1" />
            <folding minLimit="0" maxLimit="0.1" />
            <tedder dropWindrowWorkAreaIndex="4"/>
        </workArea>
        <workArea type="tedder" functionName="processTedderArea" preprocessFunctionName="preprocessTedderArea" disableBackwards="true" >
            <area startNode="0>8|1|0" widthNode="0>8|1|1" heightNode="0>8|1|2" />
            <groundReferenceNode index="1" />
            <folding minLimit="0" maxLimit="0.1" />
            <tedder dropWindrowWorkAreaIndex="5"/>
        </workArea>
        <workArea type="tedder" functionName="processTedderArea" preprocessFunctionName="preprocessTedderArea" disableBackwards="true" >
            <area startNode="0>8|2|0" widthNode="0>8|2|1" heightNode="0>8|2|2" />
            <groundReferenceNode index="1" />
            <folding minLimit="0" maxLimit="0.1" />
            <tedder dropWindrowWorkAreaIndex="6"/>
        </workArea>
			
        <workArea type="auxiliary" >
            <area startNode="0>9|0|0" widthNode="0>9|0|1" heightNode="0>9|0|2" />
        </workArea>
        <workArea type="auxiliary" >
            <area startNode="0>9|1|0" widthNode="0>9|1|1" heightNode="0>9|1|2" />
        </workArea>
        <workArea type="auxiliary" >
            <area startNode="0>9|2|0" widthNode="0>9|2|1" heightNode="0>9|2|2" />
        </workArea>
    </workAreas>	

    <foliageBending>
        <bendingNode minX="-0.5" maxX="0.5" minZ="-0.5" maxZ="0.3" yOffset="0.1" />
    </foliageBending>
	
    <baseMaterial>
        <material name="lambert1" baseNode="0>0">
            <shaderParameter name="colorMat1" value="0.1200 0.0000 0.0000"/>			
        </material>
        <material name="lambert2" baseNode="0>1">
            <shaderParameter name="colorMat1" value="0.1200 0.0000 0.0000"/>			
        </material>
        <material name="lambert3" baseNode="0>2">
            <shaderParameter name="colorMat1" value="0.1200 0.0000 0.0000"/>			
        </material>
    </baseMaterial>

    <baseMaterialConfigurations useDefaultColors="false" defaultColorIndex="0">
        <baseMaterialConfiguration color="0.1200 0.0000 0.0000"        name="$l10n_Fahr"   price="100"/>
		<baseMaterialConfiguration color="0.2500 0.0050 0.0050" 	   name="$l10n_Fahr"   price="100"/>			
		<baseMaterialConfiguration color="0.1500 0.0400 0.0500" 	   name="$l10n_Fahr"    price="100"/>		
        <baseMaterialConfiguration color="0.1062 0.5234 0.1450"        name="$l10n_Deutz"   price="100"/>					
        <baseMaterialConfiguration color="0.0697 0.1390 0.0265"        name="$l10n_Deutz"   price="100"/>				
        <baseMaterialConfiguration color="0.1701 0.5295 0.0546"        name="$l10n_Deutz"   price="100"/>			
        <material name="lambert1" shaderParameter="colorMat1"/>				
        <material name="lambert2" shaderParameter="colorMat1"/>				
        <material name="lambert3" shaderParameter="colorMat1"/>					
    </baseMaterialConfigurations>	

    <tedder fillTypeConverter="TEDDER">
		<animationNodes>
            <animationNode node="0>0|0"             rotSpeed="-800" turnOnFadeTime="1" turnOffFadeTime="3"/>
            <animationNode node="0>1|0"               rotSpeed="800"  turnOnFadeTime="1" turnOffFadeTime="3"/>
            <animationNode node="0>1|1"               rotSpeed="-800" turnOnFadeTime="1" turnOffFadeTime="3"/>
            <animationNode node="0>2|0"               rotSpeed="800"  turnOnFadeTime="1" turnOffFadeTime="3"/>
		</animationNodes>
		
		<effects>
            <effect workAreaIndex="1">
                <effectNode effectClass="ParticleEffect" effectNode="0>10|0|0" particleType="TEDDER" />
            </effect>
            <effect workAreaIndex="2">
                <effectNode effectClass="ParticleEffect" effectNode="0>10|1|0" particleType="TEDDER" />
            </effect>
            <effect workAreaIndex="3">
                <effectNode effectClass="ParticleEffect" effectNode="0>10|2|0" particleType="TEDDER" />
            </effect>
        </effects>
	</tedder>
	
    <foldable>
        <foldingParts startMoveDirection="1" turnOnFoldMaxLimit="0.2" turnOnFoldMinLimit="0">
            <foldingPart animationName="folding" speedScale="0.7" />
        </foldingParts>
    </foldable>
	
    <animations>
        <animation name="folding">
            <part startTime="0" endTime="3.0" node="0>0" startRot="0 0 0" endRot="0 -90 0"/>
            <part startTime="3" endTime="6.0" node="0>2" startRot="0 0 0" endRot="0 90 0"/>
        </animation>
    </animations>	
	
    <turnOnVehicle turnOffIfNotAllowed="true">
        <sounds>
            <work template="DEFAULT_TEDDER" />
        </sounds>
    </turnOnVehicle>	
	
    <ai>
        <needsLowering value="true" />
        <areaMarkers leftNode="0>3|0|0" rightNode="0>3|0|1" backNode="0>3|0|2" />
    </ai>		

    <wearable wearDuration="480" workMultiplier="5" fieldMultiplier="2"/>
    <washable dirtDuration="90" washDuration="1" workMultiplier="2" fieldMultiplier="2"/>

</vehicle>
