﻿<?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 3123 F</name>
        <specs>
            <neededPower>60</neededPower>
            <workingWidth>3.1</workingWidth>
            <combination xmlFilename="$data/vehicles/kuhn/gmd8730/gmd8730.xml"/>
        </specs>
        <functions>
            <function>$l10n_function_mower</function>
        </functions>
        <image>$data/vehicles/kuhn/gmd3123F/store_gmd3123F.png</image>
        <price>9500</price>
        <lifetime>600</lifetime>
        <rotation>0</rotation>
        <brand>KUHN</brand>
        <category>mowers</category>
        <shopFoldingState>1</shopFoldingState>
        <shopTranslationOffset>0 -0.017 0</shopTranslationOffset>
        <shopRotationOffset>3.905 0 0</shopRotationOffset>
        <vertexBufferMemoryUsage>1455872</vertexBufferMemoryUsage>
        <indexBufferMemoryUsage>256000</indexBufferMemoryUsage>
        <textureMemoryUsage>1638400</textureMemoryUsage>
        <instanceVertexBufferMemoryUsage>0</instanceVertexBufferMemoryUsage>
        <instanceIndexBufferMemoryUsage>0</instanceIndexBufferMemoryUsage>
        <audioMemoryUsage>0</audioMemoryUsage>
    </storeData>

    <base>
        <typeDesc>$l10n_typeDesc_mower</typeDesc>
        <filename>$data/vehicles/kuhn/gmd3123F/gmd3123F.i3d</filename>
        <size width="4.2" length="2" lengthOffset="0.1" />
        <speedLimit value="22" />
        <components>
            <component centerOfMass="0 0.2 0" solverIterationCount="10" mass="375" />
            <component centerOfMass="0 -0.447 0" solverIterationCount="10" mass="370" />
            <joint component1="1" component2="2" node="componentJoint" rotLimit="0 0 0" transLimit="0 0 0" />
        </components>
        <schemaOverlay attacherJointPosition="0 0" name="IMPLEMENT" />
        <mapHotspot type="TOOL" />
    </base>

    <speedRotatingParts>
        <speedRotatingPart node="disc01" groundReferenceNodeIndex="1" rotateIfTurnedOn="true" workAreaIndex="1"/>
        <speedRotatingPart node="disc02" groundReferenceNodeIndex="1" rotateIfTurnedOn="true" workAreaIndex="1"/>
    </speedRotatingParts>

    <powerConsumer ptoRpm="470" neededMinPtoPower="15" neededMaxPtoPower="15"/>

    <groundReferenceNodes>
        <groundReferenceNode node="groundRefNode" threshold="0.1" />
    </groundReferenceNodes>

    <workAreas>
        <workArea type="mower" functionName="processMowerArea" disableBackwards="false" >
            <area startNode="areaStart" widthNode="areaWidth" heightNode="areaHeight" />
            <groundReferenceNode index="1" />
            <folding minLimit="0" maxLimit="0.1" />
            <mower dropWindrow="true" dropAreaIndex="2" />
            <onlyActiveWhenLowered value="true"/>
        </workArea>

        <workArea type="auxiliary" >
            <area startNode="areaDropStart" widthNode="areaDropWidth" heightNode="areaDropHeight" />
        </workArea>
    </workAreas>

    <attachable>
        <inputAttacherJoints>
            <inputAttacherJoint node="attacherJoint" jointType="implement" topReferenceNode="topReferenceNode" lowerRotationOffset="0" upperRotationOffset="5" lowerRotLimitScale="0 0 0" lowerTransLimitScale="0 1 0">
                <distanceToGround lower="0.5" upper="1.0" />
            </inputAttacherJoint>
        </inputAttacherJoints>
        <support animationName="moveSupport" />
        <lowerAnimation name="lowerAnimation" speed="1" />
    </attachable>

    <lights>
        <defaultLights>
            <defaultLight shaderNode="defaultLightStatic"     lightTypes="0" />
        </defaultLights>
    </lights>

    <connectionHoses>
        <hose inputAttacherJointIndices="1" type="hydraulicIn"  node="hydraulicIn01"  length="0.8" diameter="0.016" straighteningFactor="0.5" minCenterPointOffset="0.15 0 0" maxCenterPointOffset="0.15 0 0">
           <objectChange node="hydraulicIn01_detached" visibilityActive="false" visibilityInactive="true"/>
        </hose>
        <hose inputAttacherJointIndices="1" type="hydraulicOut" node="hydraulicOut01" length="0.8" diameter="0.016" straighteningFactor="0.5" minCenterPointOffset="-0.15 0 0" maxCenterPointOffset="-0.15 0 0">
           <objectChange node="hydraulicOut01_detached" visibilityActive="false" visibilityInactive="true"/>
        </hose>
        <hose inputAttacherJointIndices="1" type="electric" node="electric" adapterNode="electric_detached" length="0.8" diameter="0.007" straighteningFactor="0.5">
            <objectChange node="electric_detached" visibilityActive="false" visibilityInactive="true"/>
        </hose>
    </connectionHoses>

    <dynamicallyLoadedParts>
        <dynamicallyLoadedPart node="1|0" linkNode="hydraulicIn01_connector"  filename="$data/shared/connectionHoses/connectors.i3d" />
        <dynamicallyLoadedPart node="1|0" linkNode="hydraulicOut01_connector" filename="$data/shared/connectionHoses/connectors.i3d" />
    </dynamicallyLoadedParts>

    <powerTakeOffs>
        <input inputAttacherJointIndices="1" inputNode="ptoInputNode" aboveAttacher="true" color="SHARED_BLACK2" decalColor="WALTERSCHEID_YELLOW1"/>
    </powerTakeOffs>

    <foldable>
        <foldingConfigurations>
            <foldingConfiguration>
                <foldingParts startMoveDirection="1" turnOnFoldMaxLimit="0.1" turnOnFoldMinLimit="0" >
                    <foldingPart animationName="folding" speedScale="1" />
                </foldingParts>
            </foldingConfiguration>
        </foldingConfigurations>
    </foldable>

    <animations>
        <animation name="lowerAnimation">
            <part componentJointIndex="1" startTime="0" endTime="1.0" startRotLimit="0 0 0" endRotLimit="0 0 12" />

            <sound template="sheetImp01"  startTime="0.99" direction="1"  volumeScale="0.8" pitchScale="0.6"/>
            <sound template="sheetImp02"  startTime="0.99" direction="1"  volumeScale="1.5" pitchScale="0.7"/>
            <sound template="sheetImp02"  startTime="0.01" direction="-1" volumeScale="1.6" pitchScale="0.6"/>
        </animation>
        <animation name="moveSupport">
            <part componentJointIndex="1" startTime="0" endTime="0.5" startRotLimit="0 0 0" endRotLimit="0 0 0" />

            <sound template="clackVar6" startTime="0.09" direction="-1" volumeScale="1.1" pitchScale="1.5" linkNode="attacherJoint"/>
        </animation>

        <animation name="folding">
            <part node="flapLeft"   startTime="0" endTime="2" startRot="0 0 0" endRot="0 0 -126" tangentType="spline"/>
            <part node="flapRight"  startTime="2" endTime="4" startRot="0 0 0" endRot="0 0 -126" tangentType="spline"/>
            <part node="colPart01"  startTime="0" endTime="2" startRot="0 0 0" endRot="0 0 -126" tangentType="spline"/>
            <part node="colPart02"  startTime="2" endTime="4" startRot="0 0 0" endRot="0 0 -126" tangentType="spline"/>
            <part node="flapLeftJoint02"   startTime="0" endTime="2" startRot="169.784 0 -180" endRot="170 4.2 -155" startTrans="0 -0.66 0.147" endTrans="0.416 -0.096 0.306" tangentType="spline"/>
            <part node="flapLeftJoint03"   startTime="0" endTime="2" startRot="169.784 0 -180" endRot="170 4.2 -155" startTrans="0 -0.781 0.814" endTrans="0.439 -0.111 0.833" tangentType="spline"/>
            <part node="flapRightJoint02"   startTime="2" endTime="4" startRot="-10.216 0 0" endRot="0 0 35" startTrans="0 -0.781 -0.362" endTrans="0.421 -0.1 -0.335" tangentType="spline"/>
            <part node="flapRightJoint03"   startTime="2" endTime="4" startRot="-10.216 0 0" endRot="0 0 35" startTrans="0 -0.66 0.306" endTrans="0.405 -0.08 0.146" tangentType="spline"/>

            <sound template="defaultHydraulicSound" startTime="0.01" endTime="1.99" volumeScale="1.3" pitchScale="1.5"/>
            <sound template="defaultHydraulicSound" startTime="2"    endTime="3.99" volumeScale="1.3" pitchScale="1.3"/>
            <sound template="clackVar6"             startTime="0.01" direction="-1" volumeScale="0.6" pitchScale="0.7"/>
            <sound template="sheetImp01"            startTime="0.01" direction="-1" volumeScale="0.7" pitchScale="0.7"/>
            <sound template="sheetImp02"            startTime="2"                   volumeScale="1.4" pitchScale="1.2"/>
            <sound template="clackVar6"             startTime="4"    direction="1"  volumeScale="0.6" pitchScale="0.8"/>
            <sound template="sheetImp05"            startTime="4"    direction="1"  volumeScale="0.8" pitchScale="1"/>
        </animation>
    </animations>

    <cylindered>
        <movingTools>
            <movingTool node="componentJoint" playSound="true">
                <componentJoint index="1" />
                <powerTakeOffs indices="1"/>
            </movingTool>
            <movingTool node="flapLeft" playSound="true">
                <dependentPart node="flapLeftPart01" />
            </movingTool>
            <movingTool node="flapRight" playSound="true">
                <dependentPart node="flapRightPart01" />
            </movingTool>
        </movingTools>

        <movingParts>
            <movingPart node="mower" referencePoint="mowerRef" referenceFrame="mowerRef" isActiveDirty="true" maxUpdateDistance="200" limitedAxis="2"/>
            <movingPart node="flapLeftPart01" localReferencePoint="flapLeftPart02" referencePoint="flapLeftPart02Ref" referenceFrame="flapLeftPart01RefFrame">
                <dependentPart node="flapLeftPart02" />
                <dependentPart node="leftPunch" />
            </movingPart>
            <movingPart node="flapLeftPart02" referencePoint="flapLeftPart02Ref" referenceFrame="flapLeftPart02Ref"/>
            <movingPart node="leftPunch" referencePoint="leftPunchRef" referenceFrame="leftPunchRef" scaleZ="true"/>
            <movingPart node="flapRightPart01" localReferencePoint="flapRightPart02" referencePoint="flapRightPart02Ref" referenceFrame="flapRightPart01RefFrame">
                <dependentPart node="flapRightPart02" />
                <dependentPart node="rightPunch" />
            </movingPart>
            <movingPart node="flapRightPart02" referencePoint="flapRightPart02Ref" referenceFrame="flapRightPart02Ref"/>
            <movingPart node="rightPunch" referencePoint="rightPunchRef" referenceFrame="rightPunchRef" scaleZ="true"/>
        </movingParts>
    </cylindered>

    <mower fruitTypeConverter="MOWER">
        <animationNodes>
            <animationNode node="blade01" rotSpeed="-3000"  rotAxis="3" turnOnFadeTime="2" turnOffFadeTime="5"/>
            <animationNode node="blade02" rotSpeed="-3000"  rotAxis="3" turnOnFadeTime="2" turnOffFadeTime="5"/>
            <animationNode node="blade03" rotSpeed="3000"  rotAxis="3" turnOnFadeTime="2" turnOffFadeTime="5"/>
            <animationNode node="blade04" rotSpeed="-3000"  rotAxis="3" turnOnFadeTime="2" turnOffFadeTime="5"/>
            <animationNode node="blade05" rotSpeed="-3000"  rotAxis="3" turnOnFadeTime="2" turnOffFadeTime="5"/>
            <animationNode node="blade06" rotSpeed="3000"  rotAxis="3" turnOnFadeTime="2" turnOffFadeTime="5"/>
            <animationNode node="blade07" rotSpeed="3000"  rotAxis="3" turnOnFadeTime="2" turnOffFadeTime="5"/>
        </animationNodes>

        <dropEffects>
            <dropEffect workAreaIndex="1" dropAreaIndex="2">
                <effectNode effectClass="TypedMotionPathEffect" effectType="MOWER" linkNode="mowerEffectNode">
                    <motionPathEffect textureFilename="$data/vehicles/kuhn/gmd3123F/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="gmd3123F_main_component1" volumeScale="0.7"/>
        </sounds>
    </mower>

    <windBending>
        <windBendingNodes>
            <windBendingNode node="cover" maxBending="0.1" maxBendingSpeed="20"/>
        </windBendingNodes>
    </windBending>

    <turnOnVehicle turnOffIfNotAllowed="true">
        <sounds>
            <start template="DEFAULT_MOWER_START_SHORT" linkNode="gmd3123F_main_component1" />
            <stop template="DEFAULT_MOWER_STOP"         linkNode="gmd3123F_main_component1" />
            <work template="DEFAULT_MOWER_WORK"         linkNode="gmd3123F_main_component1" />
        </sounds>
    </turnOnVehicle>

    <ai>
        <needsLowering value="true" />
        <areaMarkers leftNode="aiMarkerLeft" rightNode="aiMarkerRight" backNode="aiMarkerBack" />
        <sizeMarkers leftNode="sizeMarkerLeft" rightNode="sizeMarkerRight" backNode="sizeMarkerBack" />
        <collisionTrigger node="aiCollisionNode" width="4.0" height="1.4"/>
        <agentAttachment width="3" height="1.5" length="1.5" lengthOffset="0.15"/>
    </ai>

    <foliageBending>
        <bendingNode minX="-1.55" maxX="1.55" minZ="-0.7" maxZ="0.85" yOffset="0.3" />
        <bendingNode minX="-0.55" maxX="-0.13" minZ="-0.23" maxZ="1.2" yOffset="-0.3" node="flapLeft" />
        <bendingNode minX="-0.55" maxX="-0.13" minZ="-0.8" maxZ="0.65" yOffset="-0.3" node="flapRight" />
    </foliageBending>

    <baseMaterial>
        <material name="gmd3123F_vmask_mat" baseNode="gmd3123F_vis">
            <shaderParameter name="colorMat0" value="KUHN_RED1"/>
            <shaderParameter name="colorMat2" value="KUHN_WHITE1"/>
        </material>
    </baseMaterial>

    <wearable wearDuration="480" workMultiplier="5" fieldMultiplier="2"/>
    <washable dirtDuration="90" washDuration="1" workMultiplier="4" fieldMultiplier="2"/>

    <i3dMappings>
        <i3dMapping id="gmd3123F_main_component1" node="0>" />
        <i3dMapping id="gmd3123F_vis" node="0>0" />
        <i3dMapping id="attacherJoint" node="0>0|0|0" />
        <i3dMapping id="topReferenceNode" node="0>0|0|1" />
        <i3dMapping id="hydraulicIn01_detached" node="0>0|0|2|0" />
        <i3dMapping id="hydraulicIn01_connector" node="0>0|0|2|0|0" />
        <i3dMapping id="hydraulicOut01_detached" node="0>0|0|2|1" />
        <i3dMapping id="hydraulicOut01_connector" node="0>0|0|2|1|0" />
        <i3dMapping id="hydraulicIn01" node="0>0|0|2|2" />
        <i3dMapping id="hydraulicOut01" node="0>0|0|2|3" />
        <i3dMapping id="electric_detached" node="0>0|0|2|4" />
        <i3dMapping id="electric" node="0>0|0|2|5" />
        <i3dMapping id="mower" node="0>0|1|0|0" />
        <i3dMapping id="flapLeft" node="0>0|1|0|0|0|0" />
        <i3dMapping id="flapLeftPart02Ref" node="0>0|1|0|0|0|0|0" />
        <i3dMapping id="flapLeftPart01RefFrame" node="0>0|1|0|0|0|0|1" />
        <i3dMapping id="flapLeftJoint02" node="0>0|1|0|0|0|0|4" />
        <i3dMapping id="flapLeftJoint03" node="0>0|1|0|0|0|0|5" />
        <i3dMapping id="flapRight" node="0>0|1|0|0|1|0" />
        <i3dMapping id="flapRightPart02Ref" node="0>0|1|0|0|1|0|0" />
        <i3dMapping id="flapRightPart01RefFrame" node="0>0|1|0|0|1|0|1" />
        <i3dMapping id="flapRightJoint02" node="0>0|1|0|0|1|0|4" />
        <i3dMapping id="flapRightJoint03" node="0>0|1|0|0|1|0|5" />
        <i3dMapping id="leftPunch" node="0>0|1|0|0|2" />
        <i3dMapping id="rightPunch" node="0>0|1|0|0|3" />
        <i3dMapping id="flapLeftPart01" node="0>0|1|0|0|4" />
        <i3dMapping id="flapLeftPart02" node="0>0|1|0|0|4|0" />
        <i3dMapping id="leftPunchRef" node="0>0|1|0|0|4|0|0" />
        <i3dMapping id="flapRightPart01" node="0>0|1|0|0|5" />
        <i3dMapping id="flapRightPart02" node="0>0|1|0|0|5|0" />
        <i3dMapping id="rightPunchRef" node="0>0|1|0|0|5|0|0" />
        <i3dMapping id="blade01" node="0>0|1|0|0|6|0|0" />
        <i3dMapping id="blade02" node="0>0|1|0|0|6|1|0" />
        <i3dMapping id="blade03" node="0>0|1|0|0|6|2|0" />
        <i3dMapping id="blade04" node="0>0|1|0|0|6|3|0" />
        <i3dMapping id="blade05" node="0>0|1|0|0|6|4|0" />
        <i3dMapping id="blade06" node="0>0|1|0|0|6|5|0" />
        <i3dMapping id="blade07" node="0>0|1|0|0|6|6|0" />
        <i3dMapping id="defaultLightStatic" node="0>0|1|0|0|7|0" />
        <i3dMapping id="ptoInputNode" node="0>0|1|0|0|9" />
        <i3dMapping id="disc01" node="0>0|1|0|0|10|0" />
        <i3dMapping id="disc02" node="0>0|1|0|0|11|0" />
        <i3dMapping id="areaStart" node="0>0|2|0" />
        <i3dMapping id="areaWidth" node="0>0|2|1" />
        <i3dMapping id="areaHeight" node="0>0|2|2" />
        <i3dMapping id="groundRefNode" node="0>0|2|3" />
        <i3dMapping id="areaDropStart" node="0>0|2|4" />
        <i3dMapping id="areaDropWidth" node="0>0|2|5" />
        <i3dMapping id="areaDropHeight" node="0>0|2|6" />
        <i3dMapping id="mowerEffectNode" node="0>0|3|0" />
        <i3dMapping id="smokeEmitter" node="0>0|3|1" />
        <i3dMapping id="aiMarkerLeft" node="0>0|4|0" />
        <i3dMapping id="aiMarkerRight" node="0>0|4|1" />
        <i3dMapping id="aiMarkerBack" node="0>0|4|2" />
        <i3dMapping id="sizeMarkerLeft" node="0>0|4|3" />
        <i3dMapping id="sizeMarkerRight" node="0>0|4|4" />
        <i3dMapping id="sizeMarkerBack" node="0>0|4|5" />
        <i3dMapping id="aiCollisionNode" node="0>0|4|6" />
        <i3dMapping id="componentJoint" node="0>0|5|0" />
        <i3dMapping id="cover" node="0>1|2" />
        <i3dMapping id="gmd3123F_mower_component2" node="1>" />
        <i3dMapping id="mowerRef" node="1>0" />
        <i3dMapping id="colPart01" node="1>1|0" />
        <i3dMapping id="colPart02" node="1>2|0" />
    </i3dMappings>
</vehicle>
