<?xml version="1.0" encoding="utf-8" standalone="no" ?>
<vehicle type="cutter" 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>EasyFlow 300 S</name>
        <specs>
            <workingWidth>3.0</workingWidth>
            <combination xmlFilename="$data/vehicles/krone/bigX1180/bigX1180.xml"/>
        </specs>
        <functions>
            <function>$l10n_function_cutterForage</function>
        </functions>
        <image>$data/vehicles/krone/easyFlow300S/store_easyFlow300S.png</image>
        <price>20500</price>
        <lifetime>600</lifetime>
        <rotation>0</rotation>
        <brand>KRONE</brand>
        <category>forageHarvesterCutters</category>
        <shopTranslationOffset>0 0.027 0</shopTranslationOffset>
        <shopRotationOffset>-2.261 0 0</shopRotationOffset>
        <vertexBufferMemoryUsage>1188608</vertexBufferMemoryUsage>
        <indexBufferMemoryUsage>189184</indexBufferMemoryUsage>
        <textureMemoryUsage>1638400</textureMemoryUsage>
        <instanceVertexBufferMemoryUsage>0</instanceVertexBufferMemoryUsage>
        <instanceIndexBufferMemoryUsage>0</instanceIndexBufferMemoryUsage>
        <audioMemoryUsage>0</audioMemoryUsage>
    </storeData>

    <base>
        <typeDesc>$l10n_typeDesc_pickup</typeDesc>
        <filename>$data/vehicles/krone/easyFlow300S/easyFlow300S.i3d</filename>
        <size width="4" length="2.5" />
        <speedLimit value="15" />
        <components>
            <component centerOfMass="0 0.4 0" solverIterationCount="10" mass="1400" />
        </components>
        <schemaOverlay attacherJointPosition="0 0" name="COMBINE_HEADER" />
        <mapHotspot type="CUTTER" />
    </base>

    <powerConsumer ptoRpm="540" neededMinPtoPower="50" neededMaxPtoPower="100"/>

    <wheels>
        <wheelConfigurations>
            <wheelConfiguration name="$l10n_configuration_valueDefault" price="0">
                <wheels hasSurfaceSounds="false">
                    <wheel filename="$data/shared/wheels/tires/trelleborg/T510/18x8_50R8.xml" isLeft="false" >
                        <physics restLoad="0.5" repr="leftWheelAxis"  driveNode="wheelLeft"  forcePointRatio="0.23" initialCompression="50" suspTravel="0.05" spring="20" damper="10" frictionScale="0.5" rotationDamping="0.002" brakeFactor="0" yOffset="0.02" versatileYRot="true" />
                    </wheel>
                    <wheel filename="$data/shared/wheels/tires/trelleborg/T510/18x8_50R8.xml" isLeft="true" >
                        <physics restLoad="0.5" repr="rightWheelAxis" driveNode="wheelRight" forcePointRatio="0.23" initialCompression="50" suspTravel="0.05" spring="20" damper="10" frictionScale="0.5" rotationDamping="0.002" brakeFactor="0" yOffset="0.02" versatileYRot="true" />
                    </wheel>
                </wheels>
            </wheelConfiguration>
        </wheelConfigurations>

        <rimColor material="18">SHARED_WHITE1</rimColor>

        <hubs>
            <hub linkNode="wheelLeft"  filename="$data/shared/wheels/hubs/hubSmall_n0_1.xml" isLeft="false" scale="0.151 0.151 0.151" />
            <hub linkNode="wheelRight" filename="$data/shared/wheels/hubs/hubSmall_n0_1.xml" isLeft="true"  scale="0.151 0.151 0.151" />
        </hubs>
    </wheels>

    <speedRotatingParts>
        <speedRotatingPart node="supportWheel" wheelIndex="1" onlyActiveWhenLowered="true" />
        <speedRotatingPart node="drum" wheelIndex="1" onlyActiveWhenLowered="true" workAreaIndex="1" />
    </speedRotatingParts>

    <lights>
        <sharedLight linkNode="yellowRound01"  filename="$data/shared/assets/reflectors/lizard/yellowRound_01.xml" />
        <sharedLight linkNode="yellowRound02" filename="$data/shared/assets/reflectors/lizard/yellowRound_01.xml" />
    </lights>

    <groundReferenceNodes>
        <groundReferenceNode node="depthNode" threshold="0.3" />
    </groundReferenceNodes>

    <workAreas>
        <workArea type="cutter" functionName="processPickupCutterArea" disableBackwards="false" >
            <area startNode="areaStart" widthNode="areaWidth" heightNode="areaHeight" />
            <groundReferenceNode index="1" />
            <folding minLimit="0" maxLimit="0.1" />
        </workArea>
    </workAreas>

    <attachable>
        <brakeForce force="0.2"/>

        <inputAttacherJoints>
            <inputAttacherJoint node="attacherJoint" jointType="cutterHarvester" upperRotationOffset="0">
                <heightNode node="depthNode" />
                <distanceToGround lower="0.05" upper="0.8" />
            </inputAttacherJoint>
        </inputAttacherJoints>
        <support animationName="moveSupport" />
    </attachable>

    <powerTakeOffs>
        <local startNode="localPowerTakeOff01Start" endNode="localPowerTakeOff01End" />
    </powerTakeOffs>

    <dynamicMount forceLimitScale="1" />

    <foldable>
        <foldingConfigurations>
            <foldingConfiguration>
                <foldingParts startMoveDirection="1" turnOnFoldMaxLimit="0.5" turnOnFoldMinLimit="0" >
                    <foldingPart animationName="folding" speedScale="1.2" />
                </foldingParts>
            </foldingConfiguration>
      </foldingConfigurations>
  </foldable>

    <cylindered>
        <movingTools>
            <movingTool node="leftArm" wheelIndices="1" playSound="true" >
                <dependentPart node="hydraulicLeftArm" />
            </movingTool>
            <movingTool node="rightArm" wheelIndices="2" playSound="true" >
                <dependentPart node="hydraulicRightArm" />
            </movingTool>
        </movingTools>

        <movingParts>
            <movingPart node="leftBar" referencePoint="leftBarRef" referenceFrame="leftBarFrame" scaleZ="true" isActiveDirty="true" maxUpdateDistance="40"/>
            <movingPart node="rightBar" referencePoint="rightBarRef" referenceFrame="rightBarFrame" scaleZ="true" isActiveDirty="true" maxUpdateDistance="40"/>

            <movingPart node="hydraulicLeftArm" referencePoint="hydraulicLeftArmRef" referenceFrame="easyFlow300S_main_component1" >
                <translatingPart node="hydraulicLeftArmPunch" />
            </movingPart>
            <movingPart node="hydraulicRightArm" referencePoint="hydraulicRightArmRef" referenceFrame="easyFlow300S_main_component1" >
                <translatingPart node="hydraulicRightArmPunch" />
            </movingPart>
        </movingParts>

        <sounds>
            <hydraulic template="defaultHydraulicSound" linkNode="easyFlow300S_main_component1"/>
        </sounds>
    </cylindered>

    <animations>
        <animation name="folding">
            <part node="leftArm"            startTime="0" endTime="2" startRot="0 0 0" endRot="0 -17 0"/>
            <part node="rightArm"           startTime="0" endTime="2" startRot="0 0 0" endRot="0 17 0"/>
            <part node="leftWheelAxisRot"   startTime="0" endTime="2" startRot="0 0 0" endRot="0 17 0"/>
            <part node="rightWheelAxisRot"  startTime="0" endTime="2" startRot="0 0 0" endRot="0 -17 0"/>

            <sound template="defaultHydraulicSound"  startTime="0.01"  endTime="1.99"  direction="0"     pitchScale="1.2" volumeScale="1.7" fadeIn="0.1" fadeOut="0.1"/>
            <sound template="metalClose"             startTime="0.01"  direction="-1"   volumeScale="0.8" pitchScale="2.8"/>
            <sound template="latchSmall"             startTime="0.01"  direction="-1"   volumeScale="0.2" pitchScale="0.8"/>
            <sound template="metalClose"             startTime="1.99"  direction="1"   volumeScale="0.8" pitchScale="2.8"/>
            <sound template="latchSmall"             startTime="1.99"  direction="1"   volumeScale="0.2" pitchScale="0.8"/>
        </animation>

        <!-- move support wheel down/up -->
        <animation name="moveSupport">
            <part node="supportArms" startTime="0" endTime="1" startTrans="0 0.35 0" endTrans="0 0 0" />

            <sound template="metalClose"             startTime="0.9"  direction="1"   volumeScale="0.8" pitchScale="2.8"/>
            <sound template="latchSmall"             startTime="0.9"  direction="1"   volumeScale="0.2" pitchScale="0.8"/>
            <sound template="metalClose"             startTime="0.1"  direction="-1"   volumeScale="0.8" pitchScale="2.8"/>
            <sound template="latchSmall"             startTime="0.1"  direction="-1"   volumeScale="0.2" pitchScale="0.8"/>
            <sound template="slideOpen"             startTime="0.99"  direction="-1"   volumeScale="3.0" pitchScale="1.5"/>
            <sound template="slideOpen"             startTime="0.01"  direction="1"   volumeScale="3.0" pitchScale="1.5"/>
        </animation>
    </animations>

    <cutter fruitTypeCategories="pickup" fruitTypeConverter="forageHarvester" useWindrowed="true">
        <fillEffect>
            <effectNode effectClass="TypedMotionPathEffect" effectType="PICKUPIN" linkNode="pickupEffectLinkNode">
                <motionPathEffect textureFilename="$data/vehicles/krone/easyFlow300S/pickupArray.dds" numRows="16" rowLength="15" minFade="0.15"/>
            </effectNode>
            <effectNode effectClass="ParticleEffect" effectNode="pickupSmokeEmitter" particleType="SMOKE" materialType="smokeParticle" useFruitColor="true" emitCountScale="0.5"/>
            <effectNode effectClass="ParticleEffect" effectNode="pickupSmokeEmitter" particleType="SMOKE" materialType="smokeParticle" useFruitColor="true" emitCountScale="0.5" worldSpace="false"/>
        </fillEffect>
        <animationNodes>
            <animationNode node="mainDrum" rotAxis="1" rotSpeed="800"  turnOnFadeTime="2" turnOffFadeTime="4"/>
            <animationNode node="spikes" rotAxis="1" rotSpeed="-600" turnOnFadeTime="2" turnOffFadeTime="4"/>
        </animationNodes>
        <sounds>
            <cut template="cropCuttingForage" />
        </sounds>
    </cutter>

    <turnOnVehicle turnedOnByAttacherVehicle="true" turnOffIfNotAllowed="true">
        <sounds>
            <start template="forageHarvesterStart" volumeScale="0.8"/>
            <work  template="forageHarvesterWork"  pitchScale="1.2"/>
            <stop  template="forageHarvesterStop"  pitchScale="1.5" volumeScale="0.6"/>
        </sounds>
    </turnOnVehicle>

    <ai>
        <agentAttachment width="3.0" height="1.65" length="1.6" lengthOffset="0.05"/>
    </ai>

    <foliageBending>
        <bendingNode minX="-1.5" maxX="1.5" minZ="-0.7" maxZ="0.9" yOffset="0.25" />
    </foliageBending>

    <baseMaterial>
        <material name="easyFlow300S_mat" baseNode="krone_vis">
            <shaderParameter name="colorMat0" value="KRONE_GREEN1" material="0"/>
            <shaderParameter name="colorMat1" value="KRONE_YELLOW1" material="0"/>
            <shaderParameter name="colorMat2" value="KRONE_YELLOW1" material="0"/>
        </material>
    </baseMaterial>

    <wearable wearDuration="480" workMultiplier="5" fieldMultiplier="2"/>
    <washable dirtDuration="90" washDuration="1" workMultiplier="4" fieldMultiplier="2"/>

    <i3dMappings>
        <i3dMapping id="easyFlow300S_main_component1" node="0>" />
        <i3dMapping id="krone_vis" node="0>0" />
        <i3dMapping id="attacherJoint" node="0>0|0|0" />
        <i3dMapping id="supportArms" node="0>0|0|1|0" />
        <i3dMapping id="localPowerTakeOff01Start" node="0>0|0|2" />
        <i3dMapping id="localPowerTakeOff01End" node="0>0|0|3" />
        <i3dMapping id="yellowRound01" node="0>0|1|0" />
        <i3dMapping id="yellowRound02" node="0>0|1|1" />
        <i3dMapping id="leftArm" node="0>0|2|0" />
        <i3dMapping id="leftWheelAxisRot" node="0>0|2|0|0" />
        <i3dMapping id="leftWheelAxis" node="0>0|2|0|0|0" />
        <i3dMapping id="wheelLeft" node="0>0|2|0|0|0|0" />
        <i3dMapping id="leftBar" node="0>0|2|0|0|0|1" />
        <i3dMapping id="leftBarFrame" node="0>0|2|0|0|0|2" />
        <i3dMapping id="leftBarRef" node="0>0|2|0|0|1" />
        <i3dMapping id="hydraulicLeftArmRef" node="0>0|2|0|1" />
        <i3dMapping id="rightArm" node="0>0|2|1" />
        <i3dMapping id="rightWheelAxisRot" node="0>0|2|1|0" />
        <i3dMapping id="rightWheelAxis" node="0>0|2|1|0|0" />
        <i3dMapping id="wheelRight" node="0>0|2|1|0|0|0" />
        <i3dMapping id="rightBar" node="0>0|2|1|0|0|1" />
        <i3dMapping id="rightBarFrame" node="0>0|2|1|0|0|2" />
        <i3dMapping id="rightBarRef" node="0>0|2|1|0|1" />
        <i3dMapping id="hydraulicRightArmRef" node="0>0|2|1|1" />
        <i3dMapping id="mainDrum" node="0>0|2|2|0" />
        <i3dMapping id="drum" node="0>0|2|2|1" />
        <i3dMapping id="spikes" node="0>0|2|2|2" />
        <i3dMapping id="supportWheel" node="0>0|2|2|3" />
        <i3dMapping id="hydraulicLeftArm" node="0>0|3|0" />
        <i3dMapping id="hydraulicLeftArmPunch" node="0>0|3|0|0" />
        <i3dMapping id="hydraulicRightArm" node="0>0|3|1" />
        <i3dMapping id="hydraulicRightArmPunch" node="0>0|3|1|0" />
        <i3dMapping id="depthNode" node="0>0|4" />
        <i3dMapping id="areaStart" node="0>0|5|0" />
        <i3dMapping id="areaWidth" node="0>0|5|1" />
        <i3dMapping id="areaHeight" node="0>0|5|2" />
        <i3dMapping id="pickupEffectLinkNode" node="0>0|7|0" />
        <i3dMapping id="pickupSmokeEmitter" node="0>0|7|1" />
        <i3dMapping id="decals_decal2" node="0>0|8|3" />
        <i3dMapping id="decals_decal1" node="0>0|8|4" />
    </i3dMappings>
</vehicle>
