Examples of distanceTo()


Examples of gml4u.model.GmlPoint.distanceTo()

     
      if (prev.isZeroVector()) {
        prev.set(point.scale(scale));
      }
      cur = point.scale(scale);
      float dist = cur.distanceTo(prev);
      dist = PApplet.constrain(dist, 1, 20);
     
      g.pushMatrix();
      if (g.is3D()) {
        g.translate(cur.x, cur.y, cur.z);
View Full Code Here

Examples of lejos.robotics.Pose.distanceTo()

    Pose pose = start;
   
    // Continue until we return a route or throw DestinationUnReachableException
    for(;;) {
      // If the current pose if close enough to the destination, go straight there
      if (pose.distanceTo(destination.getLocation()) < MAX_DISTANCE) {
        add(new WayPoint(destination));
        return this;
      } else {
        Pose testPose = null;
       
View Full Code Here

Examples of lejos.robotics.Pose.distanceTo()

        // Generate random poses and apply tests to them
        for(int i=0;i<MAX_ITERATIONS;i++) {
            testPose = generatePose();
           
            // The new Pose must not be more than MAX_DISTANCE away from current pose     
            if (testPose.distanceTo(pose.getLocation()) > MAX_DISTANCE) continue;
           
          // The new pose must be at least MIN_GAIN closer to the destination
          if (pose.distanceTo(destination.getLocation()) -
              testPose.distanceTo(destination.getLocation()) < MIN_GAIN)
            continue;
View Full Code Here

Examples of net.machinemuse.numina.geometry.MusePoint2D.distanceTo()

            if (otherModule != selectedClickie && otherModule != module && otherModule.getPosition().distanceTo(modulePosition) < 16) {
                MusePoint2D euclideanDistance = otherModule.getPosition().minus(module.getPosition());
                MusePoint2D directionVector = euclideanDistance.normalize();
                MusePoint2D tangentTarget = directionVector.times(16).plus(module.getPosition());
                MusePoint2D midpointTangent = otherModule.getPosition().midpoint(tangentTarget);
                if (midpointTangent.distanceTo(module.getPosition()) > 2) {
                    otherModule.move(midpointTangent.x(), midpointTangent.y());
                }
                // Point2D away = directionVector.times(0).plus(modulePosition);
                // module.move(away.x(), away.y());
            }
View Full Code Here

Examples of net.minecraft.util.Vec3.distanceTo()

                    {
                        if (this.taskEntityWorld.getBlockId(i2, i3, i4) == _blockID)
                        {
                            Vec3 vec3d2 = Vec3.createVectorHelper(i2, i3, i4);

                            if (vec3d1 == null || vec3d2.distanceTo(vec3d) < d)
                            {
                                vec3d1 = vec3d2;
                                d = vec3d1.distanceTo(vec3d);
                            }
                        }
View Full Code Here

Examples of net.minecraft.util.Vec3.distanceTo()

                        {
                            if (this.taskEntityWorld.getBlockId(j2, j3, j4) == _blockID)
                            {
                                Vec3 vec3d3 = Vec3.createVectorHelper(j2, j3, j4);

                                if (vec3d1 == null || vec3d3.distanceTo(vec3d) < d)
                                {
                                    vec3d1 = vec3d3;
                                    d = vec3d1.distanceTo(vec3d);
                                }
                            }
View Full Code Here

Examples of net.minecraft.util.Vec3.distanceTo()

                            {
                                if (this.taskEntityWorld.getBlockId(k2, k3, k4) == _blockID)
                                {
                                    Vec3 vec3d4 = Vec3.createVectorHelper(k2, k3, k4);

                                    if (vec3d1 == null || vec3d4.distanceTo(vec3d) < d)
                                    {
                                        vec3d1 = vec3d4;
                                        d = vec3d1.distanceTo(vec3d);
                                    }
                                }
View Full Code Here

Examples of net.minecraft.util.Vec3.distanceTo()

                            {
                                if (this.taskEntityWorld.getBlockId(l2, l3, l4) == _blockID)
                                {
                                    Vec3 vec3d5 = Vec3.createVectorHelper(l2, l3, l4);

                                    if (vec3d1 == null || vec3d5.distanceTo(vec3d) < d)
                                    {
                                        vec3d1 = vec3d5;
                                        d = vec3d1.distanceTo(vec3d);
                                    }
                                }
View Full Code Here

Examples of org.osm2world.core.math.VectorXYZ.distanceTo()

        }
       
        // determine width of the lane at that point
       
        double width = (i % 2 == 0)
            ? v.distanceTo(vs.get(i+1))
            : v.distanceTo(vs.get(i-1));
       
        // determine whether this vertex should get the higher or
        // lower t coordinate from the vertex pair
       
View Full Code Here

Examples of org.osm2world.core.math.VectorXYZ.distanceTo()

       
        // determine width of the lane at that point
       
        double width = (i % 2 == 0)
            ? v.distanceTo(vs.get(i+1))
            : v.distanceTo(vs.get(i-1));
       
        // determine whether this vertex should get the higher or
        // lower t coordinate from the vertex pair
       
        boolean higher = i % 2 == 0;
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.