--
-- Lichtmast
--
-- M@D Author  Headshot XXL   &   Gorli
-- M@D date  29.04.2009
--
-- J112J Edit for Lichtmast 13:09 21.08.2012
--
-- > Copyright (C) Headshot XXL & Gorli< --


Lichtmast = {}

function Lichtmast.prerequisitesPresent(specializations)
	Vehicle.registerJointType("frontloader");
    return SpecializationUtil.hasSpecialization(Steerable, specializations);
end;

function Lichtmast:load(xmlFile)
	
   	local limatranslationPartNode = Utils.indexToObject(self.rootNode, getXMLString(xmlFile, "vehicle.limatranslationPart#index"));
        if limatranslationPartNode ~= nil then
        self.limatranslationPart = {};
        self.limatranslationPart.node = limatranslationPartNode;
        local x, y, z = Utils.getVectorFromString(getXMLString(xmlFile, "vehicle.limatranslationPart#minTrans"));
        self.limatranslationPart.minTrans = {};
        self.limatranslationPart.minTrans[1] = Utils.getNoNil(x, 0);
        self.limatranslationPart.minTrans[2] = Utils.getNoNil(y, 0);
        self.limatranslationPart.minTrans[3] = Utils.getNoNil(z, 0);

        x, y, z = Utils.getVectorFromString(getXMLString(xmlFile, "vehicle.limatranslationPart#maxTrans"));
        self.limatranslationPart.maxTrans = {};
        self.limatranslationPart.maxTrans[1] = Utils.getNoNil(x, 0);
        self.limatranslationPart.maxTrans[2] = Utils.getNoNil(y, 0);
        self.limatranslationPart.maxTrans[3] = Utils.getNoNil(z, 0);

        self.limatranslationPart.transTime = Utils.getNoNil(getXMLString(xmlFile, "vehicle.limatranslationPart#transTime"), 2)*100;
        self.limatranslationPart.touchTransLimit = Utils.getNoNil(getXMLString(xmlFile, "vehicle.limatranslationPart#touchTransLimit"), 10);
    end;
        local limatranslationPartNode2 = Utils.indexToObject(self.rootNode, getXMLString(xmlFile, "vehicle.limatranslationPart2#index"));
        if limatranslationPartNode2 ~= nil then
        self.limatranslationPart2 = {};
        self.limatranslationPart2.node = limatranslationPartNode2;
        local x, y, z = Utils.getVectorFromString(getXMLString(xmlFile, "vehicle.limatranslationPart2#minTrans"));
        self.limatranslationPart2.minTrans = {};
        self.limatranslationPart2.minTrans[1] = Utils.getNoNil(x, 0);
        self.limatranslationPart2.minTrans[2] = Utils.getNoNil(y, 0);
        self.limatranslationPart2.minTrans[3] = Utils.getNoNil(z, 0);

        x, y, z = Utils.getVectorFromString(getXMLString(xmlFile, "vehicle.limatranslationPart2#maxTrans"));
        self.limatranslationPart2.maxTrans = {};
        self.limatranslationPart2.maxTrans[1] = Utils.getNoNil(x, 0);
        self.limatranslationPart2.maxTrans[2] = Utils.getNoNil(y, 0);
        self.limatranslationPart2.maxTrans[3] = Utils.getNoNil(z, 0);

        self.limatranslationPart2.transTime = Utils.getNoNil(getXMLString(xmlFile, "vehicle.limatranslationPart2#transTime"), 2)*100;
        self.limatranslationPart2.touchTransLimit = Utils.getNoNil(getXMLString(xmlFile, "vehicle.limatranslationPart2#touchTransLimit"), 10);
    end; 
	local limatranslationPartNode3 = Utils.indexToObject(self.rootNode, getXMLString(xmlFile, "vehicle.limatranslationPart3#index"));
        if limatranslationPartNode3 ~= nil then
        self.limatranslationPart3 = {};
        self.limatranslationPart3.node = limatranslationPartNode3;
        local x, y, z = Utils.getVectorFromString(getXMLString(xmlFile, "vehicle.limatranslationPart3#minTrans"));
        self.limatranslationPart3.minTrans = {};
        self.limatranslationPart3.minTrans[1] = Utils.getNoNil(x, 0);
        self.limatranslationPart3.minTrans[2] = Utils.getNoNil(y, 0);
        self.limatranslationPart3.minTrans[3] = Utils.getNoNil(z, 0);

        x, y, z = Utils.getVectorFromString(getXMLString(xmlFile, "vehicle.limatranslationPart3#maxTrans"));
        self.limatranslationPart3.maxTrans = {};
        self.limatranslationPart3.maxTrans[1] = Utils.getNoNil(x, 0);
        self.limatranslationPart3.maxTrans[2] = Utils.getNoNil(y, 0);
        self.limatranslationPart3.maxTrans[3] = Utils.getNoNil(z, 0);

        self.limatranslationPart3.transTime = Utils.getNoNil(getXMLString(xmlFile, "vehicle.limatranslationPart3#transTime"), 2)*100;
        self.limatranslationPart3.touchTransLimit = Utils.getNoNil(getXMLString(xmlFile, "vehicle.limatranslationPart3#touchTransLimit"), 10);
    end;
        local limatranslationPartNode4 = Utils.indexToObject(self.rootNode, getXMLString(xmlFile, "vehicle.limatranslationPart4#index"));
        if limatranslationPartNode4 ~= nil then
        self.limatranslationPart4 = {};
        self.limatranslationPart4.node = limatranslationPartNode4;
        local x, y, z = Utils.getVectorFromString(getXMLString(xmlFile, "vehicle.limatranslationPart4#minTrans"));
        self.limatranslationPart4.minTrans = {};
        self.limatranslationPart4.minTrans[1] = Utils.getNoNil(x, 0);
        self.limatranslationPart4.minTrans[2] = Utils.getNoNil(y, 0);
        self.limatranslationPart4.minTrans[3] = Utils.getNoNil(z, 0);

        x, y, z = Utils.getVectorFromString(getXMLString(xmlFile, "vehicle.limatranslationPart4#maxTrans"));
        self.limatranslationPart4.maxTrans = {};
        self.limatranslationPart4.maxTrans[1] = Utils.getNoNil(x, 0);
        self.limatranslationPart4.maxTrans[2] = Utils.getNoNil(y, 0);
        self.limatranslationPart4.maxTrans[3] = Utils.getNoNil(z, 0);

        self.limatranslationPart4.transTime = Utils.getNoNil(getXMLString(xmlFile, "vehicle.limatranslationPart4#transTime"), 2)*100;
        self.limatranslationPart4.touchTransLimit = Utils.getNoNil(getXMLString(xmlFile, "vehicle.limatranslationPart4#touchTransLimit"), 10);
    end;
        local limatranslationPartNode5 = Utils.indexToObject(self.rootNode, getXMLString(xmlFile, "vehicle.limatranslationPart5#index"));
        if limatranslationPartNode5 ~= nil then
        self.limatranslimatranslationPart5 = {};
        self.limatranslationPart5.node = limatranslationPartNode5;
        local x, y, z = Utils.getVectorFromString(getXMLString(xmlFile, "vehicle.limatranslationPart5#minTrans"));
        self.limatranslationPart5.minTrans = {};
        self.limatranslationPart5.minTrans[1] = Utils.getNoNil(x, 0);
        self.limatranslationPart5.minTrans[2] = Utils.getNoNil(y, 0);
        self.limatranslationPart5.minTrans[3] = Utils.getNoNil(z, 0);

        x, y, z = Utils.getVectorFromString(getXMLString(xmlFile, "vehicle.limatranslationPart5#maxTrans"));
        self.limatranslationPart5.maxTrans = {};
        self.limatranslationPart5.maxTrans[1] = Utils.getNoNil(x, 0);
        self.limatranslationPart5.maxTrans[2] = Utils.getNoNil(y, 0);
        self.limatranslationPart5.maxTrans[3] = Utils.getNoNil(z, 0);

        self.limatranslationPart5.transTime = Utils.getNoNil(getXMLString(xmlFile, "vehicle.limatranslationPart5#transTime"), 2)*100;
        self.limatranslationPart5.touchTransLimit = Utils.getNoNil(getXMLString(xmlFile, "vehicle.limatranslationPart5#touchTransLimit"), 10);
    end;
        local limatranslationPartNode6 = Utils.indexToObject(self.rootNode, getXMLString(xmlFile, "vehicle.limatranslationPart6#index"));
        if limatranslationPartNode6 ~= nil then
        self.limatranslationPart6 = {};
        self.limatranslationPart6.node = limatranslationPartNode6;
        local x, y, z = Utils.getVectorFromString(getXMLString(xmlFile, "vehicle.limatranslationPart6#minTrans"));
        self.limatranslationPart6.minTrans = {};
        self.limatranslationPart6.minTrans[1] = Utils.getNoNil(x, 0);
        self.limatranslationPart6.minTrans[2] = Utils.getNoNil(y, 0);
        self.limatranslationPart6.minTrans[3] = Utils.getNoNil(z, 0);

        x, y, z = Utils.getVectorFromString(getXMLString(xmlFile, "vehicle.limatranslationPart6#maxTrans"));
        self.limatranslationPart6.maxTrans = {};
        self.limatranslationPart6.maxTrans[1] = Utils.getNoNil(x, 0);
        self.limatranslationPart6.maxTrans[2] = Utils.getNoNil(y, 0);
        self.limatranslationPart6.maxTrans[3] = Utils.getNoNil(z, 0);

        self.limatranslationPart6.transTime = Utils.getNoNil(getXMLString(xmlFile, "vehicle.limatranslationPart6#transTime"), 2)*100;
        self.limatranslationPart6.touchTransLimit = Utils.getNoNil(getXMLString(xmlFile, "vehicle.limatranslationPart6#touchTransLimit"), 10);
    end;
 	local limatranslationPartNode7 = Utils.indexToObject(self.rootNode, getXMLString(xmlFile, "vehicle.limatranslationPart7#index"));
        if limatranslationPartNode7 ~= nil then
        self.limatranslationPart7 = {};
        self.limatranslationPart7.node = limatranslationPartNode7;
        local x, y, z = Utils.getVectorFromString(getXMLString(xmlFile, "vehicle.limatranslationPart7#minTrans"));
        self.limatranslationPart7.minTrans = {};
        self.limatranslationPart7.minTrans[1] = Utils.getNoNil(x, 0);
        self.limatranslationPart7.minTrans[2] = Utils.getNoNil(y, 0);
        self.limatranslationPart7.minTrans[3] = Utils.getNoNil(z, 0);

        x, y, z = Utils.getVectorFromString(getXMLString(xmlFile, "vehicle.limatranslationPart7#maxTrans"));
        self.limatranslationPart7.maxTrans = {};
        self.limatranslationPart7.maxTrans[1] = Utils.getNoNil(x, 0);
        self.limatranslationPart7.maxTrans[2] = Utils.getNoNil(y, 0);
        self.limatranslationPart7.maxTrans[3] = Utils.getNoNil(z, 0);

        self.limatranslationPart7.transTime = Utils.getNoNil(getXMLString(xmlFile, "vehicle.limatranslationPart7#transTime"), 2)*100;
        self.limatranslationPart7.touchTransLimit = Utils.getNoNil(getXMLString(xmlFile, "vehicle.limatranslationPart7#touchTransLimit"), 10);
    end;
	local limatranslationPartNode8 = Utils.indexToObject(self.rootNode, getXMLString(xmlFile, "vehicle.limatranslationPart8#index"));
        if limatranslationPartNode8 ~= nil then
        self.limatranslationPart8 = {};
        self.limatranslationPart8.node = limatranslationPartNode8;
        local x, y, z = Utils.getVectorFromString(getXMLString(xmlFile, "vehicle.limatranslationPart8#minTrans"));
        self.limatranslationPart8.minTrans = {};
        self.limatranslationPart8.minTrans[1] = Utils.getNoNil(x, 0);
        self.limatranslationPart8.minTrans[2] = Utils.getNoNil(y, 0);
        self.limatranslationPart8.minTrans[3] = Utils.getNoNil(z, 0);

        x, y, z = Utils.getVectorFromString(getXMLString(xmlFile, "vehicle.limatranslationPart8#maxTrans"));
        self.limatranslationPart8.maxTrans = {};
        self.limatranslationPart8.maxTrans[1] = Utils.getNoNil(x, 0);
        self.limatranslationPart8.maxTrans[2] = Utils.getNoNil(y, 0);
        self.limatranslationPart8.maxTrans[3] = Utils.getNoNil(z, 0);

        self.limatranslationPart8.transTime = Utils.getNoNil(getXMLString(xmlFile, "vehicle.limatranslationPart8#transTime"), 2)*100;
        self.limatranslationPart8.touchTransLimit = Utils.getNoNil(getXMLString(xmlFile, "vehicle.limatranslationPart8#touchTransLimit"), 10);
    end;
	local limatranslationPartNode9 = Utils.indexToObject(self.rootNode, getXMLString(xmlFile, "vehicle.limatranslationPart9#index"));
        if limatranslationPartNode9 ~= nil then
        self.limatranslationPart9 = {};
        self.limatranslationPart9.node = limatranslationPartNode9;
        local x, y, z = Utils.getVectorFromString(getXMLString(xmlFile, "vehicle.limatranslationPart9#minTrans"));
        self.limatranslationPart9.minTrans = {};
        self.limatranslationPart9.minTrans[1] = Utils.getNoNil(x, 0);
        self.limatranslationPart9.minTrans[2] = Utils.getNoNil(y, 0);
        self.limatranslationPart9.minTrans[3] = Utils.getNoNil(z, 0);

        x, y, z = Utils.getVectorFromString(getXMLString(xmlFile, "vehicle.limatranslationPart9#maxTrans"));
        self.limatranslationPart9.maxTrans = {};
        self.limatranslationPart9.maxTrans[1] = Utils.getNoNil(x, 0);
        self.limatranslationPart9.maxTrans[2] = Utils.getNoNil(y, 0);
        self.limatranslationPart9.maxTrans[3] = Utils.getNoNil(z, 0);

        self.limatranslationPart9.transTime = Utils.getNoNil(getXMLString(xmlFile, "vehicle.limatranslationPart9#transTime"), 2)*100;
        self.limatranslationPart9.touchTransLimit = Utils.getNoNil(getXMLString(xmlFile, "vehicle.limatranslationPart9#touchTransLimit"), 10);
    end;
	local limatranslationPartNode10 = Utils.indexToObject(self.rootNode, getXMLString(xmlFile, "vehicle.limatranslationPart10#index"));
        if limatranslationPartNode10 ~= nil then
        self.limatranslationPart10 = {};
        self.limatranslationPart10.node = limatranslationPartNode10;
        local x, y, z = Utils.getVectorFromString(getXMLString(xmlFile, "vehicle.limatranslationPart10#minTrans"));
        self.limatranslationPart10.minTrans = {};
        self.limatranslationPart10.minTrans[1] = Utils.getNoNil(x, 0);
        self.limatranslationPart10.minTrans[2] = Utils.getNoNil(y, 0);
        self.limatranslationPart10.minTrans[3] = Utils.getNoNil(z, 0);

        x, y, z = Utils.getVectorFromString(getXMLString(xmlFile, "vehicle.limatranslationPart10#maxTrans"));
        self.limatranslationPart10.maxTrans = {};
        self.limatranslationPart10.maxTrans[1] = Utils.getNoNil(x, 0);
        self.limatranslationPart10.maxTrans[2] = Utils.getNoNil(y, 0);
        self.limatranslationPart10.maxTrans[3] = Utils.getNoNil(z, 0);

        self.limatranslationPart10.transTime = Utils.getNoNil(getXMLString(xmlFile, "vehicle.limatranslationPart10#transTime"), 2)*100;
        self.limatranslationPart10.touchTransLimit = Utils.getNoNil(getXMLString(xmlFile, "vehicle.limatranslationPart10#touchTransLimit"), 10);
    end;
	local limatranslationPartNode11 = Utils.indexToObject(self.rootNode, getXMLString(xmlFile, "vehicle.limatranslationPart11#index"));
        if limatranslationPartNode11 ~= nil then
        self.limatranslationPart11 = {};
        self.limatranslationPart11.node = limatranslationPartNode11;
        local x, y, z = Utils.getVectorFromString(getXMLString(xmlFile, "vehicle.limatranslationPart11#minTrans"));
        self.limatranslationPart11.minTrans = {};
        self.limatranslationPart11.minTrans[1] = Utils.getNoNil(x, 0);
        self.limatranslationPart11.minTrans[2] = Utils.getNoNil(y, 0);
        self.limatranslationPart11.minTrans[3] = Utils.getNoNil(z, 0);

        x, y, z = Utils.getVectorFromString(getXMLString(xmlFile, "vehicle.limatranslationPart11#maxTrans"));
        self.limatranslationPart11.maxTrans = {};
        self.limatranslationPart11.maxTrans[1] = Utils.getNoNil(x, 0);
        self.limatranslationPart11.maxTrans[2] = Utils.getNoNil(y, 0);
        self.limatranslationPart11.maxTrans[3] = Utils.getNoNil(z, 0);

        self.limatranslationPart11.transTime = Utils.getNoNil(getXMLString(xmlFile, "vehicle.limatranslationPart11#transTime"), 2)*100;
        self.limatranslationPart11.touchTransLimit = Utils.getNoNil(getXMLString(xmlFile, "vehicle.limatranslationPart11#touchTransLimit"), 10);
    end;
	local limatranslationPartNode12 = Utils.indexToObject(self.rootNode, getXMLString(xmlFile, "vehicle.limatranslationPart12#index"));
        if limatranslationPartNode12 ~= nil then
        self.limatranslationPart12 = {};
        self.limatranslationPart12.node = limatranslationPartNode12;
        local x, y, z = Utils.getVectorFromString(getXMLString(xmlFile, "vehicle.limatranslationPart12#minTrans"));
        self.limatranslationPart12.minTrans = {};
        self.limatranslationPart12.minTrans[1] = Utils.getNoNil(x, 0);
        self.limatranslationPart12.minTrans[2] = Utils.getNoNil(y, 0);
        self.limatranslationPart12.minTrans[3] = Utils.getNoNil(z, 0);

        x, y, z = Utils.getVectorFromString(getXMLString(xmlFile, "vehicle.limatranslationPart12#maxTrans"));
        self.limatranslationPart12.maxTrans = {};
        self.limatranslationPart12.maxTrans[1] = Utils.getNoNil(x, 0);
        self.limatranslationPart12.maxTrans[2] = Utils.getNoNil(y, 0);
        self.limatranslationPart12.maxTrans[3] = Utils.getNoNil(z, 0);

        self.limatranslationPart12.transTime = Utils.getNoNil(getXMLString(xmlFile, "vehicle.limatranslationPart12#transTime"), 2)*100;
        self.limatranslationPart12.touchTransLimit = Utils.getNoNil(getXMLString(xmlFile, "vehicle.limatranslationPart12#touchTransLimit"), 10);
    end;
	local limatranslationPartNode13 = Utils.indexToObject(self.rootNode, getXMLString(xmlFile, "vehicle.limatranslationPart13#index"));
        if limatranslationPartNode13 ~= nil then
        self.limatranslationPart13 = {};
        self.limatranslationPart13.node = limatranslationPartNode13;
        local x, y, z = Utils.getVectorFromString(getXMLString(xmlFile, "vehicle.limatranslationPart13#minTrans"));
        self.limatranslationPart13.minTrans = {};
        self.limatranslationPart13.minTrans[1] = Utils.getNoNil(x, 0);
        self.limatranslationPart13.minTrans[2] = Utils.getNoNil(y, 0);
        self.limatranslationPart13.minTrans[3] = Utils.getNoNil(z, 0);

        x, y, z = Utils.getVectorFromString(getXMLString(xmlFile, "vehicle.limatranslationPart13#maxTrans"));
        self.limatranslationPart13.maxTrans = {};
        self.limatranslationPart13.maxTrans[1] = Utils.getNoNil(x, 0);
        self.limatranslationPart13.maxTrans[2] = Utils.getNoNil(y, 0);
        self.limatranslationPart13.maxTrans[3] = Utils.getNoNil(z, 0);

        self.limatranslationPart13.transTime = Utils.getNoNil(getXMLString(xmlFile, "vehicle.limatranslationPart13#transTime"), 2)*100;
        self.limatranslationPart13.touchTransLimit = Utils.getNoNil(getXMLString(xmlFile, "vehicle.limatranslationPart13#touchTransLimit"), 10);
    end;
	local limatranslationPartNode14 = Utils.indexToObject(self.rootNode, getXMLString(xmlFile, "vehicle.limatranslationPart14#index"));
        if limatranslationPartNode14 ~= nil then
        self.limatranslationPart14 = {};
        self.limatranslationPart14.node = limatranslationPartNode14;
        local x, y, z = Utils.getVectorFromString(getXMLString(xmlFile, "vehicle.limatranslationPart14#minTrans"));
        self.limatranslationPart14.minTrans = {};
        self.limatranslationPart14.minTrans[1] = Utils.getNoNil(x, 0);
        self.limatranslationPart14.minTrans[2] = Utils.getNoNil(y, 0);
        self.limatranslationPart14.minTrans[3] = Utils.getNoNil(z, 0);

        x, y, z = Utils.getVectorFromString(getXMLString(xmlFile, "vehicle.limatranslationPart14#maxTrans"));
        self.limatranslationPart14.maxTrans = {};
        self.limatranslationPart14.maxTrans[1] = Utils.getNoNil(x, 0);
        self.limatranslationPart14.maxTrans[2] = Utils.getNoNil(y, 0);
        self.limatranslationPart14.maxTrans[3] = Utils.getNoNil(z, 0);

        self.limatranslationPart14.transTime = Utils.getNoNil(getXMLString(xmlFile, "vehicle.limatranslationPart14#transTime"), 2)*100;
        self.limatranslationPart14.touchTransLimit = Utils.getNoNil(getXMLString(xmlFile, "vehicle.limatranslationPart14#touchTransLimit"), 10);
    end;
	local limatranslationPartNode15 = Utils.indexToObject(self.rootNode, getXMLString(xmlFile, "vehicle.limatranslationPart15#index"));
        if limatranslationPartNode15 ~= nil then
        self.limatranslationPart15 = {};
        self.limatranslationPart15.node = limatranslationPartNode15;
        local x, y, z = Utils.getVectorFromString(getXMLString(xmlFile, "vehicle.limatranslationPart15#minTrans"));
        self.limatranslationPart15.minTrans = {};
        self.limatranslationPart15.minTrans[1] = Utils.getNoNil(x, 0);
        self.limatranslationPart15.minTrans[2] = Utils.getNoNil(y, 0);
        self.limatranslationPart15.minTrans[3] = Utils.getNoNil(z, 0);

        x, y, z = Utils.getVectorFromString(getXMLString(xmlFile, "vehicle.limatranslationPart15#maxTrans"));
        self.limatranslationPart15.maxTrans = {};
        self.limatranslationPart15.maxTrans[1] = Utils.getNoNil(x, 0);
        self.limatranslationPart15.maxTrans[2] = Utils.getNoNil(y, 0);
        self.limatranslationPart15.maxTrans[3] = Utils.getNoNil(z, 0);

        self.limatranslationPart15.transTime = Utils.getNoNil(getXMLString(xmlFile, "vehicle.limatranslationPart15#transTime"), 2)*100;
        self.limatranslationPart15.touchTransLimit = Utils.getNoNil(getXMLString(xmlFile, "vehicle.limatranslationPart15#touchTransLimit"), 10);
    end;
	local limatranslationPartNode16 = Utils.indexToObject(self.rootNode, getXMLString(xmlFile, "vehicle.limatranslationPart16#index"));
        if limatranslationPartNode16 ~= nil then
        self.limatranslationPart16 = {};
        self.limatranslationPart16.node = limatranslationPartNode16;
        local x, y, z = Utils.getVectorFromString(getXMLString(xmlFile, "vehicle.limatranslationPart16#minTrans"));
        self.limatranslationPart16.minTrans = {};
        self.limatranslationPart16.minTrans[1] = Utils.getNoNil(x, 0);
        self.limatranslationPart16.minTrans[2] = Utils.getNoNil(y, 0);
        self.limatranslationPart16.minTrans[3] = Utils.getNoNil(z, 0);

        x, y, z = Utils.getVectorFromString(getXMLString(xmlFile, "vehicle.limatranslationPart16#maxTrans"));
        self.limatranslationPart16.maxTrans = {};
        self.limatranslationPart16.maxTrans[1] = Utils.getNoNil(x, 0);
        self.limatranslationPart16.maxTrans[2] = Utils.getNoNil(y, 0);
        self.limatranslationPart16.maxTrans[3] = Utils.getNoNil(z, 0);

        self.limatranslationPart16.transTime = Utils.getNoNil(getXMLString(xmlFile, "vehicle.limatranslationPart16#transTime"), 2)*100;
        self.limatranslationPart16.touchTransLimit = Utils.getNoNil(getXMLString(xmlFile, "vehicle.limatranslationPart16#touchTransLimit"), 10);
    end;
	local limarotationNode1 = Utils.indexToObject(self.rootNode, getXMLString(xmlFile, "vehicle.limarotation1#index"));
    if limarotationNode1 ~= nil then
        self.limarotation1 = {};
        self.limarotation1.node = limarotationNode1;
        local x, y, z = Utils.getVectorFromString(getXMLString(xmlFile, "vehicle.limarotation1#minRot"));
        self.limarotation1.minRot = {};
        self.limarotation1.minRot[1] = Utils.degToRad(Utils.getNoNil(x, 0));
        self.limarotation1.minRot[2] = Utils.degToRad(Utils.getNoNil(y, 0));
        self.limarotation1.minRot[3] = Utils.degToRad(Utils.getNoNil(z, 0));

        x, y, z = Utils.getVectorFromString(getXMLString(xmlFile, "vehicle.limarotation1#maxRot"));
        self.limarotation1.maxRot = {};
        self.limarotation1.maxRot[1] = Utils.degToRad(Utils.getNoNil(x, 0));
        self.limarotation1.maxRot[2] = Utils.degToRad(Utils.getNoNil(y, 0));
        self.limarotation1.maxRot[3] = Utils.degToRad(Utils.getNoNil(z, 0));

        self.limarotation1.rotTime = Utils.getNoNil(getXMLString(xmlFile, "vehicle.limarotation1#rotTime"), 2)*100;
        self.limarotation1.touchRotLimit = Utils.degToRad(Utils.getNoNil(getXMLString(xmlFile, "vehicle.limarotation1#touchRotLimit"), 10));
    end;
	
	local limarotationNode2 = Utils.indexToObject(self.rootNode, getXMLString(xmlFile, "vehicle.limarotation2#index"));
    if limarotationNode2 ~= nil then
        self.limarotation2 = {};
        self.limarotation2.node = limarotationNode2;
        local x, y, z = Utils.getVectorFromString(getXMLString(xmlFile, "vehicle.limarotation2#minRot"));
        self.limarotation2.minRot = {};
        self.limarotation2.minRot[1] = Utils.degToRad(Utils.getNoNil(x, 0));
        self.limarotation2.minRot[2] = Utils.degToRad(Utils.getNoNil(y, 0));
        self.limarotation2.minRot[3] = Utils.degToRad(Utils.getNoNil(z, 0));

        x, y, z = Utils.getVectorFromString(getXMLString(xmlFile, "vehicle.limarotation2#maxRot"));
        self.limarotation2.maxRot = {};
        self.limarotation2.maxRot[1] = Utils.degToRad(Utils.getNoNil(x, 0));
        self.limarotation2.maxRot[2] = Utils.degToRad(Utils.getNoNil(y, 0));
        self.limarotation2.maxRot[3] = Utils.degToRad(Utils.getNoNil(z, 0));

        self.limarotation2.rotTime = Utils.getNoNil(getXMLString(xmlFile, "vehicle.limarotation2#rotTime"), 2)*100;
        self.limarotation2.touchRotLimit = Utils.degToRad(Utils.getNoNil(getXMLString(xmlFile, "vehicle.limarotation2#touchRotLimit"), 10));
    end;
    local limarotationNode4 = Utils.indexToObject(self.rootNode, getXMLString(xmlFile, "vehicle.limarotation4#index"));
    if limarotationNode4 ~= nil then
        self.limarotation4 = {};
        self.limarotation4.node = limarotationNode4;
        local x, y, z = Utils.getVectorFromString(getXMLString(xmlFile, "vehicle.limarotation4#minRot"));
        self.limarotation4.minRot = {};
        self.limarotation4.minRot[1] = Utils.degToRad(Utils.getNoNil(x, 0));
        self.limarotation4.minRot[2] = Utils.degToRad(Utils.getNoNil(y, 0));
        self.limarotation4.minRot[3] = Utils.degToRad(Utils.getNoNil(z, 0));

        x, y, z = Utils.getVectorFromString(getXMLString(xmlFile, "vehicle.limarotation4#maxRot"));
        self.limarotation4.maxRot = {};
        self.limarotation4.maxRot[1] = Utils.degToRad(Utils.getNoNil(x, 0));
        self.limarotation4.maxRot[2] = Utils.degToRad(Utils.getNoNil(y, 0));
        self.limarotation4.maxRot[3] = Utils.degToRad(Utils.getNoNil(z, 0));

        self.limarotation4.rotTime = Utils.getNoNil(getXMLString(xmlFile, "vehicle.limarotation4#rotTime"), 2)*100;
        self.limarotation4.touchRotLimit = Utils.degToRad(Utils.getNoNil(getXMLString(xmlFile, "vehicle.limarotation4#touchRotLimit"), 10));
    end;
    local limarotationNode5 = Utils.indexToObject(self.rootNode, getXMLString(xmlFile, "vehicle.limarotation5#index"));
    if limarotationNode5 ~= nil then
        self.limarotation5 = {};
        self.limarotation5.node = limarotationNode5;
        local x, y, z = Utils.getVectorFromString(getXMLString(xmlFile, "vehicle.limarotation5#minRot"));
        self.limarotation5.minRot = {};
        self.limarotation5.minRot[1] = Utils.degToRad(Utils.getNoNil(x, 0));
        self.limarotation5.minRot[2] = Utils.degToRad(Utils.getNoNil(y, 0));
        self.limarotation5.minRot[3] = Utils.degToRad(Utils.getNoNil(z, 0));

        x, y, z = Utils.getVectorFromString(getXMLString(xmlFile, "vehicle.limarotation5#maxRot"));
        self.limarotation5.maxRot = {};
        self.limarotation5.maxRot[1] = Utils.degToRad(Utils.getNoNil(x, 0));
        self.limarotation5.maxRot[2] = Utils.degToRad(Utils.getNoNil(y, 0));
        self.limarotation5.maxRot[3] = Utils.degToRad(Utils.getNoNil(z, 0));

        self.limarotation5.rotTime = Utils.getNoNil(getXMLString(xmlFile, "vehicle.limarotation5#rotTime"), 2)*100;
        self.limarotation5.touchRotLimit = Utils.degToRad(Utils.getNoNil(getXMLString(xmlFile, "vehicle.limarotation5#touchRotLimit"), 10));
    end;
    local limarotationNode6 = Utils.indexToObject(self.rootNode, getXMLString(xmlFile, "vehicle.limarotation6#index"));
    if limarotationNode6 ~= nil then
        self.limarotation6 = {};
        self.limarotation6.node = limarotationNode6;
        local x, y, z = Utils.getVectorFromString(getXMLString(xmlFile, "vehicle.limarotation6#minRot"));
        self.limarotation6.minRot = {};
        self.limarotation6.minRot[1] = Utils.degToRad(Utils.getNoNil(x, 0));
        self.limarotation6.minRot[2] = Utils.degToRad(Utils.getNoNil(y, 0));
        self.limarotation6.minRot[3] = Utils.degToRad(Utils.getNoNil(z, 0));

        x, y, z = Utils.getVectorFromString(getXMLString(xmlFile, "vehicle.limarotation6#maxRot"));
        self.limarotation6.maxRot = {};
        self.limarotation6.maxRot[1] = Utils.degToRad(Utils.getNoNil(x, 0));
        self.limarotation6.maxRot[2] = Utils.degToRad(Utils.getNoNil(y, 0));
        self.limarotation6.maxRot[3] = Utils.degToRad(Utils.getNoNil(z, 0));

        self.limarotation6.rotTime = Utils.getNoNil(getXMLString(xmlFile, "vehicle.limarotation6#rotTime"), 2)*100;
        self.limarotation6.touchRotLimit = Utils.degToRad(Utils.getNoNil(getXMLString(xmlFile, "vehicle.limarotation6#touchRotLimit"), 10));
    end;
	local limarotationNode7 = Utils.indexToObject(self.rootNode, getXMLString(xmlFile, "vehicle.limarotation7#index"));
    if limarotationNode7 ~= nil then
        self.limarotation7 = {};
        self.limarotation7.node = limarotationNode7;
        local x, y, z = Utils.getVectorFromString(getXMLString(xmlFile, "vehicle.limarotation7#minRot"));
        self.limarotation7.minRot = {};
        self.limarotation7.minRot[1] = Utils.degToRad(Utils.getNoNil(x, 0));
        self.limarotation7.minRot[2] = Utils.degToRad(Utils.getNoNil(y, 0));
        self.limarotation7.minRot[3] = Utils.degToRad(Utils.getNoNil(z, 0));

        x, y, z = Utils.getVectorFromString(getXMLString(xmlFile, "vehicle.limarotation7#maxRot"));
        self.limarotation7.maxRot = {};
        self.limarotation7.maxRot[1] = Utils.degToRad(Utils.getNoNil(x, 0));
        self.limarotation7.maxRot[2] = Utils.degToRad(Utils.getNoNil(y, 0));
        self.limarotation7.maxRot[3] = Utils.degToRad(Utils.getNoNil(z, 0));

        self.limarotation7.rotTime = Utils.getNoNil(getXMLString(xmlFile, "vehicle.limarotation7#rotTime"), 2)*100;
        self.limarotation7.touchRotLimit = Utils.degToRad(Utils.getNoNil(getXMLString(xmlFile, "vehicle.limarotation7#touchRotLimit"), 10));
    end;
