﻿<?xml version="1.0" encoding="utf-8" standalone="no" ?>
<vehicle type="attachableCombine">
	<annotation>Copyright (C) GIANTS Software GmbH, All Rights Reserved.</annotation>
    <name>
		<en>Poettinger Mex 6</en>
		<de>Pöttinger Mex 6</de>
    </name>
	<typeDesc>$l10n_TypeDesc_Harvester</typeDesc>
    <filename>data/vehicles/tools/poettinger/poettingerMex6.i3d</filename>

    <size width="4" length="6.5" lengthOffset="-1"/>

    <wheels autoRotateBackSpeed="1.5">
		<wheel driveMode="0" repr="0>0" radius="0.4" deltaY="0" suspTravel="0.05" spring="10" damper="50" mass="0.15" lateralStiffness="2" />
        <wheel driveMode="0" repr="0>1" radius="0.4" deltaY="0" suspTravel="0.05" spring="10" damper="50" mass="0.15" lateralStiffness="2" />
    </wheels>
    <downForce>4</downForce>

	<attacherJoint index="2>0|0" jointType="trailerLow" rootNode="2>" />
	<powerTakeoffInput index="2>0|2" rotSpeed="0" />

	<cuttingAreas count="1">
        <cuttingArea1 startIndex="0>2|0|9" widthIndex="0>2|0|10" heightIndex="0>2|0|11" losing="false" foldMinLimit="0" foldMaxLimit="0.1"/>
    </cuttingAreas>

    <rolls>
		<roll index="0>2|0|0|0" speed="-0.012" />
		<roll index="0>2|0|1|0" speed="0.012" />
		<roll index="0>2|0|2|0" speed="0.03" />
		<roll index="0>2|0|2|1" speed="-0.03" />
		<roll index="0>2|0|4" speed="0.08" />
		<roll index="0>2|0|5" speed="-0.08" />
	</rolls>

    <pipeSound file="data/vehicles/steerable/deutz/hydraulicUp.wav" pitchOffset="1" />
    <threshingStartSound file="data/vehicles/tools/poettingerMex6_start.wav" pitchOffset="1" />
    <threshingSound file="data/vehicles/tools/poettingerMex6_work.wav" pitchOffset="1" pitchScale="0.001" pitchMax="1.2" radius="50" innerRadius="25" />
    <threshingStopSound file="data/vehicles/tools/poettingerMex6_stop.wav" pitchOffset="1" />

    <pipe numStates="2" unloadingStates="0 1 2" raycastNodeIndex="0>2|0|6|0|0|0" raycastDistance="12" autoAimStates="2">
        <node index="0>2|0|6" rotationSpeeds="0 35 0" autoAimYRotation="true" autoAimInvertZ="false">
            <state1 rotation="0 186 0" />
            <state2 rotation="0 0 0"/>
        </node>
        <node index="0>2|0|6|0" rotationSpeeds="25 0 0">
            <state1 rotation="67 0 0"/>
            <state2 rotation="0 0 0"/>
        </node>
        <node index="0>2|0|6|0|0" rotationSpeeds="80 0 0" autoAimXRotation="true">
            <state1 rotation="85 0 0"/>
            <state2 rotation="0 0 0"/>
        </node>
    </pipe>

    <pipeParticleSystems>
        <pipeParticleSystem type="chaff" node="0>2|0|6|0|0|0" file="data/vehicles/particleSystems/chaffParticleSystem.i3d" />
    </pipeParticleSystems>

	<threshingParticleSystem position="-0.55 0.1 1" rotation="0 0 0" file="data/vehicles/particleSystems/threshingCutterMiddlePS.i3d" />

    <grainTankCapacity>0</grainTankCapacity>
    <grainTankUnloadingCapacity>0</grainTankUnloadingCapacity>
    <grainTankFruitTypes fruitTypes="chaff" />
	<fruitTypes fruitTypes="maize"/>
    <convertedFruits>
        <convertedFruit input="maize" output="chaff"/>
    </convertedFruits>

    <combineSize>1</combineSize>
	<preferedCombineSize>1</preferedCombineSize>
    <allowThreshingDuringRain>true</allowThreshingDuringRain>

    <cutterSpeedLimit forceLow="true" low="20" normal="20" />

	<trailerAttacherJoints>
        <trailerAttacherJoint index="0>2|0|13" low="false" maxRotLimit="10 80 80" />
    </trailerAttacherJoints>

    <movingTools>
        <!-- pipe -->
        <movingTool index="0>2|0|6|0" componentJointIndex="2" anchorActor="0">
            <!-- pipe cylinder -->
            <dependentPart index="0>2|0|6|1" />
        </movingTool>
		<movingTool index="0>2|0|6" componentJointIndex="2" anchorActor="0"/>

		<movingTool index="0>2|0|7" componentJointIndex="1" anchorActor="0"/>
		<movingTool index="0>2" componentJointIndex="1 0" attacherJointIndices="0" anchorActor="0"/>
		<movingTool index="0>2|0" componentJointIndex="1 0" attacherJointIndices="0" anchorActor="0"/>

		<movingTool index="2>0|1" componentJointIndex="0" anchorActor="0"/>

        <!-- pipe base -->
        <movingTool index="0>2">
            <!-- pipe -->
            <dependentPart index="0>2|1" />
        </movingTool>
    </movingTools>

    <movingParts>
        <!-- pipe cylinder -->
        <movingPart index="0>2|0|6|1" referencePoint="0>2|0|6|0|1" referenceFrame="0>2|0|6|0|1">
            <translatingPart index="0>2|0|6|1|0" />
        </movingPart>

		<!-- pipe cylinder -->
        <movingPart index="0>2|1" referencePoint="0>2|0|8" referenceFrame="0>2|0|8">
            <translatingPart index="0>2|1|0" />
        </movingPart>
    </movingParts>

    <animations>
		<animation name="moveSupport">
			<part node="2>0|1" startTime="0" endTime="0.5" startTrans="-0.187 -0.0765 -1.767" endTrans="-0.187 -0.42446 -1.767" />
        </animation>

		<animation name="lowerLift">
			<part node="0>2" startTime="0" endTime="1" startRot="0 0 0" endRot="40 0 0" />
			<part node="0>2|0" startTime="0" endTime="1" startRot="0 0 0" endRot="-40 0 0" />
			<part node="0>2|0|7"   startTime="1" endTime="5" startRot="0 25 0" endRot="0 0 0" />
			<part node="0>2|0|3"   startTime="4" endTime="4.5" visibility="false" />
			<part node="0>2|0|3"   startTime="4.5" endTime="5" visibility="true" />
        </animation>
    </animations>

	<foldingParts startMoveDirection="1" foldMiddleAnimTime="0.2">
        <foldingPart animationName="lowerLift" speedScale="1.0" />
    </foldingParts>

    <cutterSpeedLimit low="20" normal="20" forceLow="true" />

	<support animationName="moveSupport" />

    <combineTrailerTriggers>
        <combineTrailerTrigger index="0>3" pipeState="2" />
    </combineTrailerTriggers>

    <components count="4">
        <component1 centerOfMass="0 0 0" solverIterationCount="20" />
        <component2 solverIterationCount="20" />
		<component3 solverIterationCount="20" />
		<component4 solverIterationCount="10" />
		<joint component1="2" component2="1" index="2>0|1" rotLimit="0 0 0" transLimit="0 0 0" />
		<joint component1="0" component2="2" index="0>2|0|7" rotLimit="0 0 0" transLimit="0 0 0" />
        <joint component1="0" component2="3" index="0>2|0|6|0" rotLimit="0 0 0" transLimit="0 0 0" />
    </components>

    <schemaOverlay file="data/vehicles/schemas/implementSchema.png" fileSelected="data/vehicles/schemas/implementSchemaSelected.png" width="0.5" height="0.5" attacherJointPosition="0 0">
        <attacherJoint position="0.5 0" rotation="0" invertX="false" />
    </schemaOverlay>

</vehicle>
