﻿<?xml version="1.0" encoding="utf-8" standalone="no"?>
<vehicle type="mulcher" 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>TJP 610</name>
        <specs>
            <neededPower>200</neededPower>
            <workingWidth>6</workingWidth>
            <combination filterCategory="weights" filterSpec="weight" filterSpecMin="1500" filterSpecMax="1600"/>
        </specs>
        <functions>
            <function>$l10n_function_mulcher</function>
        </functions>
        <image>$data/vehicles/tmcCancela/tjp610/store_tjp610.png</image>
        <price>25500</price>
        <lifetime>600</lifetime>
        <rotation>0</rotation>
        <brand>TMCCANCELA</brand>
        <category>mulchers</category>
        <shopTranslationOffset>0 0.015 0</shopTranslationOffset>
        <shopRotationOffset>0.876 0 0</shopRotationOffset>
        <vertexBufferMemoryUsage>2240768</vertexBufferMemoryUsage>
        <indexBufferMemoryUsage>327168</indexBufferMemoryUsage>
        <textureMemoryUsage>2228224</textureMemoryUsage>
        <instanceVertexBufferMemoryUsage>0</instanceVertexBufferMemoryUsage>
        <instanceIndexBufferMemoryUsage>0</instanceIndexBufferMemoryUsage>
        <audioMemoryUsage>0</audioMemoryUsage>
    </storeData>

    <base>
        <typeDesc>$l10n_typeDesc_mulcher</typeDesc>
        <filename>$data/vehicles/tmcCancela/tjp610/tjp610.i3d</filename>
        <size width="7.5" length="3.2"/>
        <speedLimit value="12"/>
        <components>
            <component centerOfMass="0 0.4 0" solverIterationCount="15" mass="3860"/>
        </components>
        <schemaOverlay attacherJointPosition="0 0" name="IMPLEMENT" />
        <mapHotspot type="TOOL" />
    </base>

    <wheels>
        <wheelConfigurations>
            <wheelConfiguration name="$l10n_configuration_valueDefault">
                <wheels>
                    <wheel filename="$data/shared/wheels/tires/trelleborg/AW305/10_80R12.xml" isLeft="false" hasTireTracks="true" hasParticles="true" versatileFoldMaxLimit="0.01">
                        <physics restLoad="0.5" repr="leftArmWheel01Repr" driveNode="leftArmWheel01DriveNode" forcePointRatio="0.3" initialCompression="50" suspTravel="0.1" spring="15" damper="20" yOffset="0.03" versatileYRot="true" rotMin="-32" rotMax="90"/>
                    </wheel>
                    <wheel filename="$data/shared/wheels/tires/trelleborg/AW305/10_80R12.xml" isLeft="false" hasTireTracks="true" hasParticles="true" versatileFoldMaxLimit="0.01">
                        <physics restLoad="0.5" repr="leftArmWheel02Repr" driveNode="leftArmWheel02DriveNode" forcePointRatio="0.3" initialCompression="50" suspTravel="0.1" spring="15" damper="20" yOffset="0.03" versatileYRot="true" rotMin="-32" rotMax="90"/>
                    </wheel>
                    <wheel filename="$data/shared/wheels/tires/trelleborg/AW305/10_80R12.xml" isLeft="true" hasTireTracks="true" hasParticles="true" versatileFoldMaxLimit="0.01">
                        <physics restLoad="0.5" repr="rightArmWheel01Repr" driveNode="rightArmWheel01DriveNode" forcePointRatio="0.3" initialCompression="50" suspTravel="0.1" spring="15" damper="20" yOffset="0.03" versatileYRot="true" rotMin="-90" rotMax="32"/>
                    </wheel>
                    <wheel filename="$data/shared/wheels/tires/trelleborg/AW305/10_80R12.xml" isLeft="true" hasTireTracks="true" hasParticles="true" versatileFoldMaxLimit="0.01">
                        <physics restLoad="0.5" repr="rightArmWheel02Repr" driveNode="rightArmWheel02DriveNode" forcePointRatio="0.3" initialCompression="50" suspTravel="0.1" spring="15" damper="20" yOffset="0.03" versatileYRot="true" rotMin="-90" rotMax="32"/>
                    </wheel>
                </wheels>
            </wheelConfiguration>
        </wheelConfigurations>

        <hubs>
            <color0>TMCCANCELA_ORANGE</color0>
            <color1>SHARED_GREY3</color1>
            <hub linkNode="leftArmWheel01DriveNode"  filename="$data/shared/wheels/hubs/hub_n6_1.xml" isLeft="false" scale="0.1 0.15 0.15" />
            <hub linkNode="leftArmWheel02DriveNode"  filename="$data/shared/wheels/hubs/hub_n6_1.xml" isLeft="false" scale="0.1 0.15 0.15" />
            <hub linkNode="rightArmWheel01DriveNode" filename="$data/shared/wheels/hubs/hub_n6_1.xml" isLeft="true"  scale="0.1 0.15 0.15" />
            <hub linkNode="rightArmWheel02DriveNode" filename="$data/shared/wheels/hubs/hub_n6_1.xml" isLeft="true"  scale="0.1 0.15 0.15" />
        </hubs>
    </wheels>

    <attachable>
        <inputAttacherJoints>
            <inputAttacherJoint node="attacherJoint" jointType="implement" topReferenceNode="topReferenceNode" lowerRotLimitScale="0 0 0.4" upperRotLimitScale="0 0 0" lowerTransLimitScale="0 0 0" allowsLowering="true">
                <distanceToGround lower="0.5" upper="1.1"/>
            </inputAttacherJoint>
        </inputAttacherJoints>
        <support animationName="moveSupport"/>
    </attachable>

    <connectionHoses>
        <hose inputAttacherJointIndices="1" type="electric"  node="electricHose"  length="1.2" diameter="0.01" straighteningFactor="0.5">
            <objectChange node="electricPlug" visibilityActive="true" visibilityInactive="false"/>
            <objectChange node="electricSocketCap" rotationActive="0 0 0" rotationInactive="-90 0 0"/>
        </hose>

        <hose inputAttacherJointIndices="1" type="hydraulicIn"  node="hydraulicInHose"  length="1.2" diameter="0.015" straighteningFactor="0.5">
            <objectChange node="hydraulicInSocketDetached" visibilityActive="false" visibilityInactive="true"/>
            <objectChange node="hydraulicInSocketAttached" visibilityActive="true" visibilityInactive="false"/>
        </hose>
        <hose inputAttacherJointIndices="1" type="hydraulicOut" node="hydraulicOutHose" length="1.2" diameter="0.015" straighteningFactor="0.5">
            <objectChange node="hydraulicOutSocketDetached" visibilityActive="false" visibilityInactive="true"/>
            <objectChange node="hydraulicOutSocketAttached" visibilityActive="true" visibilityInactive="false"/>
        </hose>
    </connectionHoses>

    <powerTakeOffs>
        <input inputAttacherJointIndices="1" inputNode="ptoInputNode" aboveAttacher="true" />
    </powerTakeOffs>

    <powerConsumer forceNode="tjp610_main_component1" ptoRpm="540" neededMaxPtoPower="55"/>

    <lights>
        <realLights>
            <high>
                <light node="backLightsHigh" lightTypes="0" />
                <turnLightLeft node="turnLightLeftBack" />
                <turnLightRight node="turnLightRightBack" />
                <brakeLight node="backLightsHigh" />
            </high>
        </realLights>

        <defaultLights>
            <defaultLight shaderNode="backLightsStatic" lightTypes="0" />
        </defaultLights>

        <turnLights>
            <turnLightLeft  shaderNode="turnLightLeftStatic" />
            <turnLightRight shaderNode="turnLightRightStatic" />
        </turnLights>

        <brakeLights>
            <brakeLight shaderNode="backLightsStatic" />
        </brakeLights>
    </lights>

    <groundReferenceNodes>
        <groundReferenceNode node="groundReferenceNode" forceFactor="1" threshold="0.1" />
    </groundReferenceNodes>

    <workAreas>
        <workArea type="mulcher" functionName="processMulcherArea" >
            <area startNode="workArea01Start" widthNode="workArea01Width" heightNode="workArea01Height"/>
            <groundReferenceNode index="1"/>
            <onlyActiveWhenLowered value="true"/>
        </workArea>
        <workArea type="mulcher" functionName="processMulcherArea" >
            <area startNode="workArea02Start" widthNode="workArea02Width" heightNode="workArea02Height"/>
            <groundReferenceNode index="1"/>
            <onlyActiveWhenLowered value="true"/>
        </workArea>
    </workAreas>

    <mulcher>
        <effects>
            <effect workAreaIndex="1">
                <effectNode effectClass="TypedMotionPathEffect" effectType="MULCHER" linkNode="mulcherEffectNodeLeft">
                    <motionPathEffect textureFilename="$data/vehicles/tmcCancela/tjp610/mulcherEffectArray.dds" numRows="16" rowLength="18" minFade="0.15" />
                </effectNode>
                <effectNode effectNode="smokeEmitterLeft" effectClass="ParticleEffect" particleType="smoke" materialType="smokeParticle" worldSpace="false" emitCountScale="0.1"/>
            </effect>
            <effect workAreaIndex="2">
                <effectNode effectClass="TypedMotionPathEffect" effectType="MULCHER" linkNode="mulcherEffectNodeRight">
                    <motionPathEffect textureFilename="$data/vehicles/tmcCancela/tjp610/mulcherEffectArray.dds" numRows="16" rowLength="18" minFade="0.15" />
                </effectNode>
                <effectNode effectNode="smokeEmitterRight" effectClass="ParticleEffect" particleType="smoke" materialType="smokeParticle" worldSpace="false" emitCountScale="0.1"/>
            </effect>
        </effects>
        <sounds>
            <work template="crushingStubbles" linkNode="tjp610_main_component1" />
        </sounds>
    </mulcher>

    <foldable>
        <foldingConfigurations>
            <foldingConfiguration>
                <foldingParts startMoveDirection="0" turnOnFoldMaxLimit="0.1" turnOnFoldDirection="-1">
                    <foldingPart animationName="folding" speedScale="0.6"/>
                </foldingParts>
            </foldingConfiguration>
        </foldingConfigurations>
    </foldable>

    <animations>
        <animation name="folding">
            <part node="leftArm" startTime="0.3" endTime="4.464"  startRot="0.0 0.0 0.0" endRot="0.0 0.0 90.0" />
            <part node="rightArm" startTime="0.0" endTime="4.164"  startRot="0.0 0.0 0.0" endRot="0.0 0.0 -90.0" />
            <part node="lockArmLeft" startTime="2.232" endTime="2.857"  startRot="0.0 0.0 0.0" endRot="0.0 0.0 20.0" />
            <part node="lockArmLeft" startTime="4.464" endTime="5.0"  startRot="0.0 0.0 20.0" endRot="0.0 0.0 0.0" />
            <part node="lockArmRight" startTime="2.232" endTime="2.857"  startRot="0.0 0.0 0.0" endRot="0.0 0.0 -20.0" />
            <part node="lockArmRight" startTime="4.464" endTime="5.0"  startRot="0.0 0.0 -20.0" endRot="0.0 0.0 0.0" />

            <part wheelIndex="1" direction="1" startTime="0" endTime="1.5" startSteeringAngle="0" endSteeringAngle="90"/>
            <part wheelIndex="2" direction="1" startTime="0" endTime="2.0" startSteeringAngle="0" endSteeringAngle="90"/>
            <part wheelIndex="3" direction="1" startTime="0" endTime="1.5" startSteeringAngle="0" endSteeringAngle="-90"/>
            <part wheelIndex="4" direction="1" startTime="0" endTime="2.0" startSteeringAngle="0" endSteeringAngle="-90"/>

            <sound template="defaultHydraulicSound" startTime="0.01" endTime="4.464"   volumeScale="1.5" pitchScale="0.8" />
            <sound template="defaultHydraulicSound" startTime="0.3"  endTime="4.164"   volumeScale="1.5" pitchScale="1" />
            <sound template="foldStartMed01"        startTime="4.6"  direction="-1"    volumeScale="1.5" pitchScale="0.8" />
            <sound template="foldStartMed02"        startTime="4.2"  direction="-1"    volumeScale="1.7" pitchScale="0.8" />
            <sound template="foldStopSm02"          startTime="0.1"  direction="-1"    volumeScale="1"   pitchScale="0.8" />
            <sound template="clackVar6"             startTime="0.4"  direction="-1"    volumeScale="1"   pitchScale="0.7" />
            <sound template="sheetImp02"            startTime="0.4"                    volumeScale="1.4" pitchScale="0.7" />
            <sound template="foldStartMed02"        startTime="0.01" direction="1"     volumeScale="2"   pitchScale="0.8" />
            <sound template="foldStopSm01"          startTime="4.3"  direction="1"     volumeScale="1.5" pitchScale="0.6" />
            <sound template="foldStopSm02"          startTime="4"    direction="1"     volumeScale="1.2" pitchScale="0.6" />
        </animation>

        <animation name="moveSupport">
            <part node="rightSupport" startTime="0" endTime="0.5" startTrans="0 0.44 0" endTrans="0 0 0"/>
            <part node="leftSupport"  startTime="0" endTime="0.5" startTrans="0 0.44 0" endTrans="0 0 0"/>

            <sound template="clackVar5"  startTime="0.49" volumeScale="1.5" pitchScale="1.2" linkNode="attacherJoint"/>
            <sound template="latchSmall" startTime="0.49" volumeScale="0.5" pitchScale="1.6" linkNode="attacherJoint"/>
            <sound template="clackVar1"  startTime="0.2"  volumeScale="1.5" pitchScale="1.6" linkNode="attacherJoint"/>
        </animation>
    </animations>

    <cylindered>
        <movingTools>
            <movingTool node="leftArm" playSound="true" wheelIndices="1 2">
                <dependentPart node="leftArmHydraulic"/>
                <dependentPart node="leftPto"/>
            </movingTool>
            <movingTool node="rightArm" playSound="true" wheelIndices="3 4">
                <dependentPart node="rightArmHydraulic"/>
                <dependentPart node="rightPto"/>
            </movingTool>
            <movingTool node="lockArmLeft" playSound="true">
                <dependentPart node="lockArmLeftHydraulic"/>
            </movingTool>
            <movingTool node="lockArmRight" playSound="true">
                <dependentPart node="lockArmRightHydraulic"/>
            </movingTool>
        </movingTools>

        <movingParts>
            <movingPart node="leftArmHydraulic" referencePoint="leftArmHydraulicRef" referenceFrame="leftArmHydraulicRef">
                <translatingPart node="leftArmHydraulicPunch" />
            </movingPart>
            <movingPart node="rightArmHydraulic" referencePoint="rightArmHydraulicRef" referenceFrame="rightArmHydraulicRef">
                <translatingPart node="rightArmHydraulicPunch" />
            </movingPart>
            <movingPart node="lockArmLeftHydraulic" referencePoint="lockArmLeftHydraulicRef" referenceFrame="lockArmLeftHydraulicRef">
                <translatingPart node="lockArmLeftHydraulicPunch" />
            </movingPart>
            <movingPart node="lockArmRightHydraulic" referencePoint="lockArmRightHydraulicRef" referenceFrame="lockArmRightHydraulicRef">
                <translatingPart node="lockArmRightHydraulicPunch" />
            </movingPart>

            <movingPart node="leftPto" referencePoint="leftPtoRef" referenceFrame="leftPtoRef"/>
            <movingPart node="rightPto" referencePoint="rightPtoRef" referenceFrame="rightPtoRef"/>
        </movingParts>
    </cylindered>

    <turnOnVehicle turnOffIfNotAllowed="true">
        <animationNodes>
            <animationNode node="rightRotatingPart" rotSpeed="-2500" rotAxis="1" turnOnFadeTime="2" turnOffFadeTime="8" />
            <animationNode node="leftRotatingPart"  rotSpeed="-2500" rotAxis="1" turnOnFadeTime="2" turnOffFadeTime="8" />
        </animationNodes>

        <sounds>
            <start template="mulcherStart" />
            <work template="mulcherLoop" />
            <stop template="mulcherStop" />
        </sounds>
    </turnOnVehicle>

    <ai>
        <needsLowering value="true"/>
        <areaMarkers leftNode="aiMarkerLeft" rightNode="aiMarkerRight" backNode="aiMarkerBack"/>
        <collisionTrigger node="aiCollisionNode" width="6.6" height="1.6"/>
        <agentAttachment width="2.5" height="3.8" length="2.2" lengthOffset="0.05"/>
    </ai>

    <foliageBending>
        <bendingNode minX="-1.2" maxX="1.2" minZ="-0.6" maxZ="1" yOffset="0.4" />
        <bendingNode minX="-0.4" maxX="2.9" minZ="-1.5" maxZ="0.15" yOffset="-0.55" node="leftArm"/>
        <bendingNode minX="-2.9" maxX="0.4" minZ="-1.5" maxZ="0.15" yOffset="-0.55" node="rightArm"/>
    </foliageBending>

    <baseMaterial>
        <material name="tjp610_mat" baseNode="tjp610_vis">
            <shaderParameter name="colorMat0" value="TMCCANCELA_ORANGE"/>
        </material>
    </baseMaterial>

    <wearable wearDuration="480" workMultiplier="5" fieldMultiplier="2"/>
    <washable dirtDuration="90" washDuration="1" workMultiplier="6" fieldMultiplier="2"/>

    <i3dMappings>
        <i3dMapping id="tjp610_main_component1" node="0>" />
        <i3dMapping id="tjp610_vis" node="0>0" />
        <i3dMapping id="attacherJoint" node="0>0|0|0" />
        <i3dMapping id="topReferenceNode" node="0>0|0|1" />
        <i3dMapping id="ptoInputNode" node="0>0|0|2" />
        <i3dMapping id="rightSupport" node="0>0|0|3|0|0" />
        <i3dMapping id="leftSupport" node="0>0|0|3|1|0" />
        <i3dMapping id="electricSocketCap" node="0>0|0|4|0|0" />
        <i3dMapping id="electricPlug" node="0>0|0|4|0|2" />
        <i3dMapping id="electricHose" node="0>0|0|4|0|2|0" />
        <i3dMapping id="hydraulicInSocketDetached" node="0>0|0|4|1|0" />
        <i3dMapping id="hydraulicInSocketAttached" node="0>0|0|4|1|1" />
        <i3dMapping id="hydraulicInHose" node="0>0|0|4|1|1|0|0" />
        <i3dMapping id="hydraulicOutSocketDetached" node="0>0|0|4|2|0" />
        <i3dMapping id="hydraulicOutSocketAttached" node="0>0|0|4|2|1" />
        <i3dMapping id="hydraulicOutHose" node="0>0|0|4|2|1|0|0" />
        <i3dMapping id="backLightsStatic" node="0>0|1|0|0" />
        <i3dMapping id="turnLightLeftStatic" node="0>0|1|0|1" />
        <i3dMapping id="turnLightRightStatic" node="0>0|1|0|2" />
        <i3dMapping id="backLightsHigh" node="0>0|1|1|0" />
        <i3dMapping id="turnLightLeftBack" node="0>0|1|2|0" />
        <i3dMapping id="turnLightRightBack" node="0>0|1|2|1" />
        <i3dMapping id="leftArm" node="0>0|2|0" />
        <i3dMapping id="leftRotatingPart" node="0>0|2|0|0" />
        <i3dMapping id="leftPto" node="0>0|2|0|1" />
        <i3dMapping id="leftArmWheel01Repr" node="0>0|2|0|2" />
        <i3dMapping id="leftArmWheel01DriveNode" node="0>0|2|0|2|0" />
        <i3dMapping id="leftArmWheel02Repr" node="0>0|2|0|3" />
        <i3dMapping id="leftArmWheel02DriveNode" node="0>0|2|0|3|0" />
        <i3dMapping id="mulcherEffectNodeLeft" node="0>0|2|0|4|0" />
        <i3dMapping id="smokeEmitterLeft" node="0>0|2|0|4|1" />
        <i3dMapping id="leftArmHydraulicRef" node="0>0|2|0|5" />
        <i3dMapping id="leftArmHydraulic" node="0>0|2|1" />
        <i3dMapping id="leftArmHydraulicPunch" node="0>0|2|1|0" />
        <i3dMapping id="rightArm" node="0>0|2|2" />
        <i3dMapping id="rightRotatingPart" node="0>0|2|2|0" />
        <i3dMapping id="rightPto" node="0>0|2|2|1" />
        <i3dMapping id="rightArmWheel01Repr" node="0>0|2|2|2" />
        <i3dMapping id="rightArmWheel01DriveNode" node="0>0|2|2|2|0" />
        <i3dMapping id="rightArmWheel02Repr" node="0>0|2|2|3" />
        <i3dMapping id="rightArmWheel02DriveNode" node="0>0|2|2|3|0" />
        <i3dMapping id="mulcherEffectNodeRight" node="0>0|2|2|4|0" />
        <i3dMapping id="smokeEmitterRight" node="0>0|2|2|4|1" />
        <i3dMapping id="rightArmHydraulicRef" node="0>0|2|2|5" />
        <i3dMapping id="rightArmHydraulic" node="0>0|2|3" />
        <i3dMapping id="rightArmHydraulicPunch" node="0>0|2|3|0" />
        <i3dMapping id="lockArmLeft" node="0>0|2|4" />
        <i3dMapping id="lockArmLeftHydraulicRef" node="0>0|2|4|1" />
        <i3dMapping id="lockArmLeftHydraulic" node="0>0|2|5" />
        <i3dMapping id="lockArmLeftHydraulicPunch" node="0>0|2|5|0" />
        <i3dMapping id="lockArmRight" node="0>0|2|6" />
        <i3dMapping id="lockArmRightHydraulicRef" node="0>0|2|6|1" />
        <i3dMapping id="lockArmRightHydraulic" node="0>0|2|7" />
        <i3dMapping id="lockArmRightHydraulicPunch" node="0>0|2|7|0" />
        <i3dMapping id="leftPtoRef" node="0>0|2|8" />
        <i3dMapping id="rightPtoRef" node="0>0|2|9" />
        <i3dMapping id="groundReferenceNode" node="0>0|3|0" />
        <i3dMapping id="workArea01Start" node="0>0|3|1|0" />
        <i3dMapping id="workArea01Width" node="0>0|3|1|1" />
        <i3dMapping id="workArea01Height" node="0>0|3|1|2" />
        <i3dMapping id="workArea02Start" node="0>0|3|2|0" />
        <i3dMapping id="workArea02Width" node="0>0|3|2|1" />
        <i3dMapping id="workArea02Height" node="0>0|3|2|2" />
        <i3dMapping id="aiMarkerLeft" node="0>0|4|0|0" />
        <i3dMapping id="aiMarkerRight" node="0>0|4|0|1" />
        <i3dMapping id="aiMarkerBack" node="0>0|4|0|2" />
        <i3dMapping id="aiCollisionNode" node="0>0|4|1" />
    </i3dMappings>
</vehicle>
