<?xml version="1.0" encoding="utf-8" standalone="no" ?>
<vehicle type="baleGrab" 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>$l10n_shopItem_frontloaderBaleGrab</name>
        <specs>
            <combination filterCategory="wheelLoaderVehicles" />
        </specs>
        <functions>
            <function>$l10n_function_frontloaderBaleFork</function>
        </functions>
        <image>store/store_haySqueezerBaleClamp.png</image>
        <price>4300</price>
        <lifetime>600</lifetime>
        <rotation>0</rotation>
        <brand>Lizard</brand>
        <category>wheelLoaderTools</category>
        <shopHeight>3.8</shopHeight>
        <vertexBufferMemoryUsage>242944</vertexBufferMemoryUsage>
        <indexBufferMemoryUsage>64768</indexBufferMemoryUsage>
        <textureMemoryUsage>524288</textureMemoryUsage>
        <audioMemoryUsage>0</audioMemoryUsage>
        <instanceVertexBufferMemoryUsage>0</instanceVertexBufferMemoryUsage>
        <instanceIndexBufferMemoryUsage>0</instanceIndexBufferMemoryUsage>
    </storeData>

    <base>
        <typeDesc>$l10n_typeDesc_wheelLoaderTool</typeDesc>
        <filename>haySqueezerBaleClamp.i3d</filename>
        <size width="1.8" length="2.5" height="1.05" />
        <components>
            <component centerOfMass="0 0.3 -0.45" solverIterationCount="40" mass="261"/>
            <component centerOfMass="0 0 0" solverIterationCount="30" mass="60"/>
            <component centerOfMass="0 0 0" solverIterationCount="30" mass="60"/>
            <joint component1="1" component2="2" node="componentJointGrabLeft" rotLimit="0 0 0" transLimit="0 0 0" transLimitSpring="3000 0 0" transLimitDamping="300 0 0" transLimitForceLimit="20 -1 -1" />
            <joint component1="1" component2="3" node="componentJointGrabRight" rotLimit="0 0 0" transLimit="0 0 0" transLimitSpring="3000 0 0" transLimitDamping="300 0 0" transLimitForceLimit="20 -1 -1" />
        </components>
        <schemaOverlay attacherJointPosition="0 0" name="IMPLEMENT" />
        <mapHotspot type="TOOL" />
    </base>

    <attachable>
        <inputAttacherJoints>
            <inputAttacherJoint node="attacherJoint" jointType="wheelLoader" />
        </inputAttacherJoints>
        <support animationName="hoses" />
    </attachable>

    <attacherJointControl maxTiltAngle="25" supportsDamping="false">
        <control controlFunction="controlAttacherJointHeight" controlAxis="AXIS_HYDRAULICATTACHER1" invertControlAxis="true" mouseSpeedFactor="0.3" iconName="IMPLEMENT_ATTACHER_TRANS" />
        <control controlFunction="controlAttacherJointTilt"   controlAxis="AXIS_HYDRAULICATTACHER2" invertControlAxis="true" mouseSpeedFactor="0.3" iconName="IMPLEMENT_ATTACHER_ROTX"/>

        <sounds>
            <hydraulic template="defaultHydraulicSound" linkNode="0>" />
        </sounds>
    </attacherJointControl>

    <animations>
        <animation name="hoses">
            <part node="hoses_attached" startTime="0" endTime="0.1" startVisibility="true" endVisibility="false"/>
            <part node="hoses_detached"	startTime="0" endTime="0.1" startVisibility="false" endVisibility="true"/>
        </animation>
    </animations>

    <cylindered>
        <movingTools>
            <movingTool node="componentJointGrabLeft">
                <controls axis="AXIS_FRONTLOADER_TOOL2" invertAxis="false" mouseSpeedFactor="0.15" iconName="WORKING_WIDTH_TRANSLATE_X" />
                <dependentMovingTool node="componentJointGrabRight" speedScale="-1"/>
                <translation translationAxis="1" transMin="-0.022" transMax="0.61" transAcceleration="250" transSpeed="0.4"/>
                <componentJoint index="1"/>
            </movingTool>

            <movingTool node="componentJointGrabRight">
                <translation translationAxis="1" transMin="-0.61" transMax="0.022" transAcceleration="250" transSpeed="0.4"/>
                <componentJoint index="2"/>
            </movingTool>
        </movingTools>

        <movingParts>
            <movingPart node="grabLeft" referencePoint="grabLeftRef" referenceFrame="grabLeftRefFrame" doDirectionAlignment="false" isActiveDirty="true" maxUpdateDistance="100">
                <translatingPart node="grabLeftZTrans" minZTrans="-0.022" maxZTrans="0.61" />
            </movingPart>
            <movingPart node="grabRight" referencePoint="grabRightRef" referenceFrame="grabRightRefFrame" doDirectionAlignment="false" isActiveDirty="true" maxUpdateDistance="100">
                <translatingPart node="grabRightZTrans" minZTrans="-0.022" maxZTrans="0.61" />
            </movingPart>
        </movingParts>

        <sounds>
            <actionSound template="hydraulicOpen05" pitchScale="1.8" volumeScale="2"   linkNode="componentJointGrabRight" actionNames="TOOL_MOVE_POS TOOL_MOVE_NEG" nodes="componentJointGrabRight" fadeIn="0.1" fadeOut="0.1"/>
            <actionSound template="clackVar6"       pitchScale="0.5" volumeScale="2.0" linkNode="componentJointGrabRight" actionNames="TOOL_MOVE_END_POS_LIMIT"     nodes="componentJointGrabRight" />
            <actionSound template="vibratingImp"    pitchScale="1.3" volumeScale="0.6" linkNode="componentJointGrabRight" actionNames="TOOL_MOVE_END_POS_LIMIT"     nodes="componentJointGrabRight" />
            <actionSound template="clackVar6"       pitchScale="0.7" volumeScale="2.0" linkNode="componentJointGrabRight" actionNames="TOOL_MOVE_END_NEG_LIMIT"     nodes="componentJointGrabRight" />
            <actionSound template="metalImpHigh01"  pitchScale="0.5" volumeScale="0.6" linkNode="componentJointGrabRight" actionNames="TOOL_MOVE_END_NEG_LIMIT"     nodes="componentJointGrabRight" />
        </sounds>
    </cylindered>

    <baleGrab triggerNode="dynamicMountTrigger" rootNode="baleClamp_main_component1" dynamicMountType="TYPE_FIX_ATTACH" forceAcceleration="200" maxSizeSquare="1.8">
        <grab componentJointIndex="1" translationAxis="1" translationThreshold="0.05" dampingFactor="20">
            <movingTool node="componentJointGrabLeft" closingDirection="-1" />
        </grab>
        <grab componentJointIndex="2" translationAxis="1" translationThreshold="-0.05" dampingFactor="20">
            <movingTool node="componentJointGrabRight" closingDirection="1" />
        </grab>
    </baleGrab>

    <ai>
        <agentAttachment width="2" height="2.1" length="1.5" lengthOffset="1.3"/>
    </ai>

    <tensionBeltObject>
        <meshNodes>
            <meshNode node="tensionBeltMesh01"/>
            <meshNode node="tensionBeltMesh02"/>
            <meshNode node="tensionBeltMesh03"/>
        </meshNodes>
    </tensionBeltObject>

    <foliageBending>
        <bendingNode minX="-0.949" maxX="0.949" minZ="0.04" maxZ="0.307" yOffset="0" />
        <bendingNode minX="-0.051" maxX="0.064" minZ="-0.071" maxZ="2.435" yOffset="0" node="grabLeftZTrans" />
        <bendingNode minX="0.051" maxX="0.064" minZ="-0.071" maxZ="2.435" yOffset="0" node="grabRightZTrans" />
    </foliageBending>

    <baseColorConfigurations useDefaultColors="true" defaultColorMaterialTemplateName="calibratedGlossPaint">
	    <baseColorConfiguration color="SHARED_WHITE1"/>
		
        <material materialSlotName="haySqueezer_metalPaintedColor0Mat"/>
    </baseColorConfigurations>
	
    <wearable wearDuration="480" workMultiplier="5" fieldMultiplier="2"/>
    <washable dirtDuration="90" washDuration="1" workMultiplier="6" fieldMultiplier="2"/>

    <i3dMappings>
        <i3dMapping id="baleClamp_main_component1" node="0>" />
        <i3dMapping id="attacherJoint" node="0>0|0" />
        <i3dMapping id="tensionBeltMesh01" node="0>0|1|0" />
        <i3dMapping id="dynamicMountTrigger" node="0>0|2" />
        <i3dMapping id="componentJointGrabLeftRot" node="0>0|3|0" />
        <i3dMapping id="componentJointGrabLeft" node="0>0|3|0|0" />
        <i3dMapping id="componentJointGrabRightRot" node="0>0|3|1" />
        <i3dMapping id="componentJointGrabRight" node="0>0|3|1|0" />
        <i3dMapping id="grabLeftRefFrame" node="0>0|4|0" />
        <i3dMapping id="grabLeft" node="0>0|4|0|0" />
        <i3dMapping id="grabLeftZTrans" node="0>0|4|0|0|0" />
        <i3dMapping id="tensionBeltMesh02" node="0>0|4|0|0|1" />
        <i3dMapping id="grabRightRefFrame" node="0>0|4|1" />
        <i3dMapping id="grabRight" node="0>0|4|1|0" />
        <i3dMapping id="grabRightZTrans" node="0>0|4|1|0|0" />
        <i3dMapping id="tensionBeltMesh03" node="0>0|4|1|0|1" />
        <i3dMapping id="hoses_attached" node="0>1" />
        <i3dMapping id="hoses_detached" node="0>2" />
        <i3dMapping id="baleClamp_main_component2" node="1>" />
        <i3dMapping id="colPartBaleLeft01" node="1>0|0" />
        <i3dMapping id="colPartBaleLeft02" node="1>0|1" />
        <i3dMapping id="grabLeftRef" node="1>1" />
        <i3dMapping id="baleClamp_main_component3" node="2>" />
        <i3dMapping id="colPartBaleRight01" node="2>0|0" />
        <i3dMapping id="colPartBaleRight02" node="2>0|1" />
        <i3dMapping id="grabRightRef" node="2>1" />
    </i3dMappings>
</vehicle>
