Examples of rotateOverX()


Examples of sk.fiit.jim.math.Vector3D.rotateOverX()

      zAxis = zAxis.negate();
     
    Vector3D xAxis = yAxis.crossProduct(zAxis).toUnitVector();
   
    double rotationX = asin(-xAxis.getZ());
    double rotationZ = atan2( -xAxis.rotateOverX(rotationX).getY() / cos(rotationX), xAxis.rotateOverX(rotationX).getX() / cos(rotationX));
    double rotationY = atan2( -yAxis.rotateOverX(rotationX).getZ() / cos(rotationX), zAxis.rotateOverX(rotationX).getZ() / cos(rotationX));
    this.agent.rotationX = Angles.normalize(rotationX);
    this.agent.rotationY = Angles.normalize(rotationY);
    this.agent.rotationZ = Angles.normalize(rotationZ);
    Log.log(AGENT_MODEL, "My rotation: [%.2f,%.2f,%.2f]", rotationX, rotationY, rotationZ);
View Full Code Here

Examples of sk.fiit.jim.math.Vector3D.rotateOverX()

      zAxis = zAxis.negate();
     
    Vector3D xAxis = yAxis.crossProduct(zAxis).toUnitVector();
   
    double rotationX = asin(-xAxis.getZ());
    double rotationZ = atan2( -xAxis.rotateOverX(rotationX).getY() / cos(rotationX), xAxis.rotateOverX(rotationX).getX() / cos(rotationX));
    double rotationY = atan2( -yAxis.rotateOverX(rotationX).getZ() / cos(rotationX), zAxis.rotateOverX(rotationX).getZ() / cos(rotationX));
    this.agent.rotationX = Angles.normalize(rotationX);
    this.agent.rotationY = Angles.normalize(rotationY);
    this.agent.rotationZ = Angles.normalize(rotationZ);
    Log.log(AGENT_MODEL, "My rotation: [%.2f,%.2f,%.2f]", rotationX, rotationY, rotationZ);
View Full Code Here

Examples of sk.fiit.jim.math.Vector3D.rotateOverX()

      zAxis = zAxis.negate();

    Vector3D xAxis = yAxis.crossProduct(zAxis).toUnitVector();

    double rotationX = asin(-xAxis.getZ());
    double rotationZ = atan2( -xAxis.rotateOverX(rotationX).getY() / cos(rotationX), xAxis.rotateOverX(rotationX).getX() / cos(rotationX));
    double rotationY = atan2( -yAxis.rotateOverX(rotationX).getZ() / cos(rotationX), zAxis.rotateOverX(rotationX).getZ() / cos(rotationX));

    this.agent.rotationX = Angles.normalize(rotationX);
    this.agent.rotationY = Angles.normalize(rotationY);
    this.agent.rotationZ = Angles.normalize(rotationZ);
View Full Code Here

Examples of sk.fiit.jim.math.Vector3D.rotateOverX()

      zAxis = zAxis.negate();

    Vector3D xAxis = yAxis.crossProduct(zAxis).toUnitVector();

    double rotationX = asin(-xAxis.getZ());
    double rotationZ = atan2( -xAxis.rotateOverX(rotationX).getY() / cos(rotationX), xAxis.rotateOverX(rotationX).getX() / cos(rotationX));
    double rotationY = atan2( -yAxis.rotateOverX(rotationX).getZ() / cos(rotationX), zAxis.rotateOverX(rotationX).getZ() / cos(rotationX));

    this.agent.rotationX = Angles.normalize(rotationX);
    this.agent.rotationY = Angles.normalize(rotationY);
    this.agent.rotationZ = Angles.normalize(rotationZ);
View Full Code Here

Examples of sk.fiit.jim.math.Vector3D.rotateOverX()

    for(Entry<FixedObject, Vector3D> flag : fixedObjects.entrySet()){
      Vector3D absolute = flag.getKey().getAbsolutePosition();
      Vector3D seen = flag.getValue();

      flagsXYZ.add(seen.rotateOverX(agent.rotationX).rotateOverY(agent.rotationY).rotateOverZ(agent.rotationZ).negate().add(absolute));
      flagsXZY.add(seen.rotateOverX(agent.rotationX).rotateOverZ(agent.rotationZ).rotateOverY(agent.rotationY).negate().add(absolute));
      flagsYXZ.add(seen.rotateOverY(agent.rotationY).rotateOverX(agent.rotationX).rotateOverZ(agent.rotationZ).negate().add(absolute));
      flagsYZX.add(seen.rotateOverY(agent.rotationY).rotateOverZ(agent.rotationZ).rotateOverX(agent.rotationX).negate().add(absolute));
      flagsZXY.add(seen.rotateOverZ(agent.rotationZ).rotateOverX(agent.rotationX).rotateOverY(agent.rotationY).negate().add(absolute));
      flagsZYX.add(seen.rotateOverZ(agent.rotationZ).rotateOverY(agent.rotationY).rotateOverX(agent.rotationX).negate().add(absolute));
View Full Code Here

Examples of sk.fiit.jim.math.Vector3D.rotateOverX()

    for(Entry<FixedObject, Vector3D> flag : fixedObjects.entrySet()){
      Vector3D absolute = flag.getKey().getAbsolutePosition();
      Vector3D seen = flag.getValue();

      flagsXYZ.add(seen.rotateOverX(agent.rotationX).rotateOverY(agent.rotationY).rotateOverZ(agent.rotationZ).negate().add(absolute));
      flagsXZY.add(seen.rotateOverX(agent.rotationX).rotateOverZ(agent.rotationZ).rotateOverY(agent.rotationY).negate().add(absolute));
      flagsYXZ.add(seen.rotateOverY(agent.rotationY).rotateOverX(agent.rotationX).rotateOverZ(agent.rotationZ).negate().add(absolute));
      flagsYZX.add(seen.rotateOverY(agent.rotationY).rotateOverZ(agent.rotationZ).rotateOverX(agent.rotationX).negate().add(absolute));
      flagsZXY.add(seen.rotateOverZ(agent.rotationZ).rotateOverX(agent.rotationX).rotateOverY(agent.rotationY).negate().add(absolute));
      flagsZYX.add(seen.rotateOverZ(agent.rotationZ).rotateOverY(agent.rotationY).rotateOverX(agent.rotationX).negate().add(absolute));
    }
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.