Examples of distanceSquared()


Examples of javax.vecmath.Point3d.distanceSquared()

/*     */       {
/* 607 */         g.set(gnew);
/* 608 */         break;
/*     */       }
/* 610 */       prevDist = dist;
/* 611 */       dist = pnew.distanceSquared(g);
/*     */
/* 613 */       if (dist < prevDist) {
/* 614 */         p.set(pnew);
/* 615 */         if (!intersect) {
/* 616 */           intersect = closest_point(p, poly1.planes, gnew);
View Full Code Here

Examples of javax.vecmath.Point3f.distanceSquared()

                              AminoMonomer target, boolean checkDistances) {
    Point3f targetOxygenPoint = target.getCarbonylOxygenAtom();

    if (targetOxygenPoint == null)
      return 0;
    float distON2 = targetOxygenPoint.distanceSquared(nitrogenPoint);
    if (distON2 < minimumHbondDistance2)
      return 0;

    float distOH2 = targetOxygenPoint.distanceSquared(hydrogenPoint);
    if (distOH2 < minimumHbondDistance2)
View Full Code Here

Examples of javax.vecmath.Point3f.distanceSquared()

      return 0;
    float distON2 = targetOxygenPoint.distanceSquared(nitrogenPoint);
    if (distON2 < minimumHbondDistance2)
      return 0;

    float distOH2 = targetOxygenPoint.distanceSquared(hydrogenPoint);
    if (distOH2 < minimumHbondDistance2)
      return 0;

    Point3f targetCarbonPoint = target.getCarbonylCarbonAtom();
    float distCH2 = targetCarbonPoint.distanceSquared(hydrogenPoint);
View Full Code Here

Examples of javax.vecmath.Point3f.distanceSquared()

    float distOH2 = targetOxygenPoint.distanceSquared(hydrogenPoint);
    if (distOH2 < minimumHbondDistance2)
      return 0;

    Point3f targetCarbonPoint = target.getCarbonylCarbonAtom();
    float distCH2 = targetCarbonPoint.distanceSquared(hydrogenPoint);
    if (distCH2 < minimumHbondDistance2)
      return 0;

    float distCN2 = targetCarbonPoint.distanceSquared(nitrogenPoint);
    if (distCN2 < minimumHbondDistance2)
View Full Code Here

Examples of javax.vecmath.Point3f.distanceSquared()

    Point3f targetCarbonPoint = target.getCarbonylCarbonAtom();
    float distCH2 = targetCarbonPoint.distanceSquared(hydrogenPoint);
    if (distCH2 < minimumHbondDistance2)
      return 0;

    float distCN2 = targetCarbonPoint.distanceSquared(nitrogenPoint);
    if (distCN2 < minimumHbondDistance2)
      return 0;

    double distOH = Math.sqrt(distOH2);
    double distCH = Math.sqrt(distCH2);
View Full Code Here

Examples of javax.vecmath.Point3f.distanceSquared()

           */
          float minDist2 = Float.MAX_VALUE;
          if (checkSymmetryRange && !isInSymmetryRange(cartesian))
            continue;
          for (int j = pt0; --j >= 0;) {
            float d2 = cartesian.distanceSquared(cartesians[j]);
            if (checkSpecial && d2 < 0.0001) {
              special = atoms[iAtomFirst + j];
              break;
            }
            if (checkRange111 && j < baseCount && d2 < minDist2)
View Full Code Here

Examples of micdoodle8.mods.galacticraft.api.vector.BlockVec3.distanceSquared()

                }

                if (bv3 != null)
                {
                    //Check whether the returned asteroid is too far from the desired entry location in which case, give up
                    if (bv3.distanceSquared(new BlockVec3(x, 128, z)) > 25600)
                    {
                        break;
                    }

                    if (ConfigManagerCore.enableDebug)
View Full Code Here

Examples of net.phys2d.raw.shapes.Line.distanceSquared()

     
      Vector2f lineStartA = vertsA[collPairs[i][0]];
      Vector2f lineEndA = vertsA[(collPairs[i][0]+1) % vertsA.length ];
      Line line = new Line(lineStartA, lineEndA);
           
      float dis2 = line.distanceSquared(bodyB.getPosition());
      float r2 = circle.getRadius() * circle.getRadius();

      if ( dis2 < r2 ) {
        Vector2f pt = new Vector2f();
       
View Full Code Here

Examples of net.phys2d.raw.shapes.Line.distanceSquared()

      if (i >= paramArrayOfContact.length)
        return paramArrayOfContact.length;
      Vector2f localVector2f2 = arrayOfVector2f[arrayOfInt[j][0]];
      Vector2f localVector2f3 = arrayOfVector2f[((arrayOfInt[j][0] + 1) % arrayOfVector2f.length)];
      Line localLine = new Line(localVector2f2, localVector2f3);
      float f1 = localLine.distanceSquared(paramBody2.getPosition());
      float f2 = localCircle.getRadius() * localCircle.getRadius();
      if (f1 < f2)
      {
        Vector2f localVector2f4 = new Vector2f();
        localLine.getClosestPoint(paramBody2.getPosition(), localVector2f4);
View Full Code Here

Examples of org.bukkit.Location.distanceSquared()

            // Check for missed moves.
            // TODO: Consider to catch all, at least (debug-) logging-wise.
            if (!BlockProperties.isPassable(loc)) {
                if (data.toX != Double.MAX_VALUE) {
                    final Location refLoc = new Location(loc.getWorld(), data.toX, data.toY, data.toZ);
                    final double d = refLoc.distanceSquared(loc);
                    if (d > 0.0) {
                        // TODO: Consider to always set back here. Might skip on big distances.
                        if (TrigUtil.manhattan(loc, refLoc) > 0 || BlockProperties.isPassable(refLoc)) {
                            if (passable.isEnabled(player)) {
                                LogUtil.logWarning("[NoCheatPlus] Potential exploit: Player " + player.getName() + " leaves, having moved into a block (not tracked by moving checks): " + player.getWorld().getName() + " / " + DebugUtil.formatMove(refLoc, loc));
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.