Examples of cross()


Examples of Hexel.math.Vector3d.cross()

      Vector3d plane = tmps.v3d3[i];
      plane.x = vd.x - ud.x;
      plane.y = vd.y - ud.y;
      plane.z = 0;
      plane.cross(up);
      plane.unit();
      axis[3 + i] = plane;
      if (plane.y == -1)
        plane.y = 1;
    }
View Full Code Here

Examples of ca.eandb.jmist.math.Vector3.cross()

        Vector3 pc = p.vectorTo(c);

        double area = n.dot(ab.cross(ac));
        double A = n.dot(pb.cross(pc)) / area;
        if (A < 0.0) continue;
        double B = n.dot(pc.cross(pa)) / area;
        if (B < 0.0) continue;
        double C = 1.0 - A - B;
        if (C < 0.0) continue;

        return getBasis(i);
View Full Code Here

Examples of com.ardor3d.math.type.ReadOnlyVector3.cross()

        fADdU[2] = Math.abs(fDdU[2]);
        if (fADdU[2] > _extent.getZ() && fDdU[2] * fWdU[2] >= 0.0) {
            return false;
        }

        rayDir.cross(diff, wCrossD);

        fAWxDdU[0] = Math.abs(wCrossD.dot(_xAxis));
        rhs = _extent.getY() * fAWdU[2] + _extent.getZ() * fAWdU[1];
        if (fAWxDdU[0] > rhs) {
            return false;
View Full Code Here

Examples of com.jme.math.Vector3f.cross()

       
        Vector3f b = new Vector3f(lineStart);
        b.subtract(point);
       
        Vector3f cross = new Vector3f();
        cross.cross(a,b);
       
        return cross.length()/a.length();
    }

    /**
 
View Full Code Here

Examples of com.jme3.math.Vector3f.cross()

                camDir.cross(left, up);
                up.multLocal(p.size);
                left.multLocal(p.size);
            }else if (faceNormal != null){
                up.set(faceNormal).crossLocal(Vector3f.UNIT_X);
                faceNormal.cross(up, left);
                up.multLocal(p.size);
                left.multLocal(p.size);
                if (p.angle != 0) {
                    TempVars vars = TempVars.get();
                    vars.vect1.set(faceNormal).normalizeLocal();
View Full Code Here

Examples of crazypants.vecmath.Vector3d.cross()

        verticalSpeed = Config.darkSteelGliderVerticalSpeedSprinting;
      }

      Vector3d look = Util.getLookVecEio(player);
      Vector3d side = new Vector3d();
      side.cross(new Vector3d(0, 1, 0), look);
      Vector3d playerPos = new Vector3d(player.prevPosX, player.prevPosY, player.prevPosZ);
      Vector3d b = new Vector3d(playerPos);
      b.y += 1;
      Vector3d c = new Vector3d(playerPos);
      c.add(side);
View Full Code Here

Examples of javax.vecmath.Vector3d.cross()

            int jc = idx[i+2] * 3;
            c.set(coord[jc],coord[jc+1],coord[jc+2]);

            v1.sub(b, a);
            v2.sub(c, a);
            faceNormal.cross(v1, v2);
            if (faceNormal.length()==0) continue;
            faceNormal.normalize();

            // suppose the faces are nearly flat, with small deflection
            // check the scalar product is >0, so each face is the same orientation
View Full Code Here

Examples of javax.vecmath.Vector3d.cross()

public class VectorUtils {

  public static Vector3d getProjection(Vector3d p, Vector3d v){
    Vector3d right= new Vector3d();   
    right.cross(p, v);
    Vector3d projection= new Vector3d();
    projection.cross(right, p);
    return projection;
  }
 
View Full Code Here

Examples of javax.vecmath.Vector3d.cross()

  public static Vector3d getProjection(Vector3d p, Vector3d v){
    Vector3d right= new Vector3d();   
    right.cross(p, v);
    Vector3d projection= new Vector3d();
    projection.cross(right, p);
    return projection;
  }
 
}
View Full Code Here

Examples of javax.vecmath.Vector3f.cross()

            int jc = idx[i+2] * 3;
            c.set(coord[jc],coord[jc+1],coord[jc+2]);

            v1.sub(b, a);
            v2.sub(c, a);
            faceNormal.cross(v1, v2);
            if (faceNormal.length()==0) continue;
            faceNormal.normalize();

            // suppose the faces are nearly flat, with small deflection
            // check the scalar product is >0, so each face is the same orientation
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.