end;
      
function Lichtmast:delete()
end;

function Lichtmast:mouseEvent(posX, posY, isDown, isUp, button)
end;
	  
function Lichtmast:keyEvent(unicode, sym, modifier, isDown)

    	if sym == Input.KEY_u then
		self.limatranslationMax = isDown;
		self.limatranslationMax2 = isDown;
                self.limatranslationMax3 = isDown;
                self.limatranslationMax4 = isDown;
	end;
	if sym == Input.KEY_j then
		self.limatranslationMin = isDown;
		self.limatranslationMin2 = isDown;
                self.limatranslationMin3 = isDown;
                self.limatranslationMin4 = isDown;
	end;
 	if sym == Input.KEY_o then
                self.limatranslationMax5 = isDown;
		self.limatranslationMax6 = isDown;
		self.limatranslationMax11 = isDown;
		self.limatranslationMax12 = isDown;
		self.limatranslationMax13 = isDown;
		self.limatranslationMax14 = isDown;
	end;
	if sym == Input.KEY_l then
                self.limatranslationMin5 = isDown;
		self.limatranslationMin6 = isDown;
		self.limatranslationMin11 = isDown;
		self.limatranslationMin12 = isDown;
		self.limatranslationMin13 = isDown;
		self.limatranslationMin14 = isDown;

	end;
	if sym == Input.KEY_b then
                self.limatranslationMax7 = isDown;
		self.limatranslationMax8 = isDown;
		self.limatranslationMax9 = isDown;
		self.limatranslationMax10 = isDown;
              
			
	end;
	if sym == Input.KEY_v then
                self.limatranslationMin7 = isDown;
		self.limatranslationMin8 = isDown;
		self.limatranslationMin9 = isDown;
		self.limatranslationMin10 = isDown;
			
	end;
	if sym == Input.KEY_0 then
		self.limarotation1Max = isDown;
	end;
	if sym == Input.KEY_9 then
		self.limarotation1Min = isDown;
	end;
	if sym == Input.KEY_n then
		self.limarotation2Max = isDown;
  		self.limarotation6Min = isDown;
        self.limatranslationMin15 = isDown;
		 self.limatranslationMin16 = isDown;
		self.limarotation7Min = isDown;
	end;
	if sym == Input.KEY_m then
		self.limarotation2Min = isDown;
		self.limarotation6Max = isDown;
                self.limatranslationMax15 = isDown;
				self.limatranslationMax16 = isDown;
				self.limarotation7Max = isDown;
	end;
	if sym == Input.KEY_KP_9 then
		self.limarotation4Max = isDown;
	end;

	if sym == Input.KEY_KP_7 then
		self.limarotation4Min = isDown;
	end;

	if sym == Input.KEY_KP_8 then
		self.limarotation5Max = isDown;
	end;

	if sym == Input.KEY_KP_5 then
		self.limarotation5Min = isDown;

	end;
 

