Examples of drehrichtung()


Examples of eas.math.geometry.Vector2D.drehrichtung()

        //angle seen from self = Angle between own LOV and vector to sender
        Vector2D  vecToSender = new Vector2D(env.getAgentPosition(wanda.id()));
        vecToSender.sub(env.getAgentPosition(body.id()));
       
        Vector2D ownLOV = env.getNormalizedLOV(body.id());
        int dir = ownLOV.drehrichtung(vecToSender) ? -1 : 1;
       
        msg.setAngleSeenFromSelf(dir * Math.toDegrees(ownLOV.angle(vecToSender)));       
       
        //angle seen from remote = Angle between sender LOV and vector to self
        vecToSender.mult(-1);
View Full Code Here

Examples of eas.math.geometry.Vector2D.drehrichtung()

        msg.setAngleSeenFromSelf(dir * Math.toDegrees(ownLOV.angle(vecToSender)));       
       
        //angle seen from remote = Angle between sender LOV and vector to self
        vecToSender.mult(-1);
        Vector2D senderLOV = env.getNormalizedLOV(wanda.id());
        dir = senderLOV.drehrichtung(vecToSender) ? -1 : 1;
       
        msg.setAngleSeenFromRemote(dir * Math.toDegrees(senderLOV.angle(vecToSender)));
       
        //orientation of sender = Angle between sender LOV and own LOV
                dir = ownLOV.drehrichtung(senderLOV) ? -1 : 1;
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.