Examples of multLocal()


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

            // calculating surface tangent (velocity contains the 'normal' value)
            temp.set(particle.velocity.z * surfaceTangentFactor, particle.velocity.y * surfaceTangentFactor, -particle.velocity.x * surfaceTangentFactor);
            if (surfaceTangentRotation != 0.0f) {// rotating the tangent
                Matrix3f m = new Matrix3f();
                m.fromAngleNormalAxis(FastMath.PI * surfaceTangentRotation, particle.velocity);
                temp = m.multLocal(temp);
            }
            // applying normal factor (this must be done first)
            particle.velocity.multLocal(normalVelocity);
            // adding tangent vector
            particle.velocity.addLocal(temp);
View Full Code Here

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

                        Transform parentWorldTransform = feature.getParent().getWorldTransform();

                        TempVars tempVars = TempVars.get();
                        Matrix4f parentInverseMatrix = this.toMatrix(parentWorldTransform, tempVars.tempMat4).invertLocal();
                        Matrix4f m = this.toMatrix(transform, tempVars.tempMat42);
                        m = m.multLocal(parentInverseMatrix);
                        tempVars.release();

                        transform.setTranslation(m.toTranslationVector());
                        transform.setRotation(m.toRotationQuat());
                        transform.setScale(m.toScaleVector());
View Full Code Here

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

            Matrix4f m = constraintHelper.toMatrix(targetTransform, tempVars.tempMat4);
            tempVars.tempMat42.set(BoneContext.BONE_ARMATURE_TRANSFORMATION_MATRIX);
            if (target instanceof Bone) {
                tempVars.tempMat42.invertLocal();
            }
            m = m.multLocal(tempVars.tempMat42);
            tempVars.release();

            targetTransform = new Transform(m.toTranslationVector(), m.toRotationQuat(), m.toScaleVector());
        }
        this.applyOwnerTransform(targetTransform, ownerSpace);
View Full Code Here

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

                0f, 0f, 0f, 1f);


        Matrix4f result = new Matrix4f();
        result.set(cropMatrix);
        result.multLocal(projMatrix);

        vars.release();
        shadowCam.setProjectionMatrix(result);
    }
View Full Code Here

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

                0f, 0f, 0f, 1f);


        Matrix4f result = new Matrix4f();
        result.set(cropMatrix);
        result.multLocal(projMatrix);
        vars.release();

        shadowCam.setProjectionMatrix(result);

    }
View Full Code Here

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

                break;
            case PathAndRotation:
                if (rotation != null) {
                    Quaternion q2 = new Quaternion();
                    q2.lookAt(direction, upVector);
                    q2.multLocal(rotation);
                    spatial.setLocalRotation(q2);
                }
                break;
            case Rotation:
                if (rotation != null) {
View Full Code Here

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

            if (light != null) {
                if (light instanceof DirectionalLight) {
                    DirectionalLight dl = (DirectionalLight) light;
                    Quaternion q = node.getWorldRotation();
                    Vector3f dir = dl.getDirection();
                    q.multLocal(dir);
                    dl.setDirection(dir);
                } else if (light instanceof PointLight) {
                    PointLight pl = (PointLight) light;
                    Vector3f pos = node.getWorldTranslation();
                    pl.setPosition(pos);
View Full Code Here

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

                    Vector3f pos = node.getWorldTranslation();
                    sl.setPosition(pos);

                    Quaternion q = node.getWorldRotation();
                    Vector3f dir = sl.getDirection();
                    q.multLocal(dir);
                    sl.setDirection(dir);
                }
            }
            light = null;
        }
View Full Code Here

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

      } else if (diffVector.x > 0) { // brake
        xThrust = (diffVector.x > engine) ? -engine : -diffVector.x;
      }

      Vector3f hemisphereVector = new Vector3f(0f, 0f, 1f);
      hemisphereVector = currentRotation.multLocal(hemisphereVector);

      xThrust = (hemisphereVector.x > 0) ? xThrust : xThrust;
      zThrust = (hemisphereVector.z > 0) ? zThrust : zThrust;

      Vector3f impulse = new Vector3f(xThrust, 0f, zThrust);
View Full Code Here

Examples of com.jme3.math.Vector2f.multLocal()

    for (float x = centre.x - terrainWidth / 2 + inc; x < centre.x
        + terrainWidth / 2 - inc; x += inc) {
      for (float z = centre.z - terrainWidth / 2 + inc; z < centre.z
          + terrainWidth / 2 - inc; z += inc) {
        grassPatchRandomOffset.set(inc, inc);
        grassPatchRandomOffset.multLocal(rand.nextFloat()); // make the
                                  // off set
                                  // length a
                                  // random
                                  // distance
                                  // smaller
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.