﻿<?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>Corn Champion 5R</name>
        <specs>
            <workingWidth>3.4</workingWidth>
            <combination xmlFilename="$data/vehicles/rostselmash/nova330/nova330.xml"/>
            <combination xmlFilename="$data/vehicles/nardi/n20T/n20T.xml"/>
        </specs>
        <functions>
            <function>$l10n_function_cutter</function>
        </functions>
        <image>$data/vehicles/ziegler/cornChampion5R/store_cornChampion5R.png</image>
        <price>19000</price>
        <lifetime>600</lifetime>
        <rotation>0</rotation>
        <brand>ZIEGLER</brand>
        <category>cornHeaders</category>
        <shopTranslationOffset>0 -0.075 0</shopTranslationOffset>
        <shopRotationOffset>3.24 0 0</shopRotationOffset>
        <vertexBufferMemoryUsage>1020928</vertexBufferMemoryUsage>
        <indexBufferMemoryUsage>155648</indexBufferMemoryUsage>
        <textureMemoryUsage>1638400</textureMemoryUsage>
        <instanceVertexBufferMemoryUsage>0</instanceVertexBufferMemoryUsage>
        <instanceIndexBufferMemoryUsage>0</instanceIndexBufferMemoryUsage>
        <audioMemoryUsage>0</audioMemoryUsage>
    </storeData>

    <base>
        <typeDesc>$l10n_typeDesc_cutter</typeDesc>
        <filename>$data/vehicles/ziegler/cornChampion5R/cornChampion5R.i3d</filename>
        <size width="4.5" length="3.5" lengthOffset="-0.1" />
        <speedLimit value="10" />
        <components>
            <component centerOfMass="0 0.2 -0.2" solverIterationCount="10" mass="1650" />
        </components>
        <schemaOverlay attacherJointPosition="0 0" name="COMBINE_HEADER" />
        <mapHotspot type="CUTTER" />
    </base>

    <powerConsumer ptoRpm="540" neededMaxPtoPower="35"/>

    <attachable>
        <inputAttacherJoints>
            <inputAttacherJoint node="attacherJoint" jointType="cutter" >
                <heightNode node="heightNode" />
                <distanceToGround lower="0.3" upper="1.8" />
            </inputAttacherJoint>
        </inputAttacherJoints>
        <support animationName="moveSupport" />
    </attachable>

    <powerTakeOffs>
        <input inputNode="ptoInputNode" inputAttacherJointIndices="1" aboveAttacher="true" ptoName="LEFT_PTO"/>
    </powerTakeOffs>

    <groundReferenceNodes>
        <groundReferenceNode node="heightNode" threshold="0.3" />
    </groundReferenceNodes>

    <workAreas>
        <workArea type="cutter" functionName="processCutterArea" >
            <area startNode="workAreaStart" widthNode="workAreaWidth" heightNode="workAreaHeight" />
            <groundReferenceNode index="1" />
            <chopperArea index="2" />
            <testAreas autoGenerate="true" zOffset="0.5" xOffset="0" length="0.6" numAreas="5" areaWidthScale="0.25"/>
        </workArea>
        <workArea type="auxiliary" >
            <area startNode="chopperAreaStart" widthNode="chopperAreaWidth" heightNode="chopperAreaHeight" />
        </workArea>
    </workAreas>

    <animations>
        <animation name="moveSupport">
            <part node="supportArm" startTime="0.0" endTime="0.5" startTrans="0 0.175 -1.176" endTrans="0 0 -1.176" />

            <sound template="metalClose"  startTime="0.01" direction="-1" volumeScale="0.7" pitchScale="2.8"/>
            <sound template="metalClose"  startTime="0.19" direction="1" volumeScale="0.7" pitchScale="2.8"/>
            <sound template="clackVar1"   startTime="0.1" direction="1"  volumeScale="1.3" pitchScale="1.8"/>
            <sound template="clackVar1"   startTime="0.19" direction="-1"  volumeScale="1.3" pitchScale="1.8"/>
        </animation>
    </animations>

    <cutter fruitTypeCategories="maizeHeader" strawRatio="0.1">
        <effect>
            <effectNode effectClass="CutterMotionPathEffect" effectType="CUTTER" linkNode="effectNodePlant" offset="0.2" widthScale="0.8">
                <motionPathEffect textureFilename="$data/vehicles/ziegler/cornChampion5R/plantArray.dds" numRows="6" rowLength="8" minFade="0.19" />
            </effectNode>
            <effectNode effectClass="CutterMotionPathEffect" effectType="CUTTER_FRUITS" linkNode="effectNodeFruit" offset="0.2" widthScale="0.8">
                <motionPathEffect textureFilename="$data/vehicles/ziegler/cornChampion5R/fruitArray.dds" numRows="6" rowLength="18" speedScale="0.23" verticalOffset="0" minFade="0.09" startDelay="0.4" stopDelay="0.6" />
            </effectNode>
            <effectNode effectClass="CutterMotionPathEffect" effectType="CUTTER_THRESHING" linkNode="effectNodeThreshing" offset="0.2" widthScale="0.8">
                <motionPathEffect textureFilename="$data/vehicles/ziegler/cornChampion5R/threshingArray.dds" numRows="6" rowLength="10" verticalOffset="0" minFade="0.15" startDelay="0.2" stopDelay="0.6"/>
            </effectNode>
            <effectNode effectClass="ParticleEffect" effectNode="smokeEmitter" particleType="SMOKE" materialType="smokeParticle" emitCountScale="0.1" worldSpace="false" useCuttingWidth="false"/>
        </effect>

        <animationNodes>
            <animationNode node="mainDrum" rotAxis="1" rotSpeed="800"  turnOnFadeTime="2" turnOffFadeTime="2"/>
            <animationNode node="cutter1"  rotAxis="2" rotSpeed="-2200" turnOnFadeTime="2" turnOffFadeTime="2"/>
            <animationNode node="cutter2"  rotAxis="2" rotSpeed="-2200" turnOnFadeTime="2" turnOffFadeTime="2"/>
            <animationNode node="cutter3"  rotAxis="2" rotSpeed="-2200" turnOnFadeTime="2" turnOffFadeTime="2"/>
            <animationNode node="cutter4"  rotAxis="2" rotSpeed="-2200" turnOnFadeTime="2" turnOffFadeTime="2"/>
            <animationNode node="cutter5"  rotAxis="2" rotSpeed="-2200" turnOnFadeTime="2" turnOffFadeTime="2"/>
            <animationNode node="drum1"    rotAxis="3" rotSpeed="1200" turnOnFadeTime="2" turnOffFadeTime="2"/>
            <animationNode node="drum2"    rotAxis="3" rotSpeed="-1200" turnOnFadeTime="2" turnOffFadeTime="2"/>
            <animationNode node="drum3"    rotAxis="3" rotSpeed="1200"  turnOnFadeTime="2" turnOffFadeTime="2"/>
            <animationNode node="drum4"    rotAxis="3" rotSpeed="-1200" turnOnFadeTime="2" turnOffFadeTime="2"/>
            <animationNode node="drum5"    rotAxis="3" rotSpeed="1200"  turnOnFadeTime="2" turnOffFadeTime="2"/>
            <animationNode node="drum6"    rotAxis="3" rotSpeed="-1200" turnOnFadeTime="2" turnOffFadeTime="2"/>
            <animationNode node="drum7"    rotAxis="3" rotSpeed="1200"  turnOnFadeTime="2" turnOffFadeTime="2"/>
            <animationNode node="drum8"    rotAxis="3" rotSpeed="-1200" turnOnFadeTime="2" turnOffFadeTime="2"/>
            <animationNode node="drum9"    rotAxis="3" rotSpeed="1200"  turnOnFadeTime="2" turnOffFadeTime="2"/>
            <animationNode node="drum10"   rotAxis="3" rotSpeed="-1200" turnOnFadeTime="2" turnOffFadeTime="2"/>
            <animationNode class="ScrollingAnimation" node="chain1" scrollSpeed="1.75" turnOnFadeTime="2" turnOffFadeTime="2" />
            <animationNode class="ScrollingAnimation" node="chain2" scrollSpeed="1.75" turnOnFadeTime="2" turnOffFadeTime="2" />
        </animationNodes>
        <sounds>
            <cut template="cropCutting" />
        </sounds>
    </cutter>

    <turnOnVehicle turnedOnByAttacherVehicle="true">
        <sounds>
            <start template="forageHarvesterStart" volumeScale="0.7"/>
            <work  template="forageHarvesterWork"  pitchScale="0.8" fadeOut="1.5"/>
        </sounds>
    </turnOnVehicle>

    <ai>
        <areaMarkers leftNode="aiMarkerLeft" rightNode="aiMarkerRight" backNode="aiMarkerBack" />
        <sizeMarkers leftNode="sizeMarkerLeft" rightNode="sizeMarkerRight" backNode="sizeMarkerBack" />
        <collisionTrigger node="aiCollisionNode" width="4.0" height="1.7"/>
        <agentAttachment width="3.8" height="2.2" length="2.8" lengthOffset="-0.1"/>
    </ai>

    <dynamicMount forceLimitScale="1" />

    <baseMaterial>
        <material name="cornChampion5R_mat" baseNode="ziegler_vis">
            <shaderParameter name="colorMat0" value="ZIEGLER_RED"/>
            <shaderParameter name="colorMat2" value="ZIEGLER_YELLOW"/>
        </material>
    </baseMaterial>

    <foliageBending>
        <bendingNode minX="-1.85" maxX="1.95" minZ="-1.2" maxZ="0.5" yOffset="0.2" />
    </foliageBending>

    <wearable wearDuration="480" workMultiplier="5" fieldMultiplier="2"/>
    <washable dirtDuration="90" washDuration="1" workMultiplier="4" fieldMultiplier="2"/>

    <i3dMappings>
        <i3dMapping id="cornChampion5R_main_component1" node="0>" />
        <i3dMapping id="ziegler_vis" node="0>0" />
        <i3dMapping id="attacherJoint" node="0>0|0" />
        <i3dMapping id="heightNode" node="0>0|0|0" />
        <i3dMapping id="ptoInputNode" node="0>0|1" />
        <i3dMapping id="supportArm" node="0>0|2" />
        <i3dMapping id="mainDrum" node="0>0|3|0" />
        <i3dMapping id="cutter1" node="0>0|3|1|0" />
        <i3dMapping id="cutter2" node="0>0|3|1|1" />
        <i3dMapping id="cutter3" node="0>0|3|1|2" />
        <i3dMapping id="cutter4" node="0>0|3|1|3" />
        <i3dMapping id="cutter5" node="0>0|3|1|4" />
        <i3dMapping id="drum1" node="0>0|3|2|0" />
        <i3dMapping id="drum2" node="0>0|3|2|1" />
        <i3dMapping id="drum3" node="0>0|3|2|2" />
        <i3dMapping id="drum4" node="0>0|3|2|3" />
        <i3dMapping id="drum5" node="0>0|3|2|4" />
        <i3dMapping id="drum6" node="0>0|3|2|5" />
        <i3dMapping id="drum7" node="0>0|3|2|6" />
        <i3dMapping id="drum8" node="0>0|3|2|7" />
        <i3dMapping id="drum9" node="0>0|3|2|8" />
        <i3dMapping id="drum10" node="0>0|3|2|9" />
        <i3dMapping id="chain1" node="0>0|4|0" />
        <i3dMapping id="chain2" node="0>0|4|1" />
        <i3dMapping id="workAreaStart" node="0>0|5|0" />
        <i3dMapping id="workAreaWidth" node="0>0|5|1" />
        <i3dMapping id="workAreaHeight" node="0>0|5|2" />
        <i3dMapping id="groundReferenceNode" node="0>0|5|3" />
        <i3dMapping id="chopperAreaStart" node="0>0|5|4" />
        <i3dMapping id="chopperAreaWidth" node="0>0|5|5" />
        <i3dMapping id="chopperAreaHeight" node="0>0|5|6" />
        <i3dMapping id="effectNodePlant" node="0>0|6|0|0" />
        <i3dMapping id="effectNodeFruit" node="0>0|6|0|1" />
        <i3dMapping id="effectNodeThreshing" node="0>0|6|0|2" />
        <i3dMapping id="smokeEmitter" node="0>0|6|1" />
        <i3dMapping id="aiMarkerLeft" node="0>0|7|0|0" />
        <i3dMapping id="aiMarkerRight" node="0>0|7|0|1" />
        <i3dMapping id="aiMarkerBack" node="0>0|7|0|2" />
        <i3dMapping id="sizeMarkerLeft" node="0>0|7|1|0" />
        <i3dMapping id="sizeMarkerRight" node="0>0|7|1|1" />
        <i3dMapping id="sizeMarkerBack" node="0>0|7|1|2" />
        <i3dMapping id="aiCollisionNode" node="0>0|7|2" />
    </i3dMappings>
</vehicle>
