﻿<?xml version="1.0" encoding="utf-8" standalone="no" ?>
<vehicle type="dynamicMountAttacherTrailer" 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 params="$l10n_storeItem_headerTrailer">XDisc 620 %s</name>
        <specs>
            <combination xmlFilename="$data/vehicles/krone/xDisc620/xDisc620.xml"/>
        </specs>
        <functions>
            <function>$l10n_function_cutterTrailer</function>
        </functions>
        <image>$data/vehicles/krone/xDisc620Trailer/store_xDisc620Trailer.png</image>
        <price>3000</price>
        <lifetime>600</lifetime>
        <rotation>0</rotation>
        <brand>KRONE</brand>
        <category>cutterTrailers</category>
        <shopTranslationOffset>0 0.039 0</shopTranslationOffset>
        <shopRotationOffset>0.033 0 0</shopRotationOffset>
        <vertexBufferMemoryUsage>628480</vertexBufferMemoryUsage>
        <indexBufferMemoryUsage>98560</indexBufferMemoryUsage>
        <textureMemoryUsage>655360</textureMemoryUsage>
        <instanceVertexBufferMemoryUsage>0</instanceVertexBufferMemoryUsage>
        <instanceIndexBufferMemoryUsage>0</instanceIndexBufferMemoryUsage>
        <audioMemoryUsage>0</audioMemoryUsage>
    </storeData>

    <base>
        <typeDesc>$l10n_typeDesc_cutterTrailer</typeDesc>
        <filename>$data/vehicles/krone/xDisc620Trailer/xDisc620Trailer.i3d</filename>
        <size width="3.0" length="11" lengthOffset="0.5"/>
        <components>
            <component centerOfMass="0 0.45 0" solverIterationCount="10" mass="700"/>
            <component centerOfMass="0 0 0" solverIterationCount="20" mass="700"/>
            <component centerOfMass="0 0 0" solverIterationCount="10" mass="300"/>
            <joint component1="1" component2="2" node="componentJoint" rotLimit="0 100 0" transLimit="0 0 0"/>
            <joint component1="2" component2="3" node="componentJointDrawbar" rotLimit="0 0 0" transLimit="0 0 0"/>
            <collisionPair component1="1" component2="3" enabled="false"/>
        </components>
        <schemaOverlay attacherJointPosition="0 0" name="IMPLEMENT" />
        <mapHotspot type="TOOL_TRAILED" />
    </base>

    <wheels>
        <wheelConfigurations>
            <wheelConfiguration name="$l10n_configuration_valueDefault" price="0" brand="TRELLEBORG" saveId="TRELLEBORG_DEFAULT">
                <wheels>
                    <wheel filename="$data/shared/wheels/tires/trelleborg/AW305/300_80R15_3.xml" isLeft="true" hasTireTracks="true">
                        <physics restLoad="0.2" repr="wheelLeft" driveNode="wheelRepr" initialCompression="10" suspTravel="0.10" spring="17" damper="20"/>
                    </wheel>
                    <wheel filename="$data/shared/wheels/tires/trelleborg/AW305/300_80R15_3.xml" isLeft="false" hasTireTracks="true">
                        <physics restLoad="0.2" repr="wheelRight" initialCompression="10" suspTravel="0.10" spring="17" damper="20"/>
                    </wheel>
                    <wheel filename="$data/shared/wheels/tires/trelleborg/AW305/300_80R15_3.xml" isLeft="true" hasTireTracks="true">
                        <physics restLoad="0.7" repr="wheelLeftFront" initialCompression="20" suspTravel="0.10" spring="31" damper="20"/>
                    </wheel>
                    <wheel filename="$data/shared/wheels/tires/trelleborg/AW305/300_80R15_3.xml" isLeft="false" hasTireTracks="true">
                        <physics restLoad="0.7" repr="wheelRightFront" initialCompression="20" suspTravel="0.10" spring="31" damper="20"/>
                    </wheel>
                </wheels>
            </wheelConfiguration>
        </wheelConfigurations>

        <rimColor material="18">SHARED_WHITE1</rimColor>

        <hubs>
            <color0>KRONE_GREEN1</color0>
            <color1>SHARED_GREY3</color1>
            <hub linkNode="wheelRepr"       filename="$data/shared/wheels/hubs/hub_n6_1.xml" isLeft="true"  scale="0.15 0.2 0.2" />
            <hub linkNode="wheelRight"      filename="$data/shared/wheels/hubs/hub_n6_1.xml" isLeft="false" scale="0.15 0.2 0.2" />
            <hub linkNode="wheelLeftFront"  filename="$data/shared/wheels/hubs/hub_n6_1.xml" isLeft="true"  scale="0.15 0.2 0.2" />
            <hub linkNode="wheelRightFront" filename="$data/shared/wheels/hubs/hub_n6_1.xml" isLeft="false" scale="0.15 0.2 0.2" />
        </hubs>
    </wheels>

    <dynamicallyLoadedParts>
        <dynamicallyLoadedPart node="0" linkNode="wheelChock1" filename="$data/shared/assets/wheelChocks/wheelChock01.i3d"/>
        <dynamicallyLoadedPart node="0" linkNode="wheelChock2" filename="$data/shared/assets/wheelChocks/wheelChock01.i3d"/>
        <dynamicallyLoadedPart node="0" linkNode="wheelChock1Attached" filename="$data/shared/assets/wheelChocks/wheelChock01.i3d"/>
        <dynamicallyLoadedPart node="0" linkNode="wheelChock2Attached" filename="$data/shared/assets/wheelChocks/wheelChock01.i3d"/>
    </dynamicallyLoadedParts>

    <attachable>
        <inputAttacherJoints>
            <inputAttacherJoint node="attacherJoint" rootNode="xDisc620Trailer_drawbar_component3" jointType="trailer" attacherHeight="1.0"/>
        </inputAttacherJoints>
        <support animationName="moveSupport"/>
        <brakeForce force="0.3"/>
    </attachable>

    <connectionHoses>
        <hose inputAttacherJointIndices="1" type="electric" node="electric" adapterNode="electric_detached" length="1.5" diameter="0.01" straighteningFactor="1.5">
            <objectChange node="electric_detached" visibilityActive="false" visibilityInactive="true"/>
        </hose>
    </connectionHoses>

    <lights>
       <sharedLight linkNode="yellowRound_03_1"           filename="$data/shared/assets/reflectors/lizard/yellowRound_03.xml" />
       <sharedLight linkNode="yellowRound_03_2"           filename="$data/shared/assets/reflectors/lizard/yellowRound_03.xml" />
       <sharedLight linkNode="yellowRound_03_3"           filename="$data/shared/assets/reflectors/lizard/yellowRound_03.xml" />
       <sharedLight linkNode="yellowRound_03_4"           filename="$data/shared/assets/reflectors/lizard/yellowRound_03.xml" />
       <sharedLight linkNode="yellowRound_03_5"           filename="$data/shared/assets/reflectors/lizard/yellowRound_03.xml" />
       <sharedLight linkNode="yellowRound_03_6"           filename="$data/shared/assets/reflectors/lizard/yellowRound_03.xml" />
       <sharedLight linkNode="yellowRound_03_7"           filename="$data/shared/assets/reflectors/lizard/yellowRound_03.xml" />
       <sharedLight linkNode="yellowRound_03_8"           filename="$data/shared/assets/reflectors/lizard/yellowRound_03.xml" />
       <sharedLight linkNode="plateNumberLight02_01"      filename="$data/shared/assets/lights/lizard/plateNumberLight02.xml" />
       <sharedLight linkNode="plateNumberLight02_02"      filename="$data/shared/assets/lights/lizard/plateNumberLight02.xml" />
       <sharedLight linkNode="rear4ChamberLight_01_left"  filename="$data/shared/assets/lights/lizard/rearLight13_left.xml" />
       <sharedLight linkNode="rear4ChamberLight_01_right" filename="$data/shared/assets/lights/lizard/rearLight13_right.xml" />

        <realLights>
            <high>
                <light node="backLightsHigh1" lightTypes="0"/>
                <light node="licensePlateLightHigh" lightTypes="0"/>
                <turnLightLeft node="turnLightLeftBack"/>
                <turnLightRight node="turnLightRightBack"/>
                <brakeLight node="backLightsHigh1"/>
            </high>
        </realLights>
    </lights>

    <licensePlates>
        <licensePlate node="licensePlateBack" position="BACK" preferedType="ELONGATED" placementArea="0.06 0.27 0.1 0.27"/>
    </licensePlates>

    <animations>
        <animation name="moveSupport">
            <part node="wheelChock1" startTime="0.00" endTime="0.05" visibility="false"/>
            <part node="wheelChock1" startTime="0.05" endTime="0.10" visibility="true"/>
            <part node="wheelChock2" startTime="0.00" endTime="0.05" visibility="false"/>
            <part node="wheelChock2" startTime="0.05" endTime="0.10" visibility="true"/>
            <part node="wheelChock1Attached" startTime="0.00" endTime="0.05" visibility="true"/>
            <part node="wheelChock1Attached" startTime="0.05" endTime="0.10" visibility="false"/>
            <part node="wheelChock2Attached" startTime="0.00" endTime="0.05" visibility="true"/>
            <part node="wheelChock2Attached" startTime="0.05" endTime="0.10" visibility="false"/>
            <part startTime="0" endTime="0.1" componentJointIndex="2" startRotLimit="80 0 0" endRotLimit="0 0 0"/>
        </animation>
    </animations>

    <cylindered>
        <movingParts>
            <movingPart node="damperDrawbar" referencePoint="damperDrawbarRef" referenceFrame="xDisc620Trailer_drawbar_component3" isActiveDirty="true" maxUpdateDistance="40">
                <translatingPart node="damperDrawbarPunch"/>
            </movingPart>
            <movingPart node="hydraulicDrawbarBrake" referencePoint="hydraulicDrawbarBrakeRef" referenceFrame="xDisc620Trailer_drawbar_component3" isActiveDirty="true" scaleZ="true" maxUpdateDistance="40"/>
            <movingPart node="pipe" referencePoint="pipeRef" referenceFrame="xDisc620Trailer_main_component1" isActiveDirty="true" scaleZ="true" maxUpdateDistance="40"/>
        </movingParts>
        <sounds>
            <hydraulic template="defaultHydraulicSound"/>
        </sounds>
    </cylindered>

    <dynamicMountAttacher triggerNode="dynamicMountTrigger" rootNode="xDisc620Trailer_main_component1" jointNode="xDisc620Trailer_main_component1" forceAcceleration="30" mountType="TYPE_AUTO_ATTACH_XZ" transferMass="true">
        <lockPosition jointNode="lockPositionXDisc620" xmlFilename="data/vehicles/krone/xDisc620/xDisc620.xml"/>
    </dynamicMountAttacher>

    <tipOccluder>
        <occlusionArea start="tipOccluderAreaStart" width="tipOccluderAreaWidth" height="tipOccluderAreaHeight"/>
    </tipOccluder>

    <ai>
        <agentAttachment jointNode="attacherJoint" rotCenterWheelIndices="1 2" width="2.8" height="2.2" length="9" lengthOffset="4" hasCollision="false"/>
        <agentAttachment jointNode="componentJoint" rotCenterWheelIndices="3 4" width="1.0" height="1.2" length="1" lengthOffset="0"/>
    </ai>

    <foliageBending>
        <bendingNode minX="-0.5" maxX="0.5" minZ="-3.4" maxZ="4.4" yOffset="0.3"/>
        <bendingNode minX="-1.1" maxX="1.1" minZ="-4.5" maxZ="-3.4" yOffset="0.3"/>
    </foliageBending>

    <baseMaterial>
        <material name="xDisc620Trailer_mat" baseNode="xDisc620Trailer_vis">
            <shaderParameter name="colorMat0" value="KRONE_GREEN1"/>
        </material>
    </baseMaterial>

    <wearable wearDuration="480" workMultiplier="5" fieldMultiplier="2"/>
    <washable dirtDuration="90" washDuration="1" workMultiplier="3" fieldMultiplier="2"/>

    <i3dMappings>
        <i3dMapping id="xDisc620Trailer_main_component1" node="0>" />
        <i3dMapping id="xDisc620Trailer_vis" node="0>0" />
        <i3dMapping id="wheelChock1Attached" node="0>0|0|0|0" />
        <i3dMapping id="wheelChock2Attached" node="0>0|0|0|1" />
        <i3dMapping id="wheelLeft" node="0>0|1|0" />
        <i3dMapping id="wheelRepr" node="0>0|1|0|0" />
        <i3dMapping id="wheelChock1" node="0>0|1|0|1|0" />
        <i3dMapping id="wheelChock2" node="0>0|1|0|1|1" />
        <i3dMapping id="wheelRight" node="0>0|1|1" />
        <i3dMapping id="yellowRound_03_1" node="0>0|2|0|0" />
        <i3dMapping id="yellowRound_03_2" node="0>0|2|0|1" />
        <i3dMapping id="yellowRound_03_3" node="0>0|2|0|2" />
        <i3dMapping id="yellowRound_03_4" node="0>0|2|0|3" />
        <i3dMapping id="yellowRound_03_5" node="0>0|2|0|4" />
        <i3dMapping id="yellowRound_03_6" node="0>0|2|0|5" />
        <i3dMapping id="yellowRound_03_7" node="0>0|2|0|6" />
        <i3dMapping id="yellowRound_03_8" node="0>0|2|0|7" />
        <i3dMapping id="plateNumberLight02_01" node="0>0|2|0|8" />
        <i3dMapping id="plateNumberLight02_02" node="0>0|2|0|9" />
        <i3dMapping id="rear4ChamberLight_01_left" node="0>0|2|0|10" />
        <i3dMapping id="rear4ChamberLight_01_right" node="0>0|2|0|11" />
        <i3dMapping id="backLightsHigh1" node="0>0|2|1" />
        <i3dMapping id="licensePlateLightHigh" node="0>0|2|2" />
        <i3dMapping id="turnLightLeftBack" node="0>0|2|3" />
        <i3dMapping id="turnLightRightBack" node="0>0|2|4" />
        <i3dMapping id="componentJoint" node="0>0|3" />
        <i3dMapping id="licensePlateBack" node="0>0|4" />
        <i3dMapping id="tipOccluderAreaStart" node="0>0|5|0" />
        <i3dMapping id="tipOccluderAreaWidth" node="0>0|5|1" />
        <i3dMapping id="tipOccluderAreaHeight" node="0>0|5|2" />
        <i3dMapping id="pipe" node="0>0|7|0" />
        <i3dMapping id="dynamicMountTrigger" node="0>0|8|0" />
        <i3dMapping id="lockPositionXDisc620" node="0>0|8|1" />
        <i3dMapping id="decals" node="0>0|10" />
        <i3dMapping id="wheelLeftFront" node="1>0|0" />
        <i3dMapping id="wheelRightFront" node="1>0|1" />
        <i3dMapping id="damperDrawbarRef" node="1>1|0" />
        <i3dMapping id="hydraulicDrawbarBrakeRef" node="1>1|1" />
        <i3dMapping id="componentJointDrawbar" node="1>2" />
        <i3dMapping id="xDisc620Trailer_drawbar_component3" node="2>" />
        <i3dMapping id="attacherJoint" node="2>0|0" />
        <i3dMapping id="damperDrawbar" node="2>1|0" />
        <i3dMapping id="damperDrawbarPunch" node="2>1|0|0" />
        <i3dMapping id="hydraulicDrawbarBrake" node="2>1|1" />
        <i3dMapping id="pipeRef" node="2>2" />
        <i3dMapping id="electric" node="2>3|0|1" />
        <i3dMapping id="electric_detached" node="2>3|0|2" />
    </i3dMappings>
</vehicle>
