Package javax.vecmath

Examples of javax.vecmath.Vector3f.dot()


    abs_b.getRow(0, tmp);
    extent.x = tmp.dot(localHalfExtents);
    abs_b.getRow(1, tmp);
    extent.y = tmp.dot(localHalfExtents);
    abs_b.getRow(2, tmp);
    extent.z = tmp.dot(localHalfExtents);

    aabbMinOut.sub(center, extent);
    aabbMaxOut.add(center, extent);
  }
View Full Code Here


      assert (t != null);
      assert (t.vmax < 0);
      triNormal(verts.getQuick(t.getCoord(0)), verts.getQuick(t.getCoord(1)), verts.getQuick(t.getCoord(2)), n);
      t.vmax = maxdirsterid(verts, verts_count, n, allow);
      tmp.sub(verts.getQuick(t.vmax), verts.getQuick(t.getCoord(0)));
      t.rise = n.dot(tmp);
    }
    Tri te;
    vlimit -= 4;
    while (vlimit > 0 && ((te = extrudable(epsilon)) != null)) {
      Int3 ti = te;
View Full Code Here

        if (isextreme.get(t.vmax) != 0) {
          t.vmax = -1; // already done that vertex - algorithm needs to be able to terminate.
        }
        else {
          tmp.sub(verts.getQuick(t.vmax), verts.getQuick(t.getCoord(0)));
          t.rise = n.dot(tmp);
        }
      }
      vlimit--;
    }
    return 1;
View Full Code Here

    for (int j = 0; j < numVectors; j++) {
      Vector3f vec = vectors[j];

      for (i = 0; i < getNumVertices(); i++) {
        getVertex(i, vtx);
        newDot = vec.dot(vtx);
        //if (newDot > supportVerticesOut[j].w)
        if (newDot > wcoords[j]) {
          //WARNING: don't swap next lines, the w component would get overwritten!
          supportVerticesOut[j].set(vtx);
          //supportVerticesOut[j].w = newDot;
View Full Code Here

      VectorUtil.mul(vtx, points.getQuick(i), localScaling);

      for (int j = 0; j < numVectors; j++) {
        Vector3f vec = vectors[j];

        newDot = vec.dot(vtx);
        //if (newDot > supportVerticesOut[j][3])
        if (newDot > wcoords[j]) {
          // WARNING: don't swap next lines, the w component would get overwritten!
          supportVerticesOut[j].set(vtx);
          //supportVerticesOut[j][3] = newDot;
View Full Code Here

    Vector3f extent = Stack.alloc(Vector3f.class);
    Vector3f tmp = Stack.alloc(Vector3f.class);

    abs_b.getRow(0, tmp);
    extent.x = tmp.dot(localHalfExtents);
    abs_b.getRow(1, tmp);
    extent.y = tmp.dot(localHalfExtents);
    abs_b.getRow(2, tmp);
    extent.z = tmp.dot(localHalfExtents);
View Full Code Here

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

    abs_b.getRow(0, tmp);
    extent.x = tmp.dot(localHalfExtents);
    abs_b.getRow(1, tmp);
    extent.y = tmp.dot(localHalfExtents);
    abs_b.getRow(2, tmp);
    extent.z = tmp.dot(localHalfExtents);

    aabbMinOut.sub(center, extent);
    aabbMaxOut.add(center, extent);
View Full Code Here

    Vector3f[] b = new Vector3f[] { mx, mi };
    Vector3f p = Stack.alloc(Vector3f.class);
    p.set(b[(signs >> 0) & 1].x,
          b[(signs >> 1) & 1].y,
          b[(signs >> 2) & 1].z);
    return p.dot(v);
  }
  
  public static boolean Intersect(DbvtAabbMm a, DbvtAabbMm b) {
    return ((a.mi.x <= b.mx.x) &&
            (a.mx.x >= b.mi.x) &&
View Full Code Here

    //#ifdef RAYAABB2
    Vector3f rayFrom = Stack.alloc(raySource);
    Vector3f rayDirection = Stack.alloc(Vector3f.class);
    tmp.sub(rayTarget, raySource);
    rayDirection.normalize(tmp);
    lambda_max = rayDirection.dot(tmp);
    rayDirection.x = 1f / rayDirection.x;
    rayDirection.y = 1f / rayDirection.y;
    rayDirection.z = 1f / rayDirection.z;
//    boolean sign_x = rayDirection.x < 0f;
//    boolean sign_y = rayDirection.y < 0f;
View Full Code Here

/* 165 */     if ((xAxis == null) || (sourceToHead == null))
/*     */     {
/* 168 */       return -1.0D;
/*     */     }
/*     */
/* 172 */     double dotProduct = sourceToHead.dot(xAxis) / (sourceToHead.length() * xAxis.length());
/*     */
/* 177 */     double theta = (float)Math.acos(dotProduct);
/*     */
/* 184 */     double minPlusMax = min + max;
/* 185 */     double tangent = Math.tan(theta);
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.