end;

function Lichtmast:update(dt)
	
	local doTranslate = self.limatranslationMax or self.limatranslationMin 
	if self.limatranslationPart ~= nil and doTranslate then 
		local x, y, z = getTranslation(self.limatranslationPart.node); 
		local trans = {x,y,z}; 
		local newTrans = Utils.getMovedLimitedValues(trans, self.limatranslationPart.maxTrans, self.limatranslationPart.minTrans, 3, self.limatranslationPart.transTime, dt, not self.limatranslationMax); 
		setTranslation(self.limatranslationPart.node, unpack(newTrans)); 
	end; 
	local doTranslate = self.limatranslationMax2 or self.limatranslationMin2 
	if self.limatranslationPart2 ~= nil and doTranslate then 
		local x, y, z = getTranslation(self.limatranslationPart2.node); 
		local trans = {x,y,z}; 
		local newTrans = Utils.getMovedLimitedValues(trans, self.limatranslationPart2.maxTrans, self.limatranslationPart2.minTrans, 3, self.limatranslationPart2.transTime, dt, not self.limatranslationMax2); 
		setTranslation(self.limatranslationPart2.node, unpack(newTrans)); 
	end;
	local doTranslate = self.limatranslationMax3 or self.limatranslationMin3 
	if self.limatranslationPart3 ~= nil and doTranslate then 
		local x, y, z = getTranslation(self.limatranslationPart3.node); 
		local trans = {x,y,z}; 
		local newTrans = Utils.getMovedLimitedValues(trans, self.limatranslationPart3.maxTrans, self.limatranslationPart3.minTrans, 3, self.limatranslationPart3.transTime, dt, not self.limatranslationMax3); 
		setTranslation(self.limatranslationPart3.node, unpack(newTrans)); 
        end;
	local doTranslate = self.limatranslationMax4 or self.limatranslationMin4 
	if self.limatranslationPart4 ~= nil and doTranslate then 
		local x, y, z = getTranslation(self.limatranslationPart4.node); 
		local trans = {x,y,z}; 
		local newTrans = Utils.getMovedLimitedValues(trans, self.limatranslationPart4.maxTrans, self.limatranslationPart4.minTrans, 3, self.limatranslationPart4.transTime, dt, not self.limatranslationMax4); 
		setTranslation(self.limatranslationPart4.node, unpack(newTrans)); 
	end;
	local doTranslate = self.limatranslationMax5 or self.limatranslationMin5 
	if self.limatranslationPart5 ~= nil and doTranslate then 
		local x, y, z = getTranslation(self.limatranslationPart5.node); 
		local trans = {x,y,z}; 
		local newTrans = Utils.getMovedLimitedValues(trans, self.limatranslationPart5.maxTrans, self.limatranslationPart5.minTrans, 3, self.limatranslationPart5.transTime, dt, not self.limatranslationMax5); 
		setTranslation(self.limatranslationPart5.node, unpack(newTrans)); 
	end;
	local doTranslate = self.limatranslationMax6 or self.limatranslationMin6 
	if self.limatranslationPart6 ~= nil and doTranslate then 
		local x, y, z = getTranslation(self.limatranslationPart6.node); 
		local trans = {x,y,z}; 
		local newTrans = Utils.getMovedLimitedValues(trans, self.limatranslationPart6.maxTrans, self.limatranslationPart6.minTrans, 3, self.limatranslationPart6.transTime, dt, not self.limatranslationMax6); 
		setTranslation(self.limatranslationPart6.node, unpack(newTrans)); 
	end;
	local doTranslate = self.limatranslationMax7 or self.limatranslationMin7 
	if self.limatranslationPart7 ~= nil and doTranslate then 
		local x, y, z = getTranslation(self.limatranslationPart7.node); 
		local trans = {x,y,z}; 
		local newTrans = Utils.getMovedLimitedValues(trans, self.limatranslationPart7.maxTrans, self.limatranslationPart7.minTrans, 3, self.limatranslationPart7.transTime, dt, not self.limatranslationMax7); 
		setTranslation(self.limatranslationPart7.node, unpack(newTrans)); 
	end;
	local doTranslate = self.limatranslationMax8 or self.limatranslationMin8 
	if self.limatranslationPart8 ~= nil and doTranslate then 
		local x, y, z = getTranslation(self.limatranslationPart8.node); 
		local trans = {x,y,z}; 
		local newTrans = Utils.getMovedLimitedValues(trans, self.limatranslationPart8.maxTrans, self.limatranslationPart8.minTrans, 3, self.limatranslationPart8.transTime, dt, not self.limatranslationMax8); 
		setTranslation(self.limatranslationPart8.node, unpack(newTrans)); 
	end;
	local doTranslate = self.limatranslationMax9 or self.limatranslationMin9 
	if self.limatranslationPart9 ~= nil and doTranslate then 
		local x, y, z = getTranslation(self.limatranslationPart9.node); 
		local trans = {x,y,z}; 
		local newTrans = Utils.getMovedLimitedValues(trans, self.limatranslationPart9.maxTrans, self.limatranslationPart9.minTrans, 3, self.limatranslationPart9.transTime, dt, not self.limatranslationMax9); 
		setTranslation(self.limatranslationPart9.node, unpack(newTrans)); 
	end;
	local doTranslate = self.limatranslationMax10 or self.limatranslationMin10 
	if self.limatranslationPart10 ~= nil and doTranslate then 
		local x, y, z = getTranslation(self.limatranslationPart10.node); 
		local trans = {x,y,z}; 
		local newTrans = Utils.getMovedLimitedValues(trans, self.limatranslationPart10.maxTrans, self.limatranslationPart10.minTrans, 3, self.limatranslationPart10.transTime, dt, not self.limatranslationMax10); 
		setTranslation(self.limatranslationPart10.node, unpack(newTrans)); 
	end;
	local doTranslate = self.limatranslationMax11 or self.limatranslationMin11
	if self.limatranslationPart11 ~= nil and doTranslate then 
		local x, y, z = getTranslation(self.limatranslationPart11.node); 
		local trans = {x,y,z}; 
		local newTrans = Utils.getMovedLimitedValues(trans, self.limatranslationPart11.maxTrans, self.limatranslationPart11.minTrans, 3, self.limatranslationPart11.transTime, dt, not self.limatranslationMax11); 
		setTranslation(self.limatranslationPart11.node, unpack(newTrans)); 
	end;
	local doTranslate = self.limatranslationMax12 or self.limatranslationMin12
	if self.limatranslationPart12 ~= nil and doTranslate then 
		local x, y, z = getTranslation(self.limatranslationPart12.node); 
		local trans = {x,y,z}; 
		local newTrans = Utils.getMovedLimitedValues(trans, self.limatranslationPart12.maxTrans, self.limatranslationPart12.minTrans, 3, self.limatranslationPart12.transTime, dt, not self.limatranslationMax12); 
		setTranslation(self.limatranslationPart12.node, unpack(newTrans)); 
	end;
	local doTranslate = self.limatranslationMax13 or self.limatranslationMin13
	if self.limatranslationPart13 ~= nil and doTranslate then 
		local x, y, z = getTranslation(self.limatranslationPart13.node); 
		local trans = {x,y,z}; 
		local newTrans = Utils.getMovedLimitedValues(trans, self.limatranslationPart13.maxTrans, self.limatranslationPart13.minTrans, 3, self.limatranslationPart13.transTime, dt, not self.limatranslationMax13); 
		setTranslation(self.limatranslationPart13.node, unpack(newTrans)); 
	end;
	local doTranslate = self.limatranslationMax14 or self.limatranslationMin14
	if self.limatranslationPart14 ~= nil and doTranslate then 
		local x, y, z = getTranslation(self.limatranslationPart14.node); 
		local trans = {x,y,z}; 
		local newTrans = Utils.getMovedLimitedValues(trans, self.limatranslationPart14.maxTrans, self.limatranslationPart14.minTrans, 3, self.limatranslationPart14.transTime, dt, not self.limatranslationMax14); 
		setTranslation(self.limatranslationPart14.node, unpack(newTrans)); 
	end;
	local doTranslate = self.limatranslationMax15 or self.limatranslationMin15
	if self.limatranslationPart15 ~= nil and doTranslate then 
		local x, y, z = getTranslation(self.limatranslationPart15.node); 
		local trans = {x,y,z}; 
		local newTrans = Utils.getMovedLimitedValues(trans, self.limatranslationPart15.maxTrans, self.limatranslationPart15.minTrans, 3, self.limatranslationPart15.transTime, dt, not self.limatranslationMax15); 
		setTranslation(self.limatranslationPart15.node, unpack(newTrans)); 
	end;
	local doTranslate = self.limatranslationMax16 or self.limatranslationMin16
	if self.limatranslationPart16 ~= nil and doTranslate then 
		local x, y, z = getTranslation(self.limatranslationPart16.node); 
		local trans = {x,y,z}; 
		local newTrans = Utils.getMovedLimitedValues(trans, self.limatranslationPart16.maxTrans, self.limatranslationPart16.minTrans, 3, self.limatranslationPart16.transTime, dt, not self.limatranslationMax16); 
		setTranslation(self.limatranslationPart16.node, unpack(newTrans)); 
	end;

	local doRotate = self.limarotation1Max or self.limarotation1Min 
	if self.limarotation1 ~= nil and doRotate then
        local x, y, z = getRotation(self.limarotation1.node);
        local rot = {x,y,z};
        local newRot = Utils.getMovedLimitedValues(rot, self.limarotation1.maxRot, self.limarotation1.minRot, 3, self.limarotation1.rotTime, dt, not self.limarotation1Max);
        setRotation(self.limarotation1.node, unpack(newRot));
    end;
	
	local doRotate = self.limarotation2Max or self.limarotation2Min 
	if self.limarotation2 ~= nil and doRotate then
        local x, y, z = getRotation(self.limarotation2.node);
        local rot = {x,y,z};
        local newRot = Utils.getMovedLimitedValues(rot, self.limarotation2.maxRot, self.limarotation2.minRot, 3, self.limarotation2.rotTime, dt, not self.limarotation2Max);
        setRotation(self.limarotation2.node, unpack(newRot));
    end;
   
    	local doRotate = self.limarotation4Max or self.limarotation4Min
	if self.limarotation4 ~= nil and doRotate then
        local x, y, z = getRotation(self.limarotation4.node);
        local rot = {x,y,z};
        local newRot = Utils.getMovedLimitedValues(rot, self.limarotation4.maxRot, self.limarotation4.minRot, 3, self.limarotation4.rotTime, dt, not self.limarotation4Max);
        setRotation(self.limarotation4.node, unpack(newRot));
    end;
	local doRotate = self.limarotation5Max or self.limarotation5Min
	if self.limarotation5 ~= nil and doRotate then
        local x, y, z = getRotation(self.limarotation5.node);
        local rot = {x,y,z};
        local newRot = Utils.getMovedLimitedValues(rot, self.limarotation5.maxRot, self.limarotation5.minRot, 3, self.limarotation5.rotTime, dt, not self.limarotation5Max);
        setRotation(self.limarotation5.node, unpack(newRot));
    end;
	local doRotate = self.limarotation6Max or self.limarotation6Min
	if self.limarotation6 ~= nil and doRotate then
        local x, y, z = getRotation(self.limarotation6.node);
        local rot = {x,y,z};
        local newRot = Utils.getMovedLimitedValues(rot, self.limarotation6.maxRot, self.limarotation6.minRot, 3, self.limarotation6.rotTime, dt, not self.limarotation6Max);
        setRotation(self.limarotation6.node, unpack(newRot));
    end;
	local doRotate = self.limarotation7Max or self.limarotation7Min
	if self.limarotation7 ~= nil and doRotate then
        local x, y, z = getRotation(self.limarotation7.node);
        local rot = {x,y,z};
        local newRot = Utils.getMovedLimitedValues(rot, self.limarotation7.maxRot, self.limarotation7.minRot, 3, self.limarotation7.rotTime, dt, not self.limarotation7Max);
        setRotation(self.limarotation7.node, unpack(newRot));
    end;
end;

function Lichtmast:draw()
end;

function Lichtmast:validateAttacherJoint(implement, jointDesc, dt)
    return true;
end;
