--
-- ExCylindered
--
-- M@D Author:  Heady
-- M@D date: 04.11.2011
--
-- > Copyright (C) Heady - www.planet-ls.de < --
--


ExCylindered = {};

function ExCylindered.prerequisitesPresent(specializations)
    return SpecializationUtil.hasSpecialization(Cylindered, specializations);
end;

function ExCylindered:load(xmlFile)


end;


function ExCylindered:delete()
end;
	
function ExCylindered:mouseEvent(posX, posY, isDown, isUp, button)
end;

function ExCylindered:keyEvent(unicode, sym, modifier, isDown)
end;

--function ExCylindered:readStream(streamId, connection)
--end;

--function ExCylindered:writeStream(streamId, connection)
--end;

function ExCylindered:update(dt)
end;

function ExCylindered:updateTick(dt)

	if self.foldMoveDirection ~= 0 then
		for i, part in ipairs(self.movingParts) do
			if part.translatingParts[2] ~= nil then
				local refX,refY,refZ = getWorldTranslation(part.referencePoint);
				local translatingPart = part.translatingParts[2];
				local _, _, dist = worldToLocal(part.node, refX, refY, refZ);
				local newZ = dist;
				setScale(part.translatingParts[2].node, 1, 1, newZ);
			end;
		end;
	end;

end;

function ExCylindered:draw()
end;