Examples of dot()


Examples of javax.vecmath.Vector3f.dot()

        n.scale(v_dot_n);
      return n;
    }
    Vector3f va_prime_d = new Vector3f();
    va_prime_d.cross(vab, n);
    if (va_prime_d.dot(va_prime_d) != 0)
      va_prime_d.normalize();
    Vector3f vda = new Vector3f();
    Vector3f vcb = new Vector3f(n);
    if (v_dot_n == 0)
      v_dot_n = Float.MIN_VALUE; // allow for perpendicular axis to vab
View Full Code Here

Examples of javax.vecmath.Vector3f.dot()

      if (v[1].angle(v[2]) < almost180)
        vTemp2.cross(v[1], v[2]);
      else
        vTemp2.cross(x, v[2]);
      vTemp2.normalize();
      isPlanar = (Math.abs(vTemp2.dot(vTemp)) >= 0.95f);
    }

    boolean isSp3 = (lcaoType.indexOf("sp3") == 0);
    boolean isSp2 = (!isSp3 && lcaoType.indexOf("sp2") == 0);
    boolean isSp = (!isSp3 && !isSp2 && lcaoType.indexOf("sp") == 0);
View Full Code Here

Examples of jinngine.math.Vector3.dot()

        assertEquals(2., a.y);
        assertEquals(3., a.z);
        assertEquals(10., b.x);
        assertEquals(20., b.y);
        assertEquals(30., b.z);
        assertEquals(10. + 40. + 90., b.dot(a));
        assertEquals(1., a.x);
        assertEquals(2., a.y);
        assertEquals(3., a.z);
        assertEquals(10., b.x);
        assertEquals(20., b.y);
View Full Code Here

Examples of jmt.engine.graphic.Vector4.dot()

      Vector4 normal = face.getNormal();
      HullEdge[] edges = face.getEdges();
      HullVertex[] vertices = face.getVertices();

      float facing = normal.dot(forward);
      boolean isVisible = (facing <= VISIBILITY_EPSILON);
      if (isVisible) {
        visibleFacesSet.add(face);
      } else {
        hiddenFacesSet.add(face);
View Full Code Here

Examples of jpbrt.core.Vector.dot()

        // compute coefficients for fundamental forms
        double E = dpdu.dot(dpdu);
        double F = dpdu.dot(dpdv);
        double G = dpdv.dot(dpdv);
        Vector N = dpdu.cross(dpdv).normalizeLocal();
        double e = N.dot(d2Pduu);
        double f = N.dot(d2Pduv);
        double g = N.dot(d2Pdvv);
       
        // compute dndu and dndv from fundamental form coefficients
        double invEGF2 = 1.0 / (E*G - F*F);
 
View Full Code Here

Examples of math.Vector.dot()

    }
    // line is the vector between the centers, from source to target
    Vector line = position.clone().invert().add(target.getPosition());
    double radsum = source.getBoundingRadius()
        + ((RenderableObject) target).getBoundingRadius();
    if ((line.dot(line) < radsum * radsum)) {
      if (source.equals(solvedCollisions.get(target))) {
        return;
      }
      Vector impulseArm = line.clone().scale(source.getBoundingRadius() / radsum);
      source.collideWith(target, source.getPosition().clone().add(impulseArm),
View Full Code Here

Examples of net.phys2d.math.ROVector2f.dot()

      break;

    case FACE_B_X:
      {
        frontNormal = MathUtil.scale(normal,-1);
        front = posB.dot(frontNormal) + hB.x;
        sideNormal = rotB.col2;
        float side = posB.dot(sideNormal);
        negSide = -side + hB.y;
        posSide =  side + hB.y;
        negEdge = EDGE3;
View Full Code Here

Examples of net.phys2d.math.ROVector2f.dot()

    case FACE_B_X:
      {
        frontNormal = MathUtil.scale(normal,-1);
        front = posB.dot(frontNormal) + hB.x;
        sideNormal = rotB.col2;
        float side = posB.dot(sideNormal);
        negSide = -side + hB.y;
        posSide =  side + hB.y;
        negEdge = EDGE3;
        posEdge = EDGE1;
        computeIncidentEdge(incidentEdge, hA, posA, rotA, frontNormal);
View Full Code Here

Examples of net.phys2d.math.ROVector2f.dot()

      break;

    case FACE_B_Y:
      {
        frontNormal = MathUtil.scale(normal,-1);
        front = posB.dot(frontNormal) + hB.y;
        sideNormal = rotB.col1;
        float side = posB.dot(sideNormal);
        negSide = -side + hB.x;
        posSide =  side + hB.x;
        negEdge = EDGE2;
View Full Code Here

Examples of net.phys2d.math.ROVector2f.dot()

    case FACE_B_Y:
      {
        frontNormal = MathUtil.scale(normal,-1);
        front = posB.dot(frontNormal) + hB.y;
        sideNormal = rotB.col1;
        float side = posB.dot(sideNormal);
        negSide = -side + hB.x;
        posSide =  side + hB.x;
        negEdge = EDGE2;
        posEdge = EDGE4;
        computeIncidentEdge(incidentEdge, hA, posA, rotA, frontNormal);
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.