<?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>MF FreeFlow 25FT</name>
        <specs>
            <workingWidth>7.62</workingWidth>
            <combination xmlFilename="$data/vehicles/masseyFerguson/beta7360AL4/beta7360AL4.xml"/>
            <combination xmlFilename="$data/vehicles/nardi/n40bx/n40bx.xml"/>
        </specs>
        <functions>
            <function>$l10n_function_cutter</function>
        </functions>
        <image>$data/vehicles/masseyFerguson/freeFlow25FT/store_freeFlow25FT.png</image>
        <price>35000</price>
        <lifetime>600</lifetime>
        <rotation>0</rotation>
        <brand>MASSEYFERGUSON</brand>
        <category>cutters</category>
        <shopDynamicTitle>true</shopDynamicTitle>
        <shopTranslationOffset>0 -0.426 0</shopTranslationOffset>
        <shopRotationOffset>7.13 0 0</shopRotationOffset>
        <vertexBufferMemoryUsage>2048000</vertexBufferMemoryUsage>
        <indexBufferMemoryUsage>855296</indexBufferMemoryUsage>
        <textureMemoryUsage>1114112</textureMemoryUsage>
        <instanceVertexBufferMemoryUsage>0</instanceVertexBufferMemoryUsage>
        <instanceIndexBufferMemoryUsage>0</instanceIndexBufferMemoryUsage>
        <audioMemoryUsage>0</audioMemoryUsage>
    </storeData>

    <base>
        <typeDesc>$l10n_typeDesc_cutter</typeDesc>
        <filename>$data/vehicles/masseyFerguson/freeFlow25FT/freeFlow25FT.i3d</filename>
        <size width="7.9" length="2.5" height="1.9" lengthOffset="0.03"/>
        <speedLimit value="15"/>
        <sounds volumeFactor="2.0"/>
        <components>
            <component centerOfMass="0 0.2 0" solverIterationCount="10" mass="2500"/>
        </components>
        <schemaOverlay attacherJointPosition="0 0" name="COMBINE_HEADER"/>
    </base>

    <attachable>
        <inputAttacherJoints>
            <inputAttacherJoint node="attacherJoint" jointType="cutter" >
                <heightNode node="heightNode01" />
                <heightNode node="heightNode02" />
                <heightNode node="heightNode03" />
                <distanceToGround lower="0.25" upper="1.75" />
            </inputAttacherJoint>
        </inputAttacherJoints>
        <lowerAnimation name="loweringAnimation" speed="1"/>
        <support animationName="support"/>
    </attachable>

    <connectionHoses>
        <hose inputAttacherJointIndices="1" type="CABLE_BUNDLE" node="targetNode01" length="1.5" diameter="0.04" straighteningFactor="0.5" adapterType="NONE" isTwoPointHose="false">
            <objectChange node="detachedHoses" visibilityActive="false" visibilityInactive="true"/>
            <objectChange node="attachedHoses" visibilityActive="true" visibilityInactive="false"/>
        </hose>
    </connectionHoses>

    <powerTakeOffs>
        <input inputAttacherJointIndices="1" inputNode="ptoInputNode" aboveAttacher="true" detachNode="ptoDetachNode" ptoName="LEFT_PTO"/>
    </powerTakeOffs>

    <powerConsumer ptoRpm="470" neededMaxPtoPower="80"/>

    <groundReferenceNodes>
        <groundReferenceNode node="freeFlow25_main_component1" threshold="0.4" />
    </groundReferenceNodes>

    <workAreas>
        <workArea type="cutter" functionName="processCutterArea" >
            <area startNode="workAreaStart" widthNode="workAreaWidth" heightNode="workAreaHeight" />
            <groundReferenceNode index="1" />
            <testAreas autoGenerate="true" zOffset="0.5" xOffset="0" length="0.6" numAreas="12" areaWidthScale="0.25" scale="0.95"/>
        </workArea>
    </workAreas>

    <animations>
        <animation name="support" isKeyframe="true">
            <part node="groundAdjustPart01" startTime="0" endTime="0.5"  startRot="0 0 0" endRot="23 0 0"/>
            <part node="groundAdjustPart02" startTime="0" endTime="0.5"  startRot="0 0 0" endRot="-26 0 0"/>
        </animation>
        <animation name="loweringAnimation" isKeyframe="true">
            <part node="groundAdjustPart01" startTime="1" endTime="1.5"  startRot="0 0 0" endRot="23 0 0"/>
            <part node="groundAdjustPart02" startTime="1" endTime="1.5"  startRot="0 0 0" endRot="-26 0 0"/>
        </animation>
        <animation name="turnedOnAnimation_bottomBlades" looping="true" isKeyframe="true">
            <part node="bladesDecal" startTime="0.0" endTime="0.5"  startTrans="0.03 0 0"  endTrans="-0.03 0 0" />
            <part node="bladesDecal" startTime="0.5" endTime="1.0"  startTrans="-0.03 0 0" endTrans="0.03 0 0" />
        </animation>

        <animation name="turnedOnAnimation_canolaBlades" looping="true" isKeyframe="true">
            <part node="bladesDecalCanola01" startTime="0.0" endTime="0.5"  startTrans="0.06 0 0"  endTrans="-0.06 0 0" />
            <part node="bladesDecalCanola01" startTime="0.5" endTime="1.0"  startTrans="-0.06 0 0" endTrans="0.06 0 0" />
            <part node="bladesCanola02" startTime="0.0" endTime="0.5"  startTrans="0 -0.03 0" endTrans="0 0.03 0" />
            <part node="bladesCanola02" startTime="0.5" endTime="1.0"  startTrans="0 0.03 0" endTrans="0 -0.03 0" />
            <part node="bladesDecalCanola03" startTime="0.0" endTime="0.5"  startTrans="0 0.03 0" endTrans="0 -0.03 0" />
            <part node="bladesDecalCanola03" startTime="0.5" endTime="1.0"  startTrans="0 -0.03 0" endTrans="0 0.03 0" />
        </animation>
    </animations>

    <cylindered>
        <movingTools>
            <movingTool node="reelMove" playSound="true" >
                <controls axis="AXIS_CUTTER_REEL" invertAxis="true" mouseSpeedFactor="0.3" iconName="REEL_TRANSLATE_X" />
                <translation transSpeed="0.1" transAcceleration="10" transMax="0.25" transMin="0" translationAxis="3" startTrans="0"/>
                <dependentPart node="reelMoveHydraulic" />
            </movingTool>
            <movingTool node="reelRot" playSound="true" >
                <controls axis="AXIS_CUTTER_REEL2" invertAxis="true" mouseSpeedFactor="0.3" iconName="REEL_TRANSLATE_Y" />
                <rotation rotSpeed="10" rotAcceleration="40" rotMax="5" rotMin="-20" startRot="-20"/>
                <dependentPart node="reelRotHydraulic" />
            </movingTool>
            <movingTool node="reel">
                <dependentPart node="spike01"/>
                <dependentPart node="spike02"/>
                <dependentPart node="spike03"/>
                <dependentPart node="spike04"/>
                <dependentPart node="spike05"/>
                <dependentPart node="spike06"/>
            </movingTool>
        </movingTools>

        <movingParts>
            <movingPart node="reelRotHydraulic" referencePoint="reelRotHydraulicRef" referenceFrame="reelRotHydraulicRef" >
                <translatingPart node="reelRotHydraulicPunch" />
            </movingPart>
            <movingPart node="reelMoveHydraulic" referencePoint="reelMoveHydraulicRef" referenceFrame="reelMoveHydraulicRef" >
                <translatingPart node="reelMoveHydraulicPunch" />
            </movingPart>
            <movingPart node="spike01" referenceFrame="spikeRefFrame"/>
            <movingPart node="spike02" referenceFrame="spikeRefFrame"/>
            <movingPart node="spike03" referenceFrame="spikeRefFrame"/>
            <movingPart node="spike04" referenceFrame="spikeRefFrame"/>
            <movingPart node="spike05" referenceFrame="spikeRefFrame"/>
            <movingPart node="spike06" referenceFrame="spikeRefFrame"/>
        </movingParts>
        <sounds>
            <actionSound template="hydraulicOpen05"  volumeScale="1.8" pitchScale="1.0" linkNode="reelRot"                  actionNames="TOOL_MOVE_NEG"                                   nodes="reelRot"  fadeIn="0.1" fadeOut="0.1" />
            <actionSound template="hydraulicOpen02"  volumeScale="1.7" pitchScale="1.0" linkNode="reelRot"                  actionNames="TOOL_MOVE_POS"                                   nodes="reelRot"  fadeIn="0.1" fadeOut="0.1" />
            <actionSound template="hydraulicClose03" volumeScale="1.3" pitchScale="1.5" linkNode="freeFlow25_main_component1" actionNames="TOOL_MOVE_POS TOOL_MOVE_NEG"                     nodes="reelMove" fadeIn="0.1" fadeOut="0.1" />
            <actionSound template="vibratingImp"     volumeScale="0.7" pitchScale="1"   linkNode="reelRot"                  actionNames="TOOL_MOVE_END_POS_LIMIT"                         nodes="reelRot"/>
            <actionSound template="metalImpHigh01"   volumeScale="0.5" pitchScale="1"   linkNode="reelRot"                  actionNames="TOOL_MOVE_END_POS_LIMIT"                         nodes="reelRot"/>
            <actionSound template="vibratingImp"     volumeScale="0.8" pitchScale="1.3" linkNode="reelRot"                  actionNames="TOOL_MOVE_END_NEG_LIMIT"                         nodes="reelRot"/>
            <actionSound template="clackVar6"        volumeScale="2.6" pitchScale="0.7" linkNode="reelRot"                  actionNames="TOOL_MOVE_END_NEG_LIMIT"                         nodes="reelRot"/>
            <actionSound template="metalImpHigh01"   volumeScale="0.6" pitchScale="1"   linkNode="freeFlow25_main_component1" actionNames="TOOL_MOVE_END_POS_LIMIT TOOL_MOVE_END_NEG_LIMIT" nodes="reelMove"/>
            <actionSound template="sheetImp02"       volumeScale="2"   pitchScale="1"   linkNode="freeFlow25_main_component1" actionNames="TOOL_MOVE_END_POS_LIMIT TOOL_MOVE_END_NEG_LIMIT" nodes="reelMove"/>
            <actionSound template="vibratingImp"     volumeScale="0.7" pitchScale="1.6" linkNode="freeFlow25_main_component1" actionNames="TOOL_MOVE_END_POS_LIMIT TOOL_MOVE_END_NEG_LIMIT" nodes="reelMove"/>
        </sounds>
    </cylindered>

    <dynamicMount forceLimitScale="1">
        <lockPosition xmlFilename="$data/vehicles/nardi/n40bx/n40bx.xml" jointNode="0>" transOffset="-0.417 0.657 -0.612" rotOffset="-6 -90 0"/>
    </dynamicMount>

    <cutter fruitTypeCategories="grainHeader">
        <fruitExtraObjects>
            <fruitExtraObject isDefault="true" node="grainExtension"/>
            <fruitExtraObject fruitType="canola" node="canolaExtension"/>
        </fruitExtraObjects>


         <animationNodes>
            <animationNode node="reel" rotSpeed="220" rotAxis="1" turnOnFadeTime="1" turnOffFadeTime="3"/>
            <animationNode node="outerReel" rotSpeed="220" rotAxis="1" turnOnFadeTime="1" turnOffFadeTime="3"/>
            <animationNode node="mainDrum" rotSpeed="700" rotAxis="1" class="RotationAnimationSpikes" turnOnFadeTime="2" turnOffFadeTime="3">
                <spikes moveUpRange="130 170" moveDownRange="260 320" maxTrans="-0.1" transAxis="2">
                    <spike node="drumMainSpikes01"/>
                    <spike node="drumMainSpikes02"/>
                    <spike node="drumMainSpikes03"/>
                    <spike node="drumMainSpikes04"/>
                    <spike node="drumMainSpikes05"/>
                    <spike node="drumMainSpikes06"/>
                    <spike node="drumMainSpikes07"/>
                    <spike node="drumMainSpikes08"/>
                    <spike node="drumMainSpikes09"/>
                    <spike node="drumMainSpikes10"/>
                </spikes>
            </animationNode>
        </animationNodes>

        <automaticTilt raycastNode1="heightNode01" raycastNode2="heightNode03"/>

        <effect>
            <effectNode effectClass="CutterMotionPathEffect" effectType="CUTTER" linkNode="cutterEffectLinkNode">
                <motionPathEffect textureFilename="$data/vehicles/masseyFerguson/freeFlow25FT/drumArray.dds" numRows="32" rowLength="42" minFade="0.06" textureRealWidth="17" speedScale="0.16"/>
            </effectNode>
            <effectNode effectClass="ParticleEffect" effectNode="smokeEmitter" particleType="SMOKE" materialType="smokeParticle" emitCountScale="0.1" worldSpace="false" useCuttingWidth="false"/>
        </effect>
        <sounds>
            <cut template="cropCutting" volumeScale="0.8"/>
        </sounds>
    </cutter>

    <turnOnVehicle turnedOnByAttacherVehicle="true">
        <turnedOnAnimation name="turnedOnAnimation_bottomBlades" speedScale="8" turnOnFadeTime="2" turnOffFadeTime="3"/>
        <turnedOnAnimation name="turnedOnAnimation_canolaBlades" speedScale="5" turnOnFadeTime="2" turnOffFadeTime="3"/>

        <sounds>
            <start template="harvesterToolStart" volumeScale="0.6" pitchScale="1" />
            <work template="harvesterToolWork"   volumeScale="0.6" pitchScale="1" />
            <stop template="harvesterToolStop"   volumeScale="0.6" pitchScale="1"/>
        </sounds>
    </turnOnVehicle>

     <ai>
        <areaMarkers leftNode="aiMarkerLeft" rightNode="aiMarkerRight" backNode="aiMarkerBack" />
        <sizeMarkers leftNode="sizeMarkerLeft" rightNode="sizeMarkerRight" backNode="sizeMarkerBack" />
        <collisionTrigger useSize="true"/>
        <agentAttachment width="7.95" height="2.35" length="2.5" lengthOffset="0.03"/>
    </ai>

    <foliageBending>
        <bendingNode minX="-3.9" maxX="4" minZ="-1.2" maxZ="0.05" yOffset="0.45"/>
    </foliageBending>

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

    <designConfigurations>
        <designConfiguration name="Massey Ferguson" price="0" vehicleBrand="MASSEYFERGUSON" displayBrand="MASSEYFERGUSON">
            <objectChange node="decals_mf"  visibilityActive="true"/>
            <objectChange node="decals_fendt"  visibilityActive="false"/>
            <material materialSlotName="base_red_mat" materialTemplateName="MASSEYFERGUSON_RED"/>
            <material materialSlotName="base_grey_mat" materialTemplateName="MASSEYFERGUSON_DARK_GREY"/>
            <material materialSlotName="canolaModule_grey_mat" materialTemplateName="MASSEYFERGUSON_DARK_GREY"/>
            <material materialSlotName="canolaModule_red_mat" materialTemplateName="MASSEYFERGUSON_RED"/>
        </designConfiguration>
        <designConfiguration name="Fendt" price="0" vehicleBrand="FENDT" displayBrand="FENDT" isSelectable="false">
            <objectChange node="decals_mf"  visibilityActive="false"/>
            <objectChange node="decals_fendt"  visibilityActive="true"/>
            <material materialSlotName="base_red_mat" materialTemplateName="FENDT_NEWGREEN1"/>
            <material materialSlotName="base_grey_mat" materialTemplateName="FENDT_GREY2"/>
            <material materialSlotName="canolaModule_grey_mat" materialTemplateName="FENDT_GREY2"/>
            <material materialSlotName="canolaModule_red_mat" materialTemplateName="FENDT_NEWGREEN1"/>
        </designConfiguration>
    </designConfigurations>

    <i3dMappings>
        <i3dMapping id="freeFlow25_main_component1" node="0>" />
        <i3dMapping id="freeFlow25FT_vis" node="0>0" />
        <i3dMapping id="attacherJoint" node="0>0|0|0" />
        <i3dMapping id="ptoInputNode" node="0>0|0|1" />
        <i3dMapping id="ptoDetachNode" node="0>0|0|2" />
        <i3dMapping id="heightNode01" node="0>0|0|3" />
        <i3dMapping id="heightNode02" node="0>0|0|4" />
        <i3dMapping id="heightNode03" node="0>0|0|5" />
        <i3dMapping id="attachedHoses" node="0>0|0|6" />
        <i3dMapping id="detachedHoses" node="0>0|0|7" />
        <i3dMapping id="targetNode01" node="0>0|0|8" />
        <i3dMapping id="workAreaStart" node="0>0|1|0" />
        <i3dMapping id="workAreaWidth" node="0>0|1|1" />
        <i3dMapping id="workAreaHeight" node="0>0|1|2" />
        <i3dMapping id="aiMarkerLeft" node="0>0|2|0" />
        <i3dMapping id="aiMarkerRight" node="0>0|2|1" />
        <i3dMapping id="aiMarkerBack" node="0>0|2|2" />
        <i3dMapping id="sizeMarkerLeft" node="0>0|2|3" />
        <i3dMapping id="sizeMarkerRight" node="0>0|2|4" />
        <i3dMapping id="sizeMarkerBack" node="0>0|2|5" />
        <i3dMapping id="cutterEffectLinkNode" node="0>0|3|0" />
        <i3dMapping id="smokeEmitter" node="0>0|3|1" />
        <i3dMapping id="mainDrum" node="0>0|4|0" />
        <i3dMapping id="drumMainSpikes01" node="0>0|4|0|0|0" />
        <i3dMapping id="drumMainSpikes02" node="0>0|4|0|1|0" />
        <i3dMapping id="drumMainSpikes03" node="0>0|4|0|2|0" />
        <i3dMapping id="drumMainSpikes04" node="0>0|4|0|3|0" />
        <i3dMapping id="drumMainSpikes05" node="0>0|4|0|4|0" />
        <i3dMapping id="drumMainSpikes06" node="0>0|4|0|5|0" />
        <i3dMapping id="drumMainSpikes07" node="0>0|4|0|6|0" />
        <i3dMapping id="drumMainSpikes08" node="0>0|4|0|7|0" />
        <i3dMapping id="drumMainSpikes09" node="0>0|4|0|8|0" />
        <i3dMapping id="drumMainSpikes10" node="0>0|4|0|9|0" />
        <i3dMapping id="reelRot" node="0>0|4|1" />
        <i3dMapping id="reelMove" node="0>0|4|1|0|0" />
        <i3dMapping id="reel" node="0>0|4|1|0|0|0|0" />
        <i3dMapping id="spike01" node="0>0|4|1|0|0|0|0|0" />
        <i3dMapping id="spike02" node="0>0|4|1|0|0|0|0|1" />
        <i3dMapping id="spike03" node="0>0|4|1|0|0|0|0|2" />
        <i3dMapping id="spike04" node="0>0|4|1|0|0|0|0|3" />
        <i3dMapping id="spike05" node="0>0|4|1|0|0|0|0|4" />
        <i3dMapping id="spike06" node="0>0|4|1|0|0|0|0|5" />
        <i3dMapping id="outerReel" node="0>0|4|1|0|0|1" />
        <i3dMapping id="spikeRefFrame" node="0>0|4|1|0|0|2" />
        <i3dMapping id="reelMoveHydraulicRef" node="0>0|4|1|0|0|3" />
        <i3dMapping id="reelRotHydraulicRef" node="0>0|4|1|1" />
        <i3dMapping id="reelMoveHydraulic" node="0>0|4|1|2" />
        <i3dMapping id="reelMoveHydraulicPunch" node="0>0|4|1|2|0" />
        <i3dMapping id="bladesDecal" node="0>0|4|2" />
        <i3dMapping id="reelRotHydraulic" node="0>0|4|3" />
        <i3dMapping id="reelRotHydraulicPunch" node="0>0|4|3|0" />
        <i3dMapping id="groundAdjustPart01" node="0>0|4|4" />
        <i3dMapping id="groundAdjustPart02" node="0>0|4|4|0" />
        <i3dMapping id="decals_fendt" node="0>0|5|0" />
        <i3dMapping id="decals_mf" node="0>0|5|1" />
        <i3dMapping id="grainExtension" node="0>0|5|2" />
        <i3dMapping id="canolaExtension" node="0>0|5|3" />
        <i3dMapping id="zieglerRapeseedModules_7_6M_vis" node="0>0|5|3|0" />
        <i3dMapping id="bladesDecalCanola01" node="0>0|5|3|5" />
        <i3dMapping id="bladesCanola02" node="0>0|5|3|6|0" />
        <i3dMapping id="bladesDecalCanola03" node="0>0|5|3|7|0" />
    </i3dMappings>
</vehicle>
