Examples of mult()


Examples of com.jme.math.Matrix4f.mult()

  Vector3f pressEye = new Vector3f();
  Vector3f eyeEye = new Vector3f();
  Vector3f thisEye = new Vector3f();
  camInverse.mult(dragWorld, dragEye);
  camInverse.mult(dragStartWorld, dragStartEye);
  camInverse.mult(pressWorld, pressEye);
  // TODO: perf: only really need to recalc eyeEye on camera change
  camInverse.mult(eyeWorld, eyeEye);
  camInverse.mult(thisWorld, thisEye);

  // The displacement vector of this event from the center of the drag plane
View Full Code Here

Examples of com.jme.math.Matrix4f.mult()

  Vector3f thisEye = new Vector3f();
  camInverse.mult(dragWorld, dragEye);
  camInverse.mult(dragStartWorld, dragStartEye);
  camInverse.mult(pressWorld, pressEye);
  // TODO: perf: only really need to recalc eyeEye on camera change
  camInverse.mult(eyeWorld, eyeEye);
  camInverse.mult(thisWorld, thisEye);

  // The displacement vector of this event from the center of the drag plane
  Vector3f dragVectorEye = new Vector3f(
            (dragEye.x - pressEye.x) * (dragStartEye.z - eyeEye.z) / (thisEye.z - eyeEye.z),
View Full Code Here

Examples of com.jme.math.Matrix4f.mult()

  camInverse.mult(dragWorld, dragEye);
  camInverse.mult(dragStartWorld, dragStartEye);
  camInverse.mult(pressWorld, pressEye);
  // TODO: perf: only really need to recalc eyeEye on camera change
  camInverse.mult(eyeWorld, eyeEye);
  camInverse.mult(thisWorld, thisEye);

  // The displacement vector of this event from the center of the drag plane
  Vector3f dragVectorEye = new Vector3f(
            (dragEye.x - pressEye.x) * (dragStartEye.z - eyeEye.z) / (thisEye.z - eyeEye.z),
      (pressEye.y - dragEye.y) * (dragStartEye.z - eyeEye.z) / (thisEye.z - eyeEye.z),
View Full Code Here

Examples of com.jme.math.Quaternion.mult()

            // to the Cell. This will make sure that the direction of rotation
            // comes out properly.
            Quaternion rotation = rootNode.getLocalRotation();
            float angles[] = new float[3];
            rotation.toAngles(angles);
            normal = rotation.mult(normal);
           
            // Compute the signed angle between v1 and v2. We do this with the
            // following formula: angle = atan2(normal dot (v1 cross v2), v1 dot v2)
            float dotProduct = v1.dot(v2);
            Vector3f crossProduct = v1.cross(v2);
View Full Code Here

Examples of com.jme.math.Quaternion.mult()

        // any look in the y-axis.
        Quaternion viewRotation = viewTransform.getRotation(null);

        Vector3f v1 = new Vector3f(0, 0, 1);
        Vector3f normal = new Vector3f(0, 1, 0);
        Vector3f v2 = viewRotation.mult(v1);
        v2.normalizeLocal();

        // Compute the signed angle between v1 and v2. We do this with the
        // following formula: angle = atan2(normal dot (v1 cross v2), v1 dot v2)
        float dotProduct = v1.dot(v2);
View Full Code Here

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

            // compute slice vertices with duplication at end point
            for (int iR = 0; iR < radialSamples; iR++) {
                //final float fRadialFraction = iR * fInvRS; // in [0,1)
                final Vector3f kRadial = tempVc.set(afCos[iR], afSin[iR], 0);
                kRadial.mult(fSliceRadius, tempVa);

                kNormal.set(kSliceCenter.x + tempVa.x, kSliceCenter.y + tempVa.y, kSliceCenter.z + tempVa.z);
                kNormal.subtractLocal(center);
                kNormal.normalizeLocal();

View Full Code Here

Examples of com.jme.renderer.ColorRGBA.mult()

        MaterialState materialp = display.getRenderer().createMaterialState();
        materialp.setShininess( 128 );
        ColorRGBA color = new ColorRGBA( 0.5f, 0.5f, 0.5f, 0.1f );
        materialp.setDiffuse( color );
        materialp.setAmbient( color.mult( new ColorRGBA( 0.5f, 0.5f, 0.5f, 0.1f ) ) );
        planeXY=new Box("planeXY",new Vector3f(0.05f,0,0.05f),0.1f,0.0001f,0.1f);
        planeXY.setRenderState(materialp);

        MaterialState materialx = display.getRenderer().createMaterialState();
        materialx.setShininess( 128 );
View Full Code Here

Examples of com.jme3.math.Matrix3f.mult()

        Vector3f up = cam.getUp();
        Vector3f left = cam.getLeft();
        Vector3f dir = cam.getDirection();

        mat.mult(up, up);
        mat.mult(left, left);
        mat.mult(dir, dir);

        if (firstPersonConstraint && up.getY() < 0) {
            return;
View Full Code Here

Examples of com.jme3.math.Matrix4f.mult()

        Vector3f o = vars.vect1.set(r.getOrigin());
        Vector3f d =  vars.vect2.set(r.getDirection());

        Matrix4f inv =vars.tempMat4.set(worldMatrix).invertLocal();

        inv.mult(r.getOrigin(), r.getOrigin());

        // Fixes rotation collision bug
        inv.multNormal(r.getDirection(), r.getDirection());
//        inv.multNormalAcross(r.getDirection(), r.getDirection());
View Full Code Here

Examples of com.jme3.math.Quaternion.mult()

      // Velocity
      Vector3f currentVelocity = new Vector3f(vehicleControl.getLinearVelocity());
      Quaternion currentRotation = new Quaternion(vehicleControl.getPhysicsRotation());

      Vector3f targetVelocity = currentRotation.mult(new Vector3f(0f, 0f, targetSpeed));

      float xDiff = currentVelocity.x - targetVelocity.x;
      float zDiff = currentVelocity.z - targetVelocity.z;
      Vector3f diffVector = new Vector3f(xDiff, 0f, zDiff);
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.