Package javax.vecmath

Examples of javax.vecmath.Vector3f.cross()


      Vector3f tmp = Stack.alloc(Vector3f.class);
      tmp.cross(cabc, ab);

      Vector3f tmp2 = Stack.alloc(Vector3f.class);
      tmp2.cross(cabc, ac);

      if (tmp.dot(ao) < -GJK_insimplex_eps) {
        order = 1;
        simplex[0].set(simplex[1]);
        simplex[1].set(simplex[2]);
View Full Code Here


      // TODO: optimize

      Vector3f crs = Stack.alloc(Vector3f.class);

      Vector3f tmp = Stack.alloc(Vector3f.class);
      tmp.cross(ab, ac);

      Vector3f tmp2 = Stack.alloc(Vector3f.class);
      tmp2.cross(ac, ad);

      Vector3f tmp3 = Stack.alloc(Vector3f.class);
View Full Code Here

      Vector3f tmp = Stack.alloc(Vector3f.class);
      tmp.cross(ab, ac);

      Vector3f tmp2 = Stack.alloc(Vector3f.class);
      tmp2.cross(ac, ad);

      Vector3f tmp3 = Stack.alloc(Vector3f.class);
      tmp3.cross(ad, ab);

      if (tmp.dot(ao) > GJK_insimplex_eps) {
View Full Code Here

      Vector3f tmp2 = Stack.alloc(Vector3f.class);
      tmp2.cross(ac, ad);

      Vector3f tmp3 = Stack.alloc(Vector3f.class);
      tmp3.cross(ad, ab);

      if (tmp.dot(ao) > GJK_insimplex_eps) {
        crs.set(tmp);
        order = 2;
        simplex[0].set(simplex[1]);
View Full Code Here

        // Triangle
        case 2: {
          tmp1.sub(simplex[1].w, simplex[0].w);
          tmp2.sub(simplex[2].w, simplex[0].w);
          Vector3f n = Stack.alloc(Vector3f.class);
          n.cross(tmp1, tmp2);
          n.normalize();

          Support(n, simplex[3]);

          tmp.negate(n);
View Full Code Here

      Vector3f tmp3 = Stack.alloc(Vector3f.class);

      Vector3f nrm = Stack.alloc(Vector3f.class);
      tmp1.sub(b.w, a.w);
      tmp2.sub(c.w, a.w);
      nrm.cross(tmp1, tmp2);

      float len = nrm.length();

      tmp1.cross(a.w, b.w);
      tmp2.cross(b.w, c.w);
View Full Code Here

      Vector3f b0 = Stack.alloc(pointCache[3].localPointA);
      b0.sub(pointCache[2].localPointA);

      Vector3f cross = Stack.alloc(Vector3f.class);
      cross.cross(a0, b0);

      res0 = cross.lengthSquared();
    }

    if (maxPenetrationIndex != 1) {
View Full Code Here

      Vector3f b1 = Stack.alloc(pointCache[3].localPointA);
      b1.sub(pointCache[2].localPointA);

      Vector3f cross = Stack.alloc(Vector3f.class);
      cross.cross(a1, b1);
      res1 = cross.lengthSquared();
    }

    if (maxPenetrationIndex != 2) {
      Vector3f a2 = Stack.alloc(pt.localPointA);
View Full Code Here

      Vector3f b2 = Stack.alloc(pointCache[3].localPointA);
      b2.sub(pointCache[1].localPointA);

      Vector3f cross = Stack.alloc(Vector3f.class);
      cross.cross(a2, b2);

      res2 = cross.lengthSquared();
    }

    if (maxPenetrationIndex != 3) {
View Full Code Here

      Vector3f b3 = Stack.alloc(pointCache[2].localPointA);
      b3.sub(pointCache[1].localPointA);

      Vector3f cross = Stack.alloc(Vector3f.class);
      cross.cross(a3, b3);
      res3 = cross.lengthSquared();
    }

    Vector4f maxvec = Stack.alloc(Vector4f.class);
    maxvec.set(res0, res1, res2, res3);
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.