Examples of Distance


Examples of org.jbox2d.collision.Distance

    vecs = new OrderedStackVec2(argSize, argContainerSize);
    vec3s = new OrderedStackVec3(argSize, argContainerSize);
    mats = new OrderedStackMat22(argSize, argContainerSize);
    aabbs = new OrderedStackAABB(argSize, argContainerSize);

    dist = new Distance();
    collision = new Collision(this);
    toi = new TimeOfImpact(this);
  }
View Full Code Here

Examples of org.jbox2d.collision.Distance

      public Mat33 gen () {
        return new Mat33();
      }
    }, argSize, new Mat33[argContainerSize]);

    dist = new Distance();
    collision = new Collision(this);
    toi = new TimeOfImpact(this);
  }
View Full Code Here

Examples of org.jbox2d.collision.Distance

      protected Mat33 newInstance () {
        return new Mat33();
      }
    };

    dist = new Distance();
    collision = new Collision(this);
    toi = new TimeOfImpact(this);
  }
View Full Code Here

Examples of org.neo4j.gis.spatial.pipes.processing.Distance

   
    /**
     * @see Distance
     */
    public GeoPipeline calculateDistance(Geometry reference) {
      return addPipe(new Distance(reference));
    }
View Full Code Here

Examples of org.springframework.data.geo.Distance

   * @see DATAREST-279
   */
  @Test
  public void parsesDistanceFromString() {

    Distance reference = new Distance(10.8, Metrics.KILOMETERS);

    assertThat(INSTANCE.convert("10.8km"), is(reference));
    assertThat(INSTANCE.convert(" 10.8km"), is(reference));
    assertThat(INSTANCE.convert(" 10.8 km"), is(reference));
    assertThat(INSTANCE.convert(" 10.8 km "), is(reference));
View Full Code Here

Examples of org.springframework.data.geo.Distance

   */
  public Criteria within(Point location, Distance distance) {
    Assert.notNull(location);
    assertPositiveDistanceValue(distance);
    predicates.add(new Predicate(OperationKey.WITHIN, new Object[] { location,
        distance != null ? distance : new Distance(0) }));
    return this;
  }
View Full Code Here

Examples of org.springframework.data.geo.Distance

  public Criteria near(Point location, Distance distance) {
    Assert.notNull(location, "Location must not be 'null' for near criteria.");
    assertPositiveDistanceValue(distance);

    predicates.add(new Predicate(OperationKey.NEAR, new Object[] { location,
        distance != null ? distance : new Distance(0) }));
    return this;
  }
View Full Code Here

Examples of org.springframework.data.geo.Distance

    sampleEntity.setLocation(new GeoPoint(45.7806d, 3.0875d));

    repository.save(sampleEntity);

    // when
    Page<SampleEntity> page = repository.findByLocationWithin(new Point(3.0875d, 45.7806d), new Distance(2, Metrics.KILOMETERS), new PageRequest(0, 10));
    // then
    assertThat(page, is(notNullValue()));
    assertThat(page.getTotalElements(), is(equalTo(1L)));
  }
View Full Code Here

Examples of org.springframework.data.geo.Distance

    sampleEntity.setLocation(new GeoPoint(45.7806d, 3.0875d));

    repository.save(sampleEntity);

    // when
    Page<SampleEntity> page = repository.findByLocationNear(new Point(3.0875d, 45.7806d), new Distance(2, Metrics.KILOMETERS), new PageRequest(0, 10));
    // then
    assertThat(page, is(notNullValue()));
    assertThat(page.getTotalElements(), is(equalTo(1L)));
  }
View Full Code Here

Examples of org.springframework.data.geo.Distance

    sampleEntity2.setLocation(new GeoPoint(30.7806d, 0.0875d));

    repository.save(sampleEntity2);

    // when
    long count = repository.countByLocationWithin(new Point(3.0875d, 45.7806d), new Distance(2, Metrics.KILOMETERS));
    // then
    assertThat(count, is(equalTo(1L)));
  }
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.