Tabnine Logo
Distance
Code IndexAdd Tabnine to your IDE (free)

How to use
Distance
in
org.jbox2d.collision

Best Java code snippets using org.jbox2d.collision.Distance (Showing top 17 results out of 315)

origin: libgdx/libgdx

/**
 * Determine if two generic shapes overlap.
 * 
 * @param shapeA
 * @param shapeB
 * @param xfA
 * @param xfB
 * @return
 */
public final boolean testOverlap(Shape shapeA, int indexA, Shape shapeB, int indexB,
  Transform xfA, Transform xfB) {
 input.proxyA.set(shapeA, indexA);
 input.proxyB.set(shapeB, indexB);
 input.transformA.set(xfA);
 input.transformB.set(xfB);
 input.useRadii = true;
 cache.count = 0;
 pool.getDistance().distance(output, cache, input);
 // djm note: anything significant about 10.0f?
 return output.distance < 10.0f * Settings.EPSILON;
}
origin: libgdx/libgdx

public DefaultWorldPool(int argSize, int argContainerSize) {
 vecs = new OrderedStack<Vec2>(argSize, argContainerSize) {
  protected Vec2 newInstance() { return new Vec2(); }
 };
 vec3s = new OrderedStack<Vec3>(argSize, argContainerSize) {
  protected Vec3 newInstance() { return new Vec3(); }
 };
 mats = new OrderedStack<Mat22>(argSize, argContainerSize) {
  protected Mat22 newInstance() { return new Mat22(); }
 };
 aabbs = new OrderedStack<AABB>(argSize, argContainerSize) {
  protected AABB newInstance() { return new AABB(); }
 };
 rots = new OrderedStack<Rot>(argSize, argContainerSize) {
  protected Rot newInstance() { return new Rot(); }
 };
 mat33s = new OrderedStack<Mat33>(argSize, argContainerSize) {
  protected Mat33 newInstance() { return new Mat33(); }
 };
 dist = new Distance();
 collision = new Collision(this);
 toi = new TimeOfImpact(this);
}
origin: libgdx/libgdx

pool.getDistance().distance(distanceOutput, cache, distanceInput);
origin: jbox2d/jbox2d

public DefaultWorldPool(int argSize, int argContainerSize) {
 vecs = new OrderedStack<Vec2>(argSize, argContainerSize) {
  protected Vec2 newInstance() { return new Vec2(); }
 };
 vec3s = new OrderedStack<Vec3>(argSize, argContainerSize) {
  protected Vec3 newInstance() { return new Vec3(); }
 };
 mats = new OrderedStack<Mat22>(argSize, argContainerSize) {
  protected Mat22 newInstance() { return new Mat22(); }
 };
 aabbs = new OrderedStack<AABB>(argSize, argContainerSize) {
  protected AABB newInstance() { return new AABB(); }
 };
 rots = new OrderedStack<Rot>(argSize, argContainerSize) {
  protected Rot newInstance() { return new Rot(); }
 };
 mat33s = new OrderedStack<Mat33>(argSize, argContainerSize) {
  protected Mat33 newInstance() { return new Mat33(); }
 };
 dist = new Distance();
 collision = new Collision(this);
 toi = new TimeOfImpact(this);
}
origin: jbox2d/jbox2d

/**
 * Determine if two generic shapes overlap.
 * 
 * @param shapeA
 * @param shapeB
 * @param xfA
 * @param xfB
 * @return
 */
public final boolean testOverlap(Shape shapeA, int indexA, Shape shapeB, int indexB,
  Transform xfA, Transform xfB) {
 input.proxyA.set(shapeA, indexA);
 input.proxyB.set(shapeB, indexB);
 input.transformA.set(xfA);
 input.transformB.set(xfB);
 input.useRadii = true;
 cache.count = 0;
 pool.getDistance().distance(output, cache, input);
 // djm note: anything significant about 10.0f?
 return output.distance < 10.0f * Settings.EPSILON;
}
origin: org.jbox2d/jbox2d-library

public DefaultWorldPool(int argSize, int argContainerSize) {
 vecs = new OrderedStack<Vec2>(argSize, argContainerSize) {
  protected Vec2 newInstance() { return new Vec2(); }
 };
 vec3s = new OrderedStack<Vec3>(argSize, argContainerSize) {
  protected Vec3 newInstance() { return new Vec3(); }
 };
 mats = new OrderedStack<Mat22>(argSize, argContainerSize) {
  protected Mat22 newInstance() { return new Mat22(); }
 };
 aabbs = new OrderedStack<AABB>(argSize, argContainerSize) {
  protected AABB newInstance() { return new AABB(); }
 };
 rots = new OrderedStack<Rot>(argSize, argContainerSize) {
  protected Rot newInstance() { return new Rot(); }
 };
 mat33s = new OrderedStack<Mat33>(argSize, argContainerSize) {
  protected Mat33 newInstance() { return new Mat33(); }
 };
 dist = new Distance();
 collision = new Collision(this);
 toi = new TimeOfImpact(this);
}
origin: jbox2d/jbox2d

input.useRadii = true;
cache.count = 0;
getWorld().getPool().getDistance().distance(output, cache, input);
origin: andmizi/MobikeTags

