Examples of angle()


Examples of com.badlogic.gdx.math.Vector2.angle()

    Vector3 orig = new Vector3(0, 0, 0);
    Vector3 vec = new Vector3(1, 0, 0);
    project(orig);
    project(vec);
    Vector2 d = new Vector2(vec.x - orig.x, -(vec.y - orig.y));
    return d.angle();
  }

  private Vector3 calculateDirection (float angle) {
    Matrix4 transform = new Matrix4();
    Vector3 dir = new Vector3(-1, 0, 1).nor();
View Full Code Here

Examples of com.badlogic.gdx.math.Vector2.angle()

    Vector3 orig = new Vector3(0, 0, 0);
    Vector3 vec = new Vector3(1, 0, 0);
    project(orig);
    project(vec);
    Vector2 d = new Vector2(vec.x - orig.x, -(vec.y - orig.y));
    return d.angle();
  }

  private Vector3 calculateDirection (float angle) {
    Matrix4 transform = new Matrix4();
    Vector3 dir = new Vector3(-1, 0, 1).nor();
View Full Code Here

Examples of com.vividsolutions.jts.geom.LineSegment.angle()

              int i=0;
              while(i+2<c.length){
                LineSegment ls1 = new LineSegment(c[i],c[i+1]);
                LineSegment ls2 = new LineSegment(c[i+1],c[i+2]);
                double a1 = ls1.angle();
                double a2 = ls2.angle();
                if(!((a1-degreesAllowable)<a1 && (a1+degreesAllowable)>a2)){
                  results.error(line,"Atleast one node was too close to the other the perpendicular line between the node's two neighbours.");
              i = c.length;
                }
              }
View Full Code Here

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

        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);
        Vector2D senderLOV = env.getNormalizedLOV(wanda.id());
        dir = senderLOV.drehrichtung(vecToSender) ? -1 : 1;
View Full Code Here

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

        //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;
               
                msg.setSenderOrientation(dir * Math.toDegrees(ownLOV.angle(senderLOV)));
 
View Full Code Here

Examples of javax.vecmath.Vector3f.angle()

        vectorB.sub(leadPointPrev, getWingPoint(i - 1));
        vectorC.cross(vectorA, vectorB);
        vectorD.cross(vectorA, vectorC);
        vectorD.normalize();
        if (previousVectorD != null
            && previousVectorD.angle(vectorD) > Math.PI / 2)
          vectorD.scale(-1);
        previousVectorD = wingVectors[i] = new Vector3f(vectorD);
      }
    }
    leadPoints[monomerCount] = leadMidpoints[monomerCount] = getTerminatorPoint();
View Full Code Here

Examples of javax.vecmath.Vector3f.angle()

          vectorA.sub(leadMidpoints[i], leadPoints[i]);
          vectorB.sub(leadPoints[i], leadMidpoints[i + 1]);
          vectorC.cross(vectorA, vectorB);
          vectorC.normalize();
          if (previousVectorC != null
              && previousVectorC.angle(vectorC) > Math.PI / 2)
            vectorC.scale(-1);
          previousVectorC = wingVectors[i] = new Vector3f(vectorC);
        }
      }
    }
View Full Code Here

Examples of javax.vecmath.Vector3f.angle()

          .getCarbonylCarbonAtom());
      for (int i = monomerCount; --i > monomerIndexFirst;) {
        amino = (AminoMonomer) alphaPolymer.monomers[i];
        vectorCO.sub(amino.getCarbonylOxygenAtom(), amino
            .getCarbonylCarbonAtom());
        if (vectorCOSum.angle(vectorCO) < (float) Math.PI / 2)
          vectorCOSum.add(vectorCO);
        else
          vectorCOSum.sub(vectorCO);
      }
      heightUnitVector = vectorCO; // just reuse the same temp vector;
View Full Code Here

Examples of org.osm2world.core.math.VectorXZ.angle()

          break;
        case PILLAR:
          height = parseHeight(node.getTags(), 1.8f);
         
          target.drawBox(poleMaterial,
              getBase().add(new VectorXYZ(0,0, -0.05).rotateY(faceVector.angle())),
              faceVector, height-0.3, 0.1, 0.1);
          target.drawBox(machineMaterial,
              getBase().addY(height-1).add(new VectorXYZ(0,0, 0.1 ).rotateY(directionAngle)),
              faceVector, 1, 1, 0.2);
         
View Full Code Here

Examples of org.thechiselgroup.choosel.protovis.client.PVFillPartitionLayout.PVRadialNode.angle()

        }).strokeStyle("#fff").lineWidth(.5);

        partition.label().add(PV.Label).visible(new JsBooleanFunction() {
            public boolean f(JsArgs args) {
                PVRadialNode d = args.getObject();
                return d.angle() * d.outerRadius() >= 6;
            }
        });
    }

    @Override
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.