﻿<?xml version="1.0" encoding="utf-8" standalone="no" ?>
<vehicle type="mower" 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>GMD 4411</name>
        <specs>
            <neededPower>80</neededPower>
            <workingWidth>4.35</workingWidth>
            <combination xmlFilename="$data/vehicles/kuhn/gmd3123F/gmd3123F.xml"/>
            <combination filterCategory="weights" filterSpec="weight" filterSpecMin="600" filterSpecMax="600"/>
        </specs>
        <functions>
            <function>$l10n_function_mower</function>
        </functions>
        <image>$data/vehicles/kuhn/gmd4411/store_gmd4411.png</image>
        <price>18000</price>
        <lifetime>600</lifetime>
        <rotation>0</rotation>
        <brand>KUHN</brand>
        <category>mowers</category>
        <shopTranslationOffset>0 -0.095 0</shopTranslationOffset>
        <shopRotationOffset>-9.217 0 -0.95</shopRotationOffset>
        <vertexBufferMemoryUsage>905728</vertexBufferMemoryUsage>
        <indexBufferMemoryUsage>160768</indexBufferMemoryUsage>
        <textureMemoryUsage>851968</textureMemoryUsage>
        <instanceVertexBufferMemoryUsage>0</instanceVertexBufferMemoryUsage>
        <instanceIndexBufferMemoryUsage>0</instanceIndexBufferMemoryUsage>
        <audioMemoryUsage>0</audioMemoryUsage>
    </storeData>

    <base>
        <typeDesc>$l10n_typeDesc_mower</typeDesc>
        <filename>$data/vehicles/kuhn/gmd4411/gmd4411.i3d</filename>
        <size width="2.5" widthOffset="-0.3" length="7" lengthOffset="-2.4" />
        <speedLimit value="22" />
        <components>
            <component centerOfMass="-0.2 0.7 0" solverIterationCount="10" mass="758" />
            <component centerOfMass="0.1 0.4 0" solverIterationCount="10" mass="361" />
            <joint component1="1" component2="2" node="componentJoint01" rotLimit="0 0 0" transLimit="0 0 0" />
        </components>
        <schemaOverlay attacherJointPosition="0 0" name="IMPLEMENT" />
        <mapHotspot type="TOOL" />
    </base>

    <powerConsumer ptoRpm="470" neededMinPtoPower="25" neededMaxPtoPower="30"/>

    <lights>
        <sharedLight linkNode="backlight"   filename="$data/shared/assets/lights/lizard/rearLight21Red.xml" />
        <sharedLight linkNode="reflector01" filename="$data/shared/assets/reflectors/lizard/yellowRound_01.xml" />
        <sharedLight linkNode="reflector02" filename="$data/shared/assets/reflectors/lizard/yellowRound_01.xml" />

        <realLights>
            <high>
                <light node="backLightsHigh" lightTypes="0" />
                <brakeLight node="backLightsHigh" />
            </high>
        </realLights>
    </lights>

    <groundReferenceNodes>
        <groundReferenceNode node="groundReferenceNode" threshold="0.4" />
    </groundReferenceNodes>

    <workAreas>
        <workArea type="mower" functionName="processMowerArea" disableBackwards="false" >
            <area startNode="workAreaStart" widthNode="workAreaWidth" heightNode="workAreaHeight" />
            <groundReferenceNode index="1" />
            <folding minLimit="0" maxLimit="0.1" />
            <mower dropWindrow="true" dropAreaIndex="2" />
            <onlyActiveWhenLowered value="true"/>
        </workArea>

        <workArea type="auxiliary" >
            <area startNode="dropAreaStart" widthNode="dropAreaWidth" heightNode="dropAreaHeight" />
        </workArea>
    </workAreas>

    <attachable>
        <inputAttacherJoints>
            <inputAttacherJoint node="attacherJoint" jointType="implement" topReferenceNode="topReferenceNode" upperRotationOffset="0" lowerTransLimitScale="0 0 0" lowerRotLimitScale="0 0 0" allowsLowering="false" >
                <distanceToGround lower="0.8" upper="0.8" />
            </inputAttacherJoint>
        </inputAttacherJoints>
        <support animationName="moveSupport" />
    </attachable>

    <connectionHoses>
        <hose inputAttacherJointIndices="1" type="hydraulicIn"  node="hydraulicIn01" adapterNode="hydraulicIn01_detached"  length="1.5" diameter="0.015" straighteningFactor="0.5">
            <objectChange node="hydraulicIn01_detached" visibilityActive="false" visibilityInactive="true" />
        </hose>
        <hose inputAttacherJointIndices="1" type="hydraulicOut" node="hydraulicOut01" adapterNode="hydraulicOut01_detached" length="1.5" diameter="0.015" straighteningFactor="0.5">
            <objectChange node="hydraulicOut01_detached" visibilityActive="false" visibilityInactive="true" />
        </hose>
        <hose inputAttacherJointIndices="1" type="hydraulicIn"  node="hydraulicIn02" adapterNode="hydraulicIn02_detached" length="1.5" diameter="0.015" straighteningFactor="0.5">
            <objectChange node="hydraulicIn02_detached" visibilityActive="false" visibilityInactive="true" />
        </hose>
    </connectionHoses>

    <powerTakeOffs>
        <input inputAttacherJointIndices="1" detachNode="ptoDetachNode" inputNode="ptoInputNode" aboveAttacher="true" color="SHARED_BLACK1" decalColor="WALTERSCHEID_YELLOW1"/>
        <local startNode="ptoLocalOut" endNode="ptoLocalIn" filename="$data/shared/assets/powerTakeOffs/walterscheidW.xml" color="SHARED_DA_METAL_BLACK" decalColor="SHARED_DA_METAL_BLACK"/>
    </powerTakeOffs>

    <foldable>
        <foldingConfigurations>
            <foldingConfiguration>
                <foldingParts foldMiddleAnimTime="0.14" startAnimTime="1" turnOnFoldMaxLimit="0.25" turnOnFoldMinLimit="0" turnOnFoldDirection="-1" detachingMinLimit="0.95" detachingMaxLimit="1">
                    <foldingPart animationName="folding" speedScale="0.6" />
                </foldingParts>
            </foldingConfiguration>
        </foldingConfigurations>
    </foldable>

    <animations>
        <animation name="folding">
            <!-- lowering -->
            <part componentJointIndex="1" startTime="0.0" endTime="0.7" startTransLimit="0 0.4 0" startRotLimit="0 0 9" endTransLimit="0 0 0" endRotLimit="0 0 0" tangentType="spline"/>
            <part node="jointRot01"       startTime="0.0" endTime="0.7" startRot="0 0 0"   endRot="0 0 -10" tangentType="spline"/>
            <!-- folding -->
            <part node="armYRot"          startTime="0.7" endTime="5.0" startRot="0 0 0"   endRot="0 -90 0" tangentType="spline"/>
            <part node="jointRot01"       startTime="0.7" endTime="5.0" startRot="0 0 -10"   endRot="0 0 -15" tangentType="spline"/>

            <sound template="defaultHydraulicSound" startTime="0.71" endTime="4.99" volumeScale="1.4" pitchScale="0.8"/>
            <sound template="defaultHydraulicSound" startTime="0.2"  endTime="0.69" volumeScale="1.4" pitchScale="0.6"/>
            <sound template="sheetImp02"            startTime="4.99"                volumeScale="1.3" pitchScale="0.7"/>
            <sound template="clackVar6"             startTime="0.71" direction="-1" volumeScale="0.9" pitchScale="0.8"/>
            <sound template="sheetImp05"            startTime="0.71" direction="-1" volumeScale="1.2" pitchScale="0.5"/>
            <sound template="sheetImp01"            startTime="0.2"  direction="-1" volumeScale="1"   pitchScale="0.8"/>
            <sound template="sheetImp02"            startTime="0.2"  direction="-1" volumeScale="2"   pitchScale="0.7"/>
            <sound template="sheetImp03"            startTime="0.1"  direction="-1" volumeScale="1.4" pitchScale="0.7"/>
            <sound template="sheetImp01"            startTime="0.6"  direction="1"  volumeScale="0.5" pitchScale="0.7"/>
            <sound template="clackVar4"             startTime="0.6"  direction="1"  volumeScale="1"   pitchScale="1.3"/>
            <sound template="sheetImp02"            startTime="0.6"  direction="1"  volumeScale="1.7" pitchScale="0.7"/>
            <sound template="sheetImp05"            startTime="0.5"  direction="1"  volumeScale="0.6" pitchScale="0.8"/>
            <sound template="clackVar6"             startTime="0.5"  direction="1"  volumeScale="0.3" pitchScale="0.8"/>
        </animation>
        <animation name="moveSupport">
            <part node="supportCol"       startTime="0" endTime="0.6" startTrans="0 0.425 0" endTrans="0 0 0"/>
            <part node="supportArm"       startTime="0" endTime="0.6" startRot="0 0 0" endRot="0 0 -105"/>
            <part node="supportArm2"      startTime="0" endTime="0.6" startRot="0 0 0" endRot="0 0 -122.815"/>
            <part node="jointRot01"       startTime="0" endTime="0.6" startRot="0 0 -15" endRot="0 0 -5" />
            <part node="componentJoint01" startTime="0" endTime="0.6" startRot="0 0 6" endRot="0 0 3" />

            <sound template="clackVar4" startTime="0.01" direction="-1" volumeScale="1.1" pitchScale="1.7" linkNode="attacherJoint"/>
            <sound template="clackVar6" startTime="0.59" direction="-1" volumeScale="1.3" pitchScale="1.2" linkNode="attacherJoint"/>
        </animation>
    </animations>

    <cylindered>
        <movingTools>
            <movingTool node="armYRot" playSound="true">
                <componentJoint index="1" anchorActor="0" />
            </movingTool>
            <movingTool node="jointRot01" playSound="true">
                <componentJoint index="1" anchorActor="0" />
            </movingTool>
            <movingTool node="jointRot02" playSound="true">
                <componentJoint index="1" anchorActor="0" />
            </movingTool>
        </movingTools>

        <movingParts>
            <!-- arm -->
            <movingPart node="arm" referencePoint="armRefPoint" referenceFrame="armRefPoint" isActiveDirty="true" maxUpdateDistance="300">
                <dependentPart node="mower" />
                <dependentPart node="hydraulicArm2" />
                <dependentPart node="hydraulicArm1" />
                <dependentPart node="hydraulicArmRot" />
                <powerTakeOffs localIndices="1" />
            </movingPart>

            <!-- mower -->
            <movingPart node="mower" referenceFrame="gmd4411_mower_component2" >
                <dependentPart node="hydraulicMower" />
            </movingPart>

            <!-- hydraulic -->
            <movingPart node="hydraulicArm2" referencePoint="hydraulicArm2Ref" referenceFrame="gmd4411_main_component1">
                <translatingPart node="hydraulicArm2Punch" />
            </movingPart>
            <movingPart node="hydraulicArm1" referencePoint="hydraulicArm1Ref" referenceFrame="gmd4411_main_component1">
                <translatingPart node="hydraulicArm1Punch" />
            </movingPart>
            <movingPart node="hydraulicArmRot" referencePoint="hydraulicArmRotRef" referenceFrame="gmd4411_main_component1">
                <translatingPart node="hydraulicArmRotPunch" />
            </movingPart>
            <movingPart node="hydraulicMower" referencePoint="hydraulicMowerRef" referenceFrame="hydraulicMowerRef">
                <translatingPart node="hydraulicMowerPunch" />
            </movingPart>
        </movingParts>
    </cylindered>

    <mower fruitTypeConverter="MOWER">
        <animationNodes>
            <animationNode node="cutter1"  rotAxis="2" rotSpeed="-3000" turnOnFadeTime="3" turnOffFadeTime="6" />
            <animationNode node="cutter2"  rotAxis="2" rotSpeed="3000"  turnOnFadeTime="3" turnOffFadeTime="6" />
            <animationNode node="cutter3"  rotAxis="2" rotSpeed="-3000" turnOnFadeTime="3" turnOffFadeTime="6" />
            <animationNode node="cutter4"  rotAxis="2" rotSpeed="3000"  turnOnFadeTime="3" turnOffFadeTime="6" />
            <animationNode node="cutter5"  rotAxis="2" rotSpeed="-3000" turnOnFadeTime="3" turnOffFadeTime="6" />
            <animationNode node="cutter6"  rotAxis="2" rotSpeed="3000"  turnOnFadeTime="3" turnOffFadeTime="6" />
            <animationNode node="cutter7"  rotAxis="2" rotSpeed="-3000" turnOnFadeTime="3" turnOffFadeTime="6" />
            <animationNode node="cutter8"  rotAxis="2" rotSpeed="3000"  turnOnFadeTime="3" turnOffFadeTime="6" />
            <animationNode node="cutter9"  rotAxis="2" rotSpeed="-3000" turnOnFadeTime="3" turnOffFadeTime="6" />
            <animationNode node="cutter10" rotAxis="2" rotSpeed="3000"  turnOnFadeTime="3" turnOffFadeTime="6" />
        </animationNodes>

        <dropEffects>
            <dropEffect workAreaIndex="1" dropAreaIndex="2">
                <effectNode effectClass="TypedMotionPathEffect" effectType="MOWER" linkNode="mowerEffectNode">
                    <motionPathEffect textureFilename="$data/vehicles/kuhn/gmd4411/mowerEffectArray.dds" numRows="9" rowLength="11" minFade="0.15" />
                </effectNode>
                <effectNode effectNode="smokeEmitter" effectClass="ParticleEffect" particleType="smoke" materialType="smokeParticle" worldSpace="false" emitCountScale="0.25"/>
            </dropEffect>
        </dropEffects>
        <sounds>
            <cut template="grassCut" linkNode="gmd4411_main_component1" volumeScale="0.7"/>
        </sounds>
    </mower>

    <windBending>
        <windBendingNodes>
            <windBendingNode node="cover"   maxBending="0.1" maxBendingSpeed="20" speedReferenceNode="arm"/>
        </windBendingNodes>
    </windBending>

    <turnOnVehicle turnOffIfNotAllowed="true">
        <sounds>
            <start template="DEFAULT_MOWER_START" linkNode="gmd4411_mower_component2" />
            <stop template="DEFAULT_MOWER_STOP"   linkNode="gmd4411_mower_component2" />
            <work template="DEFAULT_MOWER_WORK"   linkNode="gmd4411_mower_component2" />
        </sounds>
    </turnOnVehicle>

    <ai>
        <needsLowering value="true" />
        <areaMarkers leftNode="aiMarkerLeft" rightNode="aiMarkerRight" backNode="aiMarkerBack" />
        <collisionTrigger node="aiCollisionNode" width="5.0" height="1.5"/>
        <agentAttachment width="2" height="1.7" length="6" lengthOffset="-2.5"/>
    </ai>

    <foliageBending>
        <bendingNode minX="-2.5" maxX="2.5" minZ="-0.9" maxZ="0.9" yOffset="0" node="1>" />
    </foliageBending>

    <baseMaterial>
        <material name="gmd4411_mat" baseNode="attacherBlock">
            <shaderParameter name="colorMat0" value="KUHN_RED1"/>
            <shaderParameter name="colorMat1" value="KUHN_WHITE1"/>
        </material>
    </baseMaterial>

    <wearable wearDuration="480" workMultiplier="5" fieldMultiplier="2"/>
    <washable dirtDuration="90" washDuration="1" workMultiplier="4" fieldMultiplier="2"/>

    <i3dMappings>
        <i3dMapping id="gmd4411_main_component1" node="0>" />
        <i3dMapping id="attacherBlock" node="0>0" />
        <i3dMapping id="attacherJoint" node="0>0|0|0" />
        <i3dMapping id="topReferenceNode" node="0>0|0|1" />
        <i3dMapping id="ptoInputNode" node="0>0|0|2|0" />
        <i3dMapping id="ptoDetachNode" node="0>0|0|2|1" />
        <i3dMapping id="ptoLocalOut" node="0>0|0|2|2" />
        <i3dMapping id="hydraulicIn01" node="0>0|0|3|0" />
        <i3dMapping id="hydraulicOut01" node="0>0|0|3|1" />
        <i3dMapping id="hydraulicIn02" node="0>0|0|3|2" />
        <i3dMapping id="hydraulicIn02_detached" node="0>0|0|3|3" />
        <i3dMapping id="hydraulicOut01_detached" node="0>0|0|3|4" />
        <i3dMapping id="hydraulicIn01_detached" node="0>0|0|3|5" />
        <i3dMapping id="supportArm" node="0>0|1|0" />
        <i3dMapping id="supportArm2" node="0>0|1|1" />
        <i3dMapping id="supportCol" node="0>0|1|2" />
        <i3dMapping id="armYRot" node="0>0|2|0" />
        <i3dMapping id="jointRot01" node="0>0|2|0|0" />
        <i3dMapping id="jointRot02" node="0>0|2|0|0|0" />
        <i3dMapping id="componentJoint01" node="0>0|2|0|0|0|0" />
        <i3dMapping id="arm" node="0>0|2|0|1" />
        <i3dMapping id="mower" node="0>0|2|0|1|0" />
        <i3dMapping id="hydraulicMowerRef" node="0>0|2|0|1|0|0" />
        <i3dMapping id="cutter1" node="0>0|2|0|1|0|1|0" />
        <i3dMapping id="cutter2" node="0>0|2|0|1|0|1|1" />
        <i3dMapping id="cutter3" node="0>0|2|0|1|0|1|2" />
        <i3dMapping id="cutter4" node="0>0|2|0|1|0|1|3" />
        <i3dMapping id="cutter5" node="0>0|2|0|1|0|1|4" />
        <i3dMapping id="cutter6" node="0>0|2|0|1|0|1|5" />
        <i3dMapping id="cutter7" node="0>0|2|0|1|0|1|6" />
        <i3dMapping id="cutter8" node="0>0|2|0|1|0|1|7" />
        <i3dMapping id="cutter9" node="0>0|2|0|1|0|1|8" />
        <i3dMapping id="cutter10" node="0>0|2|0|1|0|1|9" />
        <i3dMapping id="smokeEmitter" node="0>0|2|0|1|0|2|0" />
        <i3dMapping id="mowerEffectNode" node="0>0|2|0|1|0|2|1" />
        <i3dMapping id="backlight" node="0>0|2|0|1|0|3|0" />
        <i3dMapping id="reflector01" node="0>0|2|0|1|0|3|1" />
        <i3dMapping id="reflector02" node="0>0|2|0|1|0|3|2" />
        <i3dMapping id="backLightsHigh" node="0>0|2|0|1|0|3|3" />
        <i3dMapping id="ptoLocalIn" node="0>0|2|0|1|0|4" />
        <i3dMapping id="cover" node="0>0|2|0|1|0|6" />
        <i3dMapping id="hydraulicMower" node="0>0|2|0|1|1" />
        <i3dMapping id="hydraulicMowerPunch" node="0>0|2|0|1|1|0" />
        <i3dMapping id="hydraulicArm1" node="0>0|2|0|1|2" />
        <i3dMapping id="hydraulicArm1Punch" node="0>0|2|0|1|2|0" />
        <i3dMapping id="hydraulicArm2" node="0>0|2|0|1|3" />
        <i3dMapping id="hydraulicArm2Punch" node="0>0|2|0|1|3|0" />
        <i3dMapping id="hydraulicArmRotRef" node="0>0|2|0|2" />
        <i3dMapping id="hydraulicArm1Ref" node="0>0|3" />
        <i3dMapping id="hydraulicArm2Ref" node="0>0|4" />
        <i3dMapping id="hydraulicArmRot" node="0>0|5" />
        <i3dMapping id="hydraulicArmRotPunch" node="0>0|5|0" />
        <i3dMapping id="gmd4411_mower_component2" node="1>" />
        <i3dMapping id="armRefPoint" node="1>0" />
        <i3dMapping id="groundReferenceNode" node="1>1" />
        <i3dMapping id="workAreaStart" node="1>2|0|0" />
        <i3dMapping id="workAreaWidth" node="1>2|0|1" />
        <i3dMapping id="workAreaHeight" node="1>2|0|2" />
        <i3dMapping id="dropAreaStart" node="1>2|1|0" />
        <i3dMapping id="dropAreaWidth" node="1>2|1|1" />
        <i3dMapping id="dropAreaHeight" node="1>2|1|2" />
        <i3dMapping id="aiMarkerLeft" node="1>3|0|0" />
        <i3dMapping id="aiMarkerRight" node="1>3|0|1" />
        <i3dMapping id="aiMarkerBack" node="1>3|0|2" />
        <i3dMapping id="aiCollisionNode" node="1>3|1" />
    </i3dMappings>
</vehicle>