public DefaultWorldPool(int argSize, int argContainerSize) {
 vecs = new OrderedStack<Vec2>(argSize, argContainerSize) {
  protected Vec2 newInstance() { return new Vec2(); }
 };
 vec3s = new OrderedStack<Vec3>(argSize, argContainerSize) {
  protected Vec3 newInstance() { return new Vec3(); }
 };
 mats = new OrderedStack<Mat22>(argSize, argContainerSize) {
  protected Mat22 newInstance() { return new Mat22(); }
 };
 aabbs = new OrderedStack<AABB>(argSize, argContainerSize) {
  protected AABB newInstance() { return new AABB(); }
 };
 rots = new OrderedStack<Rot>(argSize, argContainerSize) {
  protected Rot newInstance() { return new Rot(); }
 };
 mat33s = new OrderedStack<Mat33>(argSize, argContainerSize) {
  protected Mat33 newInstance() { return new Mat33(); }
 };
 dist = new Distance();
 collision = new Collision(this);
 toi = new TimeOfImpact(this);
}
origin: jbox2d/jbox2d

pool.getDistance().distance(distanceOutput, cache, distanceInput);
origin: com.github.almasb/fxgl-physics

dist = new Distance();
collision = new Collision(this);
toi = new TimeOfImpact(this);
origin: org.jbox2d/jbox2d-library

/**
 * Determine if two generic shapes overlap.
 * 
 * @param shapeA
 * @param shapeB
 * @param xfA
 * @param xfB
 * @return
 */
public final boolean testOverlap(Shape shapeA, int indexA, Shape shapeB, int indexB,
  Transform xfA, Transform xfB) {
 input.proxyA.set(shapeA, indexA);
 input.proxyB.set(shapeB, indexB);
 input.transformA.set(xfA);
 input.transformB.set(xfB);
 input.useRadii = true;
 cache.count = 0;
 pool.getDistance().distance(output, cache, input);
 // djm note: anything significant about 10.0f?
 return output.distance < 10.0f * Settings.EPSILON;
}
origin: andmizi/MobikeTags

/**
 * Determine if two generic shapes overlap.
 * 
 * @param shapeA
 * @param shapeB
 * @param xfA
 * @param xfB
 * @return
 */
public final boolean testOverlap(Shape shapeA, int indexA, Shape shapeB, int indexB,
                 Transform xfA, Transform xfB) {
 input.proxyA.set(shapeA, indexA);
 input.proxyB.set(shapeB, indexB);
 input.transformA.set(xfA);
 input.transformB.set(xfB);
 input.useRadii = true;
 cache.count = 0;
 pool.getDistance().distance(output, cache, input);
 // djm note: anything significant about 10.0f?
 return output.distance < 10.0f * Settings.EPSILON;
}
origin: com.github.almasb/fxgl-physics

/**
 * Determine if two generic shapes overlap.
 *
 * @param shapeA
 * @param shapeB
 * @param xfA
 * @param xfB
 * @return
 */
public final boolean testOverlap(Shape shapeA, int indexA, Shape shapeB, int indexB,
                 Transform xfA, Transform xfB) {
  input.proxyA.set(shapeA, indexA);
  input.proxyB.set(shapeB, indexB);
  input.transformA.set(xfA);
  input.transformB.set(xfB);
  input.useRadii = true;
  cache.count = 0;
  pool.getDistance().distance(output, cache, input);
  // djm note: anything significant about 10.0f?
  return output.distance < 10.0f * JBoxSettings.EPSILON;
}
origin: org.jbox2d/jbox2d-testbed

input.useRadii = true;
cache.count = 0;
getWorld().getPool().getDistance().distance(output, cache, input);
origin: andmizi/MobikeTags

pool.getDistance().distance(distanceOutput, cache, distanceInput);
origin: com.github.almasb/fxgl-physics

pool.getDistance().distance(distanceOutput, cache, distanceInput);
origin: org.jbox2d/jbox2d-library

pool.getDistance().distance(distanceOutput, cache, distanceInput);
org.jbox2d.collisionDistance

Javadoc

This is non-static for faster pooling. To get an instance, use the SingletonPool, don't construct a distance object.

Most used methods

  • distance
    Compute the closest points between two shapes. Supports any combination of: CircleShape and PolygonS
  • <init>

Popular in Java

  • Creating JSON documents from java classes using gson
  • addToBackStack (FragmentTransaction)
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • setContentView (Activity)
  • BorderLayout (java.awt)
    A border layout lays out a container, arranging and resizing its components to fit in five regions:
  • Window (java.awt)
    A Window object is a top-level window with no borders and no menubar. The default layout for a windo
  • InputStreamReader (java.io)
    A class for turning a byte stream into a character stream. Data read from the source input stream is
  • DateFormat (java.text)
    Formats or parses dates and times.This class provides factories for obtaining instances configured f
  • Callable (java.util.concurrent)
    A task that returns a result and may throw an exception. Implementors define a single method with no
  • HttpServlet (javax.servlet.http)
    Provides an abstract class to be subclassed to create an HTTP servlet suitable for a Web site. A sub
  • Best plugins for Eclipse
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now