﻿<?xml version="1.0" encoding="utf-8" standalone="no" ?>
<vehicle type="tedder" 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>ALPINHIT 4.4 H</name>
        <specs>
            <workingWidth>4.4</workingWidth>
            <neededPower>30</neededPower>
        </specs>
        <functions>
            <function>$l10n_function_tedder</function>
        </functions>
        <storePacks>
            <storePack>STARTER_HAY</storePack>
        </storePacks>
        <image>$data/vehicles/poettinger/alpinHit44/store_alpinHit44.png</image>
        <price>7000</price>
        <lifetime>600</lifetime>
        <rotation>0</rotation>
        <brand>POETTINGER</brand>
        <category>tedders</category>
        <shopTranslationOffset>0 0.016 0</shopTranslationOffset>
        <shopRotationOffset>0 0 0</shopRotationOffset>
        <shopHeight>2.75</shopHeight>
        <vertexBufferMemoryUsage>1032448</vertexBufferMemoryUsage>
        <indexBufferMemoryUsage>198656</indexBufferMemoryUsage>
        <textureMemoryUsage>1114112</textureMemoryUsage>
        <instanceVertexBufferMemoryUsage>0</instanceVertexBufferMemoryUsage>
        <instanceIndexBufferMemoryUsage>0</instanceIndexBufferMemoryUsage>
        <audioMemoryUsage>0</audioMemoryUsage>
    </storeData>

    <base>
        <typeDesc>$l10n_typeDesc_tedder</typeDesc>
        <filename>$data/vehicles/poettinger/alpinHit44/alpinHit44.i3d</filename>
        <size width="3.2" length="2.2" lengthOffset="-0.05" />
        <speedLimit value="15" />
        <components>
            <component centerOfMass="0 0.5 0.3" solverIterationCount="15" mass="260" />
        </components>
        <schemaOverlay attacherJointPosition="0 0" name="IMPLEMENT" />
        <mapHotspot type="TOOL" />
    </base>

    <wheels>
        <wheelConfigurations>
            <wheelConfiguration name="$l10n_configuration_valueDefault" price="0">
                <wheels>
                    <wheel filename="$data/shared/wheels/tires/trelleborg/T510/16x6_50R8.xml" isLeft="true" hasTireTracks="true">
                        <physics restLoad="0.1" repr="wheel01" forcePointRatio="0.2" initialCompression="10" suspTravel="0.1" spring="8" damper="30" frictionScale="1.5" rotationDamping="0.0002" yOffset="0.025"/>
                    </wheel>
                    <wheel filename="$data/shared/wheels/tires/trelleborg/T510/16x6_50R8.xml" isLeft="false" hasTireTracks="true">
                        <physics restLoad="0.1" repr="wheel02" forcePointRatio="0.2" initialCompression="10" suspTravel="0.1" spring="8" damper="30" frictionScale="1.5" rotationDamping="0.0002" yOffset="0.025"/>
                    </wheel>
                    <wheel filename="$data/shared/wheels/tires/trelleborg/T510/16x6_50R8.xml" isLeft="true" hasTireTracks="true">
                        <physics restLoad="0.1" repr="wheel03" forcePointRatio="0.2" initialCompression="10" suspTravel="0.1" spring="8" damper="30" frictionScale="1.5" rotationDamping="0.0002" yOffset="0.025"/>
                    </wheel>
                    <wheel filename="$data/shared/wheels/tires/trelleborg/T510/16x6_50R8.xml" isLeft="false" hasTireTracks="true">
                        <physics restLoad="0.1" repr="wheel04" forcePointRatio="0.2" initialCompression="10" suspTravel="0.1" spring="8" damper="30" frictionScale="1.5" rotationDamping="0.0002" yOffset="0.025"/>
                    </wheel>
                </wheels>
            </wheelConfiguration>
        </wheelConfigurations>

        <rimColor material="18">SHARED_WHITE1</rimColor>

        <hubs>
            <color0 material="18">SHARED_WHITE1</color0>
            <hub linkNode="wheel01" filename="$data/shared/wheels/hubs/hubSmall_n0_1.xml" isLeft="true"  scale="0.08 0.1 0.1" offset="-0.005" />
            <hub linkNode="wheel02" filename="$data/shared/wheels/hubs/hubSmall_n0_1.xml" isLeft="false" scale="0.08 0.1 0.1" offset="-0.005" />
            <hub linkNode="wheel03" filename="$data/shared/wheels/hubs/hubSmall_n0_1.xml" isLeft="true"  scale="0.08 0.1 0.1" offset="-0.005" />
            <hub linkNode="wheel04" filename="$data/shared/wheels/hubs/hubSmall_n0_1.xml" isLeft="false" scale="0.08 0.1 0.1" offset="-0.005" />
        </hubs>
    </wheels>

    <lights>
        <realLights>
            <high>
                <light node="backLightsHigh1" lightTypes="0" />
                <brakeLight node="backLightsHigh1" />
                <turnLightLeft node="turnLightLeftBack" />
                <turnLightRight node="turnLightRightBack" />
            </high>
        </realLights>

        <defaultLights>
            <defaultLight shaderNode="backlightGlass_static" lightTypes="0" />
        </defaultLights>

        <turnLights>
            <turnLightLeft shaderNode="turnLightLeftGlass_static" />
            <turnLightRight shaderNode="turnLightRightGlass_static" />
        </turnLights>

        <brakeLights>
            <brakeLight shaderNode="backlightGlass_static" />
        </brakeLights>
    </lights>

    <attachable>
        <inputAttacherJoints>
            <inputAttacherJoint node="attacherJoint" jointType="implement" upperRotationOffset="10" lowerRotationOffset="0" lowerRotLimitScale="0 0 0" lowerTransLimitScale="0 1 0" topReferenceNode="topReferenceNode">
                <distanceToGround lower="0.3" upper="0.8"/>
            </inputAttacherJoint>
        </inputAttacherJoints>
        <support animationName="moveSupport" delayedOnLoad="true"/>
    </attachable>

    <dynamicallyLoadedParts>
        <dynamicallyLoadedPart node="1|1" linkNode="electric_connector" filename="$data/shared/connectionHoses/connectors.i3d" />
    </dynamicallyLoadedParts>

    <connectionHoses>
        <hose inputAttacherJointIndices="1" type="electric" node="electric" length="1.3" diameter="0.012" straighteningFactor="2">
            <objectChange node="electric_detached" visibilityActive="false" visibilityInactive="true"/>
        </hose>
    </connectionHoses>

    <powerTakeOffs>
        <input inputAttacherJointIndices="1" inputNode="ptoInputNode" aboveAttacher="true" detachNode="ptoDetachNode"/>
    </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" />
            <folding minLimit="0" maxLimit="0.1" />
            <tedder dropWindrowWorkAreaIndex="2"/>
            <onlyActiveWhenLowered value="true"/>
        </workArea>

        <workArea type="auxiliary" >
            <area startNode="dropAreaStart" widthNode="dropAreaWidth" heightNode="dropAreaHeight" />
        </workArea>
    </workAreas>

    <foldable>
        <foldingConfigurations>
            <foldingConfiguration>
                <foldingParts startMoveDirection="1" turnOnFoldMaxLimit="0.1" turnOnFoldMinLimit="0">
                    <foldingPart animationName="folding" speedScale="0.8" />
                </foldingParts>
            </foldingConfiguration>
        </foldingConfigurations>
    </foldable>

    <animations>
        <animation name="moveSupport">
            <part node="supportArm" startTime="0" endTime="0.1" startTrans="0 0.324 0" endTrans="0 0 0" />
            <part node="supportArm2" startTime="0" endTime="0.1" startTrans="0 0 0" endTrans="0 0.77 0" />

            <sound template="clackVar5" startTime="0.05" volumeScale="2" pitchScale="1.4" linkNode="attacherJoint"/>
            <sound template="clackVar1" startTime="0.05" volumeScale="1" pitchScale="3" linkNode="attacherJoint"/>
        </animation>
        <animation name="folding">
            <part node="leftArm"     startTime="0.00" endTime="2.80" startRot="0 0 0" endRot="0 0 -105" />
            <part node="leftLockArm" startTime="2.03" endTime="2.19" startRot="0.0 0.0 0.0" endRot="0.0 0.0 5.869" />
            <part node="leftLockArm" startTime="2.19" endTime="2.37" startRot="0.0 0.0 5.869" endRot="0.0 0.0 14.702" />
            <part node="leftLockArm" startTime="2.37" endTime="2.57" startRot="0.0 0.0 14.702" endRot="0.0 0.0 24.684" />
            <part node="leftLockArm" startTime="2.57" endTime="2.65" startRot="0.0 0.0 24.684" endRot="0.0 0.0 24.036" />
            <part node="leftLockArm" startTime="2.65" endTime="2.77" startRot="0.0 0.0 24.036" endRot="0.0 0.0 14.657" />
            <part node="leftLockArm" startTime="2.77" endTime="2.85" startRot="0.0 0.0 14.657" endRot="0.0 0.0 0.0" />

            <part node="rightArm"     startTime="0.20" endTime="3.00" startRot="0 0 0" endRot="0 0 105" />
            <part node="rightLockArm" startTime="2.23" endTime="2.36" startRot="0.0 0.0 0.0" endRot="0.0 0.0 -4.253" />
            <part node="rightLockArm" startTime="2.36" endTime="2.52" startRot="0.0 0.0 -4.253" endRot="0.0 0.0 -11.209" />
            <part node="rightLockArm" startTime="2.52" endTime="2.63" startRot="0.0 0.0 -11.209" endRot="0.0 0.0 -17.875" />
            <part node="rightLockArm" startTime="2.63" endTime="2.71" startRot="0.0 0.0 -17.875" endRot="0.0 0.0 -23.934" />
            <part node="rightLockArm" startTime="2.85" endTime="2.90" startRot="0.0 0.0 -23.934" endRot="0.0 0.0 -21.299" />
            <part node="rightLockArm" startTime="2.90" endTime="2.98" startRot="0.0 0.0 -21.299" endRot="0.0 0.0 -9.684" />
            <part node="rightLockArm" startTime="2.98" endTime="3.15" startRot="0.0 0.0 -9.684" endRot="0.0 0.0 0.0" />

            <sound template="defaultHydraulicSound" startTime="0.2"  endTime="3"    volumeScale="1.4" pitchScale="1.2" fadeIn="0.1" fadeOut="0.1" />
            <sound template="defaultHydraulicSound" startTime="0.01" endTime="2.8"  volumeScale="1.4" pitchScale="1.4" fadeIn="0.1" fadeOut="0.1" />
            <sound template="clackVar4"             startTime="3.1"  direction="-1" volumeScale="2.1" pitchScale="0.6" />
            <sound template="sheetImp02"            startTime="3.1"  direction="-1" volumeScale="1.8" pitchScale="0.6" />
            <sound template="metalClose"            startTime="0.2"  direction="-1" volumeScale="1.4" pitchScale="0.6" />
            <sound template="clackVar6"             startTime="0.01" direction="-1" volumeScale="1"   pitchScale="0.8" />
            <sound template="sheetImp02"            startTime="0.01" direction="-1" volumeScale="1"   pitchScale="1.2" />
            <sound template="sheetImp02"            startTime="0.01" direction="1"  volumeScale="3"   pitchScale="0.7" />
            <sound template="clackVar4"             startTime="0.2"  direction="1"  volumeScale="1.4" pitchScale="0.6" />
            <sound template="clackVar6"             startTime="3"    direction="1"  volumeScale="1.3" pitchScale="0.8" />
            <sound template="sheetImp01"            startTime="3"    direction="1"  volumeScale="0.8" pitchScale="0.8" />
            <sound template="clackVar4"             startTime="2.8"  direction="1"  volumeScale="2.3" pitchScale="0.7" />
        </animation>
    </animations>

    <cylindered>
        <movingTools>
            <movingTool node="leftArm" playSound="true" wheelIndices="1">
                <dependentPart node="leftArmSpring" />
                <dependentPart node="pto01Rot" />
            </movingTool>
            <movingTool node="rightArm" playSound="true" wheelIndices="4">
                <dependentPart node="rightArmSpring" />
                <dependentPart node="pto04Rot" />
            </movingTool>
            <movingTool node="leftLockArm">
                <dependentPart node="leftLockArmSpring" />
            </movingTool>
            <movingTool node="rightLockArm">
                <dependentPart node="rightLockArmSpring" />
            </movingTool>
        </movingTools>

        <movingParts>
             <movingPart node="leftArmSpring" referencePoint="leftArmSpringRef" referenceFrame="leftArmSpringRef" scaleZ="true"/>
             <movingPart node="rightArmSpring" referencePoint="rightArmSpringRef" referenceFrame="rightArmSpringRef" scaleZ="true"/>
             <movingPart node="pto01Rot" referencePoint="pto01RotRef" referenceFrame="pto01RotRef"/>
             <movingPart node="pto04Rot" referencePoint="pto04RotRef" referenceFrame="pto04RotRef"/>
             <movingPart node="leftLockArmSpring" referencePoint="leftLockArmSpringRef" referenceFrame="leftLockArmSpringRef" scaleZ="true"/>
             <movingPart node="rightLockArmSpring" referencePoint="rightLockArmSpringRef" referenceFrame="rightLockArmSpringRef" scaleZ="true"/>
        </movingParts>
    </cylindered>

    <tedder fillTypeConverter="TEDDER">
        <animationNodes>
            <animationNode node="rotor01" rotAxis="3" rotSpeed="-900" turnOnFadeTime="1" turnOffFadeTime="3"/>
            <animationNode node="rotor02" rotAxis="3" rotSpeed="900" turnOnFadeTime="1" turnOffFadeTime="3"/>
            <animationNode node="rotor03" rotAxis="3" rotSpeed="-900" turnOnFadeTime="1" turnOffFadeTime="3"/>
            <animationNode node="rotor04" rotAxis="3" rotSpeed="900" turnOnFadeTime="1" turnOffFadeTime="3"/>
            <animationNode node="pto01" rotAxis="3" rotSpeed="900" turnOnFadeTime="1" turnOffFadeTime="3"/>
            <animationNode node="pto02" rotAxis="1" rotSpeed="900" turnOnFadeTime="1" turnOffFadeTime="3"/>
            <animationNode node="pto03" rotAxis="1" rotSpeed="900" turnOnFadeTime="1" turnOffFadeTime="3"/>
            <animationNode node="pto04" rotAxis="3" rotSpeed="-900" turnOnFadeTime="1" turnOffFadeTime="3"/>
            <animationNode node="pto05" rotAxis="1" rotSpeed="900" turnOnFadeTime="1" turnOffFadeTime="3"/>
            <animationNode node="pto06" rotAxis="1" rotSpeed="900" turnOnFadeTime="1" turnOffFadeTime="3"/>
        </animationNodes>

        <effects>
            <effect workAreaIndex="1">
                <effectNode effectClass="TypedMotionPathEffect" effectType="TEDDER" linkNode="particleLeft01">
                    <motionPathEffect textureFilename="$data/effects/tedder/arrays/sharedTedderArrayLeft.dds" numRows="4" rowLength="28" minFade="0.03"/>
                </effectNode>
                <effectNode effectClass="TypedMotionPathEffect" effectType="TEDDER" linkNode="particleRight01">
                    <motionPathEffect textureFilename="$data/effects/tedder/arrays/sharedTedderArrayRight.dds" numRows="4" rowLength="28" minFade="0.03"/>
                </effectNode>
                <effectNode effectClass="TypedMotionPathEffect" effectType="TEDDER" linkNode="particleLeft02">
                    <motionPathEffect textureFilename="$data/effects/tedder/arrays/sharedTedderArrayLeft.dds" numRows="4" rowLength="28" minFade="0.03"/>
                </effectNode>
                <effectNode effectClass="TypedMotionPathEffect" effectType="TEDDER" linkNode="particleRight02">
                    <motionPathEffect textureFilename="$data/effects/tedder/arrays/sharedTedderArrayRight.dds" numRows="4" rowLength="28" minFade="0.03"/>
                </effectNode>
            </effect>
        </effects>
    </tedder>

    <turnOnVehicle turnOffIfNotAllowed="true">
        <sounds>
            <work template="DEFAULT_TEDDER"   linkNode="alpinHit44_main_component1" fadeIn="0.1" fadeOut="2.5"/>
        </sounds>
    </turnOnVehicle>

    <ai>
        <needsLowering value="true" />
        <areaMarkers leftNode="startIndex" rightNode="widthIndex" backNode="heightIndex" />
        <collisionTrigger node="aiCollisionNode" width="4.5" height="1.8"/>
        <agentAttachment width="2.5" height="2.0" length="1.8" lengthOffset="0"/>
    </ai>

    <foliageBending>
        <bendingNode minX="-1.1" maxX="1.2" minZ="-0.6" maxZ="0.5" yOffset="0.2" />
        <bendingNode minX="-1.5" maxX="-0.35" minZ="-0.6" maxZ="0.5" yOffset="-0.5" node="leftArm" />
        <bendingNode minX="0.35" maxX="1.5" minZ="-0.4" maxZ="0.5" yOffset="-0.5" node="rightArm" />
    </foliageBending>

    <baseMaterial>
        <material name="alpinHit44_mat" baseNode="alpinHit44_vis">
            <shaderParameter name="colorMat0" value="POETTINGER_RED1"/>
            <shaderParameter name="colorMat1" value="POETTINGER_WHITE1"/>
            <shaderParameter name="colorMat2" value="POETTINGER_YELLOW"/>
        </material>
    </baseMaterial>

    <wearable wearDuration="480" workMultiplier="5" fieldMultiplier="2"/>
    <washable dirtDuration="90" washDuration="1" workMultiplier="4" fieldMultiplier="2"/>

    <i3dMappings>
        <i3dMapping id="alpinHit44_main_component1" node="0>" />
        <i3dMapping id="alpinHit44_vis" node="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" node="0>0|0|4|0" />
        <i3dMapping id="supportArm2" node="0>0|0|5|0" />
        <i3dMapping id="electric" node="0>0|0|6|0" />
        <i3dMapping id="electric_detached" node="0>0|0|6|0|0" />
        <i3dMapping id="electric_connector" node="0>0|0|6|0|0|0" />
        <i3dMapping id="wheel02" node="0>0|1|0" />
        <i3dMapping id="wheel03" node="0>0|1|1" />
        <i3dMapping id="backlightGlass_static" node="0>0|2|0|1" />
        <i3dMapping id="turnLightLeftGlass_static" node="0>0|2|0|3" />
        <i3dMapping id="turnLightRightGlass_static" node="0>0|2|0|5" />
        <i3dMapping id="backLightsHigh1" node="0>0|2|1|0" />
        <i3dMapping id="turnLightLeftBack" node="0>0|2|2|0" />
        <i3dMapping id="turnLightRightBack" node="0>0|2|2|1" />
        <i3dMapping id="leftArm" node="0>0|3|0|0" />
        <i3dMapping id="rotor01" node="0>0|3|0|0|0|0" />
        <i3dMapping id="wheel01" node="0>0|3|0|0|1" />
        <i3dMapping id="leftArmSpringRef" node="0>0|3|0|0|4" />
        <i3dMapping id="pto02" node="0>0|3|0|0|5" />
        <i3dMapping id="pto01RotRef" node="0>0|3|0|0|6" />
        <i3dMapping id="rightArm" node="0>0|3|1|0" />
        <i3dMapping id="rotor04" node="0>0|3|1|0|0|0" />
        <i3dMapping id="wheel04" node="0>0|3|1|0|1" />
        <i3dMapping id="rightArmSpringRef" node="0>0|3|1|0|4" />
        <i3dMapping id="pto06" node="0>0|3|1|0|5" />
        <i3dMapping id="pto04RotRef" node="0>0|3|1|0|6" />
        <i3dMapping id="rotor02" node="0>0|3|2|0" />
        <i3dMapping id="rotor03" node="0>0|3|3|0" />
        <i3dMapping id="rightArmSpring" node="0>0|3|4" />
        <i3dMapping id="leftArmSpring" node="0>0|3|5" />
        <i3dMapping id="pto01Rot" node="0>0|3|6" />
        <i3dMapping id="pto01" node="0>0|3|6|0" />
        <i3dMapping id="pto03" node="0>0|3|7" />
        <i3dMapping id="pto04Rot" node="0>0|3|8" />
        <i3dMapping id="pto04" node="0>0|3|8|0" />
        <i3dMapping id="pto05" node="0>0|3|9" />
        <i3dMapping id="leftLockArm" node="0>0|3|10|0" />
        <i3dMapping id="leftLockArmSpring" node="0>0|3|10|0|0" />
        <i3dMapping id="leftLockArmSpringRef" node="0>0|3|10|1" />
        <i3dMapping id="rightLockArm" node="0>0|3|11|0" />
        <i3dMapping id="rightLockArmSpring" node="0>0|3|11|0|0" />
        <i3dMapping id="rightLockArmSpringRef" node="0>0|3|11|1" />
        <i3dMapping id="workAreaStart" node="0>0|4|0" />
        <i3dMapping id="workAreaWidth" node="0>0|4|1" />
        <i3dMapping id="workAreatHeight" node="0>0|4|2" />
        <i3dMapping id="dropAreaStart" node="0>0|4|3" />
        <i3dMapping id="dropAreaWidth" node="0>0|4|4" />
        <i3dMapping id="dropAreaHeight" node="0>0|4|5" />
        <i3dMapping id="groundReferenceNode" node="0>0|4|6" />
        <i3dMapping id="startIndex" node="0>0|5|0" />
        <i3dMapping id="widthIndex" node="0>0|5|1" />
        <i3dMapping id="heightIndex" node="0>0|5|2" />
        <i3dMapping id="aiCollisionNode" node="0>0|5|3" />
        <i3dMapping id="emitterShape" node="0>0|6|0" />
        <i3dMapping id="particleRight01" node="0>0|6|1" />
        <i3dMapping id="particleLeft01" node="0>0|6|2" />
        <i3dMapping id="particleRight02" node="0>0|6|3" />
        <i3dMapping id="particleLeft02" node="0>0|6|4" />
    </i3dMappings>
</vehicle>
