--
-- compas
-- Class for Claas compas
--
-- @author  JACK (ICQ brauchst du nicht )
-- @date  21/04/09

compas = {};

function compas.prerequisitesPresent(specializations)
    return SpecializationUtil.hasSpecialization(Motorized, specializations);
end;

function compas:load(xmlFile)
end;


function compas:readStream(streamId, connection)
end;

function compas:writeStream(streamId, connection)
end;
function compas:keyEvent(unicode, sym, modifier, isDown)
end;

function compas:update(dt)
end;

function compas:draw()
	local x,y,z = localDirectionToWorld(self.rootNode, 0, 0, 1);
	local length = Utils.vector2Length(x,z);
	local dX = x/length;
	local dZ = z/length;
	local Richtung = math.deg(math.atan2(dX,dZ));
	if Richtung < 0  then 
		Richtung = 360 - (Richtung * -1);
    end;
	renderText(0.85,0.85,0.03,string.format("Smer: %3.0f ",360 - math.floor(Richtung + 0.5) ));
end;
	
	
function compas:mouseEvent(posX, posY, isDown, isUp, button)
end;

function compas:onEnter()
end;
	
function compas:delete()
end;

function compas:onLeave() 
end;

