﻿<?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>130FB</name>
        <specs>
            <workingWidth>2.0</workingWidth>
            <fillTypes>poplar</fillTypes>
            <combination xmlFilename="$data/vehicles/newHolland/fr780/fr780.xml"/>
        </specs>
        <functions>
            <function>$l10n_function_cutterForage</function>
        </functions>
        <storePacks>
            <storePack>STARTER_POPLAR</storePack>
        </storePacks>
        <image>$data/vehicles/newHolland/fb130/store_fb130.png</image>
        <price>25000</price>
        <lifetime>600</lifetime>
        <rotation>0</rotation>
        <brand>NEWHOLLAND</brand>
        <category>forageHarvesterCutters</category>
        <shopTranslationOffset>0 -0.018 0</shopTranslationOffset>
        <shopRotationOffset>0.736 0 0</shopRotationOffset>
        <vertexBufferMemoryUsage>647424</vertexBufferMemoryUsage>
        <indexBufferMemoryUsage>86016</indexBufferMemoryUsage>
        <textureMemoryUsage>1048576</textureMemoryUsage>
        <instanceVertexBufferMemoryUsage>0</instanceVertexBufferMemoryUsage>
        <instanceIndexBufferMemoryUsage>0</instanceIndexBufferMemoryUsage>
        <audioMemoryUsage>0</audioMemoryUsage>
    </storeData>

    <base>
        <typeDesc>$l10n_typeDesc_cutter</typeDesc>
        <filename>$data/vehicles/newHolland/fb130/fb130.i3d</filename>
        <size width="3.5" length="4"/>
        <speedLimit value="8"/>
        <components>
            <component centerOfMass="0 1 -0.5" solverIterationCount="20" mass="2100"/>
        </components>
        <schemaOverlay name="CUTTER" attacherJointPosition="0 0"/>
        <mapHotspot type="CUTTER" />
    </base>

    <wheels>
        <wheelConfigurations>
            <wheelConfiguration name="$l10n_configuration_valueDefault" price="0">
                <wheels hasSurfaceSounds="false">
                    <wheel filename="$data/shared/wheels/tires/trelleborg/T510/215_65R15.xml" isLeft="true">
                        <physics restLoad="0.4" repr="wheelLeftAxis"  driveNode="wheelLeft"  forcePointRatio="0.23" initialCompression="75" suspTravel="0.02" spring="30" damper="10" rotationDamping="0.0005" versatileYRot="true" rotMax="45" rotMin="-45"/>
                    </wheel>
                    <wheel filename="$data/shared/wheels/tires/trelleborg/T510/215_65R15.xml" isLeft="false">
                        <physics restLoad="0.4" repr="wheelRightAxis" driveNode="wheelRight" forcePointRatio="0.23" initialCompression="75" suspTravel="0.02" spring="30" damper="10" rotationDamping="0.0005" versatileYRot="true" rotMax="45" rotMin="-45"/>
                    </wheel>
                </wheels>
            </wheelConfiguration>
        </wheelConfigurations>

        <rimColor material="18">SHARED_WHITE1</rimColor>

        <hubs>
            <color0 material="18">SHARED_WHITE1</color0>
            <hub linkNode="wheelLeft"   filename="$data/shared/wheels/hubs/hubSmall_n0_1.xml" isLeft="true"  scale="0.2 0.2 0.2" offset="-0.02"/>
            <hub linkNode="wheelRight"  filename="$data/shared/wheels/hubs/hubSmall_n0_1.xml" isLeft="false" scale="0.2 0.2 0.2" offset="-0.02"/>
        </hubs>
    </wheels>

    <attachable>
        <inputAttacherJoints>
            <inputAttacherJoint node="attacherJoint" jointType="cutterHarvester">
                <heightNode node="heightNode"/>
                <distanceToGround lower="0" upper="1.4"/>
            </inputAttacherJoint>
        </inputAttacherJoints>
        <support animationName="moveSupport"/>
        <brakeForce force="0.2"/>
    </attachable>

    <lights>
        <sharedLight linkNode="yellowRound_01"       filename="$data/shared/assets/reflectors/lizard/yellowRound_01.xml" />
        <sharedLight linkNode="yellowRound_02"       filename="$data/shared/assets/reflectors/lizard/yellowRound_01.xml" />
    </lights>

    <powerTakeOffs>
        <input inputNode="pto" inputAttacherJointIndices="1" aboveAttacher="true" ptoName="LEFT_PTO"/>
    </powerTakeOffs>

    <powerConsumer ptoRpm="540" neededMaxPtoPower="50"/>

    <groundReferenceNodes>
        <groundReferenceNode node="groundReferenceNode" threshold="0.7" />
    </groundReferenceNodes>

    <workAreas>
        <workArea type="cutter" functionName="processCutterArea" disableBackwards="true" >
            <area startNode="workAreaStart" widthNode="workAreaWidth" heightNode="workAreaHeight" />
            <groundReferenceNode index="1" />
            <testAreas autoGenerate="true" zOffset="0.5" xOffset="0" length="0.6" numAreas="4" areaWidthScale="0.25"/>
        </workArea>
    </workAreas>

    <animations>
        <animation name="moveSupport">
            <part node="supportArm" startTime="0" endTime="0.6" startTrans="0 0.45 0" endTrans="0 0 0"/>
            <part node="colSupport" startTime="0" endTime="0.6" startTrans="0 0.37 0" endTrans="0 0 0"/>

            <sound template="slideOpen"  startTime="0.01" endTime="0.59" volumeScale="3"   pitchScale="1.1" fadeIn="0.05"/>
            <sound template="metalClose" startTime="0.01" direction="-1" volumeScale="0.8" pitchScale="1.5"/>
        </animation>
    </animations>

    <cylindered>
        <movingParts>
            <movingPart node="wheelLeftAxisPart" referencePoint="wheelLeftAxisPartRef" referenceFrame="wheelLeftAxisPartRef" isActiveDirty="true" scaleZ="true" maxUpdateDistance="75"/>
            <movingPart node="wheelRightAxisPart" referencePoint="wheelRightAxisPartRef" referenceFrame="wheelRightAxisPartRef" isActiveDirty="true" scaleZ="true" maxUpdateDistance="75"/>
        </movingParts>
        <sounds>
            <hydraulic template="defaultHydraulicSound" linkNode="fb130_main_component1"/>
        </sounds>
    </cylindered>

    <cutter fruitTypes="poplar" fruitTypeConverter="forageHarvester">
        <effect>
            <effectNode effectClass="CutterMotionPathEffect" effectType="CUTTER" linkNode="cutterEffectNode">
                <motionPathEffect textureFilename="$data/vehicles/newHolland/fb130/cutterArray4x16.dds" numRows="4" rowLength="16" minFade="0.06" />
            </effectNode>
            <effectNode effectClass="ParticleEffect" effectNode="smokeEmitter" particleType="SMOKE" materialType="smokeParticle" emitCountScale="0.1" worldSpace="false" useCuttingWidth="false"/>
        </effect>

        <animationNodes>
            <animationNode node="drum1" rotSpeed="-500" rotAxis="1" turnOnFadeTime="2" turnOffFadeTime="2"/>
            <animationNode node="drum2" rotSpeed="-600" rotAxis="1" turnOnFadeTime="2" turnOffFadeTime="2"/>
            <animationNode node="drum3" rotSpeed="600" rotAxis="1" turnOnFadeTime="2" turnOffFadeTime="2"/>
            <animationNode node="drum4" rotSpeed="-800" rotAxis="2" turnOnFadeTime="2" turnOffFadeTime="2"/>
            <animationNode node="drum5" rotSpeed="800" rotAxis="2" turnOnFadeTime="2" turnOffFadeTime="2"/>
        </animationNodes>
        <sounds>
            <cut template="cropCuttingForage" />
        </sounds>
    </cutter>

    <turnOnVehicle turnedOnByAttacherVehicle="true" turnOffIfNotAllowed="true">
        <sounds>
            <start template="forageHarvesterStart" />
            <work  template="forageHarvesterWork" fadeOut="3.5"/>
            <stop  template="forageHarvesterStop" pitchScale="2.3" volumeScale="0.3"/>
        </sounds>
    </turnOnVehicle>

    <dynamicMount forceLimitScale="1"/>

    <ai>
        <areaMarkers leftNode="areaLeftMarker" rightNode="areaRightMarker" backNode="areaBackMarker"/>
        <sizeMarkers leftNode="sizeLeftMarker" rightNode="sizeRightMarker" backNode="sizeBackMarker"/>
        <agentAttachment width="3.0" height="1.8" length="3.5" lengthOffset="-0.1"/>
    </ai>

    <foliageBending>
        <bendingNode minX="-1.40" maxX="1.40" minZ="-1.5" maxZ="0.2" yOffset="0.5" />
        <bendingNode minX="-1.10" maxX="1.10" minZ="-0.2" maxZ="1.6" yOffset="1" />
    </foliageBending>

    <baseMaterial>
        <material name="fb130_mat" baseNode="newHolland_vis">
            <shaderParameter name="colorMat0" value="NEWHOLLAND_YELLOW1"/>
            <shaderParameter name="colorMat1" value="NEWHOLLAND_BLACK1"/>
        </material>
    </baseMaterial>

    <wearable wearDuration="480" workMultiplier="5" fieldMultiplier="2"/>
    <washable dirtDuration="90" washDuration="1" workMultiplier="4" fieldMultiplier="2"/>

    <i3dMappings>
        <i3dMapping id="fb130_main_component1" node="0>" />
        <i3dMapping id="newHolland_vis" node="0>0" />
        <i3dMapping id="wheelLeftAxis" node="0>0|0|0|0" />
        <i3dMapping id="wheelLeft" node="0>0|0|0|0|0" />
        <i3dMapping id="wheelLeftAxisPart" node="0>0|0|0|0|1" />
        <i3dMapping id="wheelRightAxis" node="0>0|0|0|1" />
        <i3dMapping id="wheelRight" node="0>0|0|0|1|0" />
        <i3dMapping id="wheelRightAxisPart" node="0>0|0|0|1|1" />
        <i3dMapping id="wheelLeftAxisPartRef" node="0>0|0|0|2" />
        <i3dMapping id="wheelRightAxisPartRef" node="0>0|0|0|3" />
        <i3dMapping id="attacherJoint" node="0>0|1|0" />
        <i3dMapping id="pto" node="0>0|1|1" />
        <i3dMapping id="supportArm" node="0>0|1|2|0|0" />
        <i3dMapping id="colSupport" node="0>0|1|2|1" />
        <i3dMapping id="yellowRound_02" node="0>0|2|0" />
        <i3dMapping id="yellowRound_01" node="0>0|2|1" />
        <i3dMapping id="drum5" node="0>0|3|0|0" />
        <i3dMapping id="drum4" node="0>0|3|1|0" />
        <i3dMapping id="drum1" node="0>0|3|2" />
        <i3dMapping id="drum2" node="0>0|3|3" />
        <i3dMapping id="drum3" node="0>0|3|4" />
        <i3dMapping id="workAreaStart" node="0>0|4|0" />
        <i3dMapping id="workAreaWidth" node="0>0|4|1" />
        <i3dMapping id="workAreaHeight" node="0>0|4|2" />
        <i3dMapping id="groundReferenceNode" node="0>0|4|3" />
        <i3dMapping id="heightNode" node="0>0|4|4" />
        <i3dMapping id="areaLeftMarker" node="0>0|5|0" />
        <i3dMapping id="areaRightMarker" node="0>0|5|1" />
        <i3dMapping id="areaBackMarker" node="0>0|5|2" />
        <i3dMapping id="sizeLeftMarker" node="0>0|5|3" />
        <i3dMapping id="sizeRightMarker" node="0>0|5|4" />
        <i3dMapping id="sizeBackMarker" node="0>0|5|5" />
        <i3dMapping id="cutterEffectNode" node="0>0|6|0" />
        <i3dMapping id="smokeEmitter" node="0>0|6|1" />
    </i3dMappings>
</vehicle>
