<?xml version="1.0" encoding="utf-8" standalone="no" ?>
<vehicle type="locomotive" 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>E - Locomotive</name>
        <image>$data/store/store_empty.png</image>
        <price>164000</price>
        <canBeSold>false</canBeSold>
        <showInStore>false</showInStore>
        <lifetime>600</lifetime>
        <rotation>0</rotation>
        <brand>LIZARD</brand>
        <category>tractorsS</category>
        <vertexBufferMemoryUsage>2971456</vertexBufferMemoryUsage>
        <indexBufferMemoryUsage>539334</indexBufferMemoryUsage>
        <textureMemoryUsage>22020336</textureMemoryUsage>
        <instanceVertexBufferMemoryUsage>0</instanceVertexBufferMemoryUsage>
        <instanceIndexBufferMemoryUsage>0</instanceIndexBufferMemoryUsage>
    </storeData>

    <base>
        <typeDesc>$l10n_typeDesc_locomotive</typeDesc>
        <filename>$data/vehicles/train/locomotive01/locomotive01.i3d</filename>
        <sounds filename="$data/vehicles/train/locomotive01/sounds/locomotive01.xml" volumeFactor="2.7"/>
        <size width="3.5" length="5"/>
        <components>
            <component centerOfMass="0 1 -0.4" solverIterationCount="20" mass="25000" />
        </components>
        <schemaOverlay attacherJointPosition="0 0" name="VEHICLE" />
        <mapHotspot type="TRAIN" />
    </base>

    <wheels>
        <wheelConfigurations>
            <wheelConfiguration>
                <wheels surfaceSoundLinkNode="surfaceSoundNode" />
            </wheelConfiguration>
        </wheelConfigurations>
    </wheels>

    <splineVehicle>
        <dollies frontNode="frontNode" backNode="backNode" dolly1Node="dollyFront" dolly2Node="dollyBack" />
    </splineVehicle>

    <locomotive>
        <powerArm node="electricNodeBack" />
    </locomotive>

    <speedRotatingParts>
        <speedRotatingPart node="wheel01" radius="0.51" />
        <speedRotatingPart node="wheel02" radius="0.51" />
        <speedRotatingPart node="wheel03" radius="0.51" />
        <speedRotatingPart node="wheel04" radius="0.51" />
    </speedRotatingParts>

    <lights>
        <states>
            <state lightTypes="0" />
        </states>

        <realLights>
            <low>
                <light node="frontLightLowFront" lightTypes="0" excludedLightTypes="3"/>
                <light node="highBeamLowFront" lightTypes="3" />
            </low>
            <high>
                <light node="frontLightHighFront" lightTypes="0" excludedLightTypes="3"/>
                <light node="highBeamHighFront" lightTypes="3" />
                <light node="backlightHigh" lightTypes="0" />
            </high>
        </realLights>

        <defaultLights>
            <defaultLight shaderNode="frontLightStatic" lightTypes="0" intensity="45"/>
            <defaultLight shaderNode="backLightsStatic" lightTypes="0" intensity="20"/>
            <defaultLight shaderNode="frontBeamStatic" lightTypes="3" intensity="45"/>
        </defaultLights>

        <dashboards>
            <dashboard displayType="EMITTER" valueType="lightState" node="dashboardLight" intensity="0.5" lightTypes="0" groups="MOTOR_ACTIVE"/>
        </dashboards>
    </lights>

    <enterable isTabbable="false" canBeEnteredFromMenu="true">
        <enterReferenceNode node="0>" />
        <exitPoint node="exitNode" />

        <cameras>
            <camera node="outdoorCamera" rotatable="true" rotateNode="outdoorCameraTarget" limit="true" useWorldXZRotation="true" rotMinX="-1.4" rotMaxX="1" transMin="12" transMax="50" >
                <raycastNode node="cameraRaycastNode1" />
                <raycastNode node="cameraRaycastNode2" />
                <raycastNode node="cameraRaycastNode3" />
            </camera>
            <camera node="indoorCameraFront" rotatable="true" limit="true" rotMinX="-1.1" rotMaxX="0.4" transMin="0" transMax="0" positionSmoothingParameter="0" useMirror="true" isInside="true" shadowFocusBox="shadowFocusBox" />
        </cameras>

        <characterNode node="playerFrontSkin" cameraMinDistance="0.5" spineRotation="-90 0 90" >
            <target ikChain="rightFoot" targetNode="playerFrontRightFoot" />
            <target ikChain="leftFoot"  targetNode="playerFrontLeftFoot" />
            <target ikChain="rightArm"  targetNode="playerFrontRightHand" />
            <target ikChain="leftArm"   targetNode="playerFrontLeftHand" />
        </characterNode>

        <dashboards>
            <dashboard displayType="NUMBER" valueType="time"          numbers="numbersTime"          numberColor="0.3 0.3 0.3 1" precision="2" font="GENERIC" groups="MOTOR_ACTIVE"/>
        </dashboards>
    </enterable>

    <motorized forceSpeedHudDisplay="true">
        <motorConfigurations>
            <motorConfiguration hp="1500" >
                <motor torqueScale="0.4" minRpm="850" maxRpm="2200" maxForwardSpeed="80" maxBackwardSpeed="80" brakeForce="5" lowBrakeForceScale="0.22" rotInertia="0.004"  startAnimationName="startMotor">
                    <torque normRpm="0.45" torque="0.9"/>
                    <torque normRpm="0.5" torque="0.97"/>
                    <torque normRpm="0.59" torque="1"/>
                    <torque normRpm="0.72" torque="1"/>
                    <torque normRpm="0.86" torque="0.88"/>
                    <torque normRpm="1" torque="0.72"/>
                </motor>
                <transmission minForwardGearRatio="10" maxForwardGearRatio="10" minBackwardGearRatio="10" maxBackwardGearRatio="10" />
            </motorConfiguration>
        </motorConfigurations>

        <motorStartDuration>3000</motorStartDuration>
    </motorized>

    <attacherJoints>
        <attacherJoint node="trailerAttacherJointNode" jointType="train" allowsLowering="false">
            <schema position="1 0" rotation="0" invertX="false" />
            <bottomArm rotationNode="linkArm" translationNode="linkArmTrans" referenceNode="referenceNode" zScale="-1" startRotation="-17 0 0" lockDirection="false" toggleVisibility="true"/>
        </attacherJoint>
    </attacherJoints>

    <animations>
        <animation name="startMotor">
            <part node="electricNodeBack"  startTime="0.0" endTime="1.0" startTrans="0 0 6.165" endTrans="0 0.8 6.165" />

            <sound template="hingeMedium"   startTime="0" endTime="1.0" direction="1" volumeScale="1.3" pitchScale="0.85" linkNode="electricNodeBack"/>
            <sound template="latchSmall"    startTime="0.65" direction="1" volumeScale="0.6" pitchScale="0.45" linkNode="electricNodeBack"/>
        </animation>
    </animations>

    <cylindered>
        <movingTools>
            <movingTool node="electricNodeFront">
                <dependentPart node="armFront1" />
                <dependentPart node="armFront2" />
            </movingTool>
            <movingTool node="electricNodeBack">
                <dependentPart node="armBack1" />
                <dependentPart node="armBack2" />
            </movingTool>
        </movingTools>

        <movingParts>
            <movingPart node="armFront1" referencePoint="armFront1Ref" localReferencePoint="armFront1Part" referenceFrame="armFront1Ref" >
                <dependentPart node="armFront1Part" />
            </movingPart>
            <movingPart node="armFront1Part" referencePoint="armFront1Ref" referenceFrame="armFront1Ref" />
            <movingPart node="armFront2" referencePoint="armFront2Ref" localReferencePoint="armFront2Part" referenceFrame="armFront2Ref" >
                <dependentPart node="armFront2Part" />
            </movingPart>
            <movingPart node="armFront2Part" referencePoint="armFront2Ref" referenceFrame="armFront2Ref" />

            <movingPart node="armBack1" referencePoint="armBack1Ref" localReferencePoint="armBack1Part" referenceFrame="armBack1Ref" >
                <dependentPart node="armBack1Part" />
            </movingPart>
            <movingPart node="armBack1Part" referencePoint="armBack1Ref" referenceFrame="armBack1Ref" />
            <movingPart node="armBack2" referencePoint="armBack2Ref" localReferencePoint="armBack2Part" referenceFrame="armBack2Ref" >
                <dependentPart node="armBack2Part" />
            </movingPart>
            <movingPart node="armBack2Part" referencePoint="armBack2Ref" referenceFrame="armBack2Ref" />
        </movingParts>
    </cylindered>

    <dashboard>
        <groups>
            <group name="MOTOR_ACTIVE"   isMotorStarting="true" isMotorRunning="true"/>
        </groups>
    </dashboard>

    <i3dMappings>
        <i3dMapping id="dollyFront" node="0>0" />
        <i3dMapping id="wheel01" node="0>0|0" />
        <i3dMapping id="wheel02" node="0>0|1" />
        <i3dMapping id="dollyBack" node="0>1" />
        <i3dMapping id="wheel03" node="0>1|0" />
        <i3dMapping id="wheel04" node="0>1|1" />
        <i3dMapping id="outdoorCameraTarget" node="0>2|0" />
        <i3dMapping id="outdoorCamera" node="0>2|0|0" />
        <i3dMapping id="indoorCameraAnim" node="0>2|1" />
        <i3dMapping id="indoorCameraFront" node="0>2|1|0" />
        <i3dMapping id="cameraRaycastNode1" node="0>2|2" />
        <i3dMapping id="cameraRaycastNode2" node="0>2|3" />
        <i3dMapping id="cameraRaycastNode3" node="0>2|4" />
        <i3dMapping id="frontLightStatic" node="0>3|0" />
        <i3dMapping id="frontBeamStatic" node="0>3|1" />
        <i3dMapping id="backLightsStatic" node="0>3|2" />
        <i3dMapping id="frontLightLowFront" node="0>3|3" />
        <i3dMapping id="highBeamLowFront" node="0>3|4" />
        <i3dMapping id="frontLightHighFront" node="0>3|5" />
        <i3dMapping id="highBeamHighFront" node="0>3|6" />
        <i3dMapping id="dashboardLight" node="0>3|7" />
        <i3dMapping id="backlightHigh" node="0>3|8" />
        <i3dMapping id="shadowFocusBox" node="0>4" />
        <i3dMapping id="frontNode" node="0>5" />
        <i3dMapping id="backNode" node="0>6" />
        <i3dMapping id="trailerAttacherJoint" node="0>7" />
        <i3dMapping id="trailerAttacherJointNode" node="0>7|0" />
        <i3dMapping id="linkArm" node="0>7|0|0" />
        <i3dMapping id="linkArmTrans" node="0>7|0|0|0" />
        <i3dMapping id="referenceNode" node="0>7|0|0|0|0" />
        <i3dMapping id="enterNode" node="0>8" />
        <i3dMapping id="exitNode" node="0>9" />
        <i3dMapping id="surfaceSoundNode" node="0>10" />
        <i3dMapping id="electricNodeFront" node="0>11|0" />
        <i3dMapping id="armFront1" node="0>11|0|0" />
        <i3dMapping id="armFront1Part" node="0>11|0|0|0" />
        <i3dMapping id="armFront2" node="0>11|0|1" />
        <i3dMapping id="armFront2Part" node="0>11|0|1|0" />
        <i3dMapping id="electricNodeBack" node="0>11|1" />
        <i3dMapping id="armBack1" node="0>11|1|0" />
        <i3dMapping id="armBack1Part" node="0>11|1|0|0" />
        <i3dMapping id="armBack2" node="0>11|1|1" />
        <i3dMapping id="armBack2Part" node="0>11|1|1|0" />
        <i3dMapping id="armFront1Ref" node="0>11|2" />
        <i3dMapping id="armFront2Ref" node="0>11|3" />
        <i3dMapping id="armBack1Ref" node="0>11|4" />
        <i3dMapping id="armBack2Ref" node="0>11|5" />
        <i3dMapping id="characterRootFront" node="0>12" />
        <i3dMapping id="playerFrontSkin" node="0>12|0" />
        <i3dMapping id="playerFrontRightFoot" node="0>12|1" />
        <i3dMapping id="playerFrontLeftFoot" node="0>12|2" />
        <i3dMapping id="playerFrontRightHand" node="0>12|3" />
        <i3dMapping id="playerFrontLeftHand" node="0>12|4" />
        <i3dMapping id="numbersTime" node="0>13" />
    </i3dMappings>
</vehicle>
