Package javax.vecmath

Examples of javax.vecmath.Vector3f.dot()


        point = Stack.alloc(point);
      }
     
      Vector3f tmp = Stack.alloc(Vector3f.class);
      R1to0.getRow(0, tmp);
      out.x = tmp.dot(point) + T1to0.x;
      R1to0.getRow(1, tmp);
      out.y = tmp.dot(point) + T1to0.y;
      R1to0.getRow(2, tmp);
      out.z = tmp.dot(point) + T1to0.z;
      return out;
View Full Code Here


     
      Vector3f tmp = Stack.alloc(Vector3f.class);
      R1to0.getRow(0, tmp);
      out.x = tmp.dot(point) + T1to0.x;
      R1to0.getRow(1, tmp);
      out.y = tmp.dot(point) + T1to0.y;
      R1to0.getRow(2, tmp);
      out.z = tmp.dot(point) + T1to0.z;
      return out;
    }
  }
View Full Code Here

      R1to0.getRow(0, tmp);
      out.x = tmp.dot(point) + T1to0.x;
      R1to0.getRow(1, tmp);
      out.y = tmp.dot(point) + T1to0.y;
      R1to0.getRow(2, tmp);
      out.z = tmp.dot(point) + T1to0.z;
      return out;
    }
  }
 
  ////////////////////////////////////////////////////////////////////////////
View Full Code Here

      Vector3f extend = Stack.alloc(Vector3f.class);
      get_center_extend(center, extend);

      float _fOrigin = direction.dot(center);
      tmp.absolute(direction);
      float _fMaximumExtent = extend.dot(tmp);
      vmin[0] = _fOrigin - _fMaximumExtent;
      vmax[0] = _fOrigin + _fMaximumExtent;
    }

    public PlaneIntersectionType plane_classify(Vector4f plane) {
View Full Code Here

   */
  public static void closest_point_on_segment(Vector3f cp, Vector3f v, Vector3f e1, Vector3f e2) {
    Vector3f n = Stack.alloc(Vector3f.class);
    n.sub(e2, e1);
    cp.sub(v, e1);
    float _scalar = cp.dot(n) / n.dot(n);
    if (_scalar < 0.0f) {
      cp = e1;
    }
    else if (_scalar > 1.0f) {
      cp = e2;
View Full Code Here

        order = 1;
        simplex[0].set(simplex[1]);
        simplex[1].set(simplex[2]);
        return SolveSimplex2(ao, ab);
      }
      else if (tmp2.dot(ao) > +GJK_insimplex_eps) {
        order = 1;
        simplex[1].set(simplex[2]);
        return SolveSimplex2(ao, ac);
      }
      else {
View Full Code Here

        crs.set(tmp2);
        order = 2;
        simplex[2].set(simplex[3]);
        return SolveSimplex3a(ao, ac, ad, crs);
      }
      else if (tmp3.dot(ao) > GJK_insimplex_eps) {
        crs.set(tmp3);
        order = 2;
        simplex[1].set(simplex[0]);
        simplex[0].set(simplex[2]);
        simplex[2].set(simplex[3]);
View Full Code Here

    for (int i = 0; i < size; i++) {
      ManifoldPoint mp = pointCache[i];

      diffA.sub(mp.localPointA, newPoint.localPointA);

      float distToManiPoint = diffA.dot(diffA);
      if (distToManiPoint < shortestDist) {
        shortestDist = distToManiPoint;
        nearestPoint = i;
      }
    }
View Full Code Here

  public void batchedUnitVectorGetSupportingVertexWithoutMargin(Vector3f[] vectors, Vector3f[] supportVerticesOut, int numVectors) {
    Vector3f dots = Stack.alloc(Vector3f.class);

    for (int i = 0; i < numVectors; i++) {
      Vector3f dir = vectors[i];
      dots.set(dir.dot(vertices1[0]), dir.dot(vertices1[1]), dir.dot(vertices1[2]));
      supportVerticesOut[i].set(vertices1[VectorUtil.maxAxis(dots)]);
    }
  }

  @Override
View Full Code Here

  public void batchedUnitVectorGetSupportingVertexWithoutMargin(Vector3f[] vectors, Vector3f[] supportVerticesOut, int numVectors) {
    Vector3f dots = Stack.alloc(Vector3f.class);

    for (int i = 0; i < numVectors; i++) {
      Vector3f dir = vectors[i];
      dots.set(dir.dot(vertices1[0]), dir.dot(vertices1[1]), dir.dot(vertices1[2]));
      supportVerticesOut[i].set(vertices1[VectorUtil.maxAxis(dots)]);
    }
  }

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