Package com.jme3.math

Examples of com.jme3.math.Vector3f.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


        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

        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

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

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

        Quaternion q = new Quaternion();
        q.fromAxes(left, up, dir);
View Full Code Here

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

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

        Quaternion q = new Quaternion();
        q.fromAxes(left, up, dir);
        q.normalizeLocal();
View Full Code Here

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

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

        Quaternion q = new Quaternion();
        q.fromAxes(left, up, dir);
        q.normalizeLocal();
View Full Code Here

    // float crouchOffset = jumpCrouching ? Math.min(((jumpCrouchTime / MAX_JUMP_TIME) * 0.25f),
    // 0.25f) : 0.0f;

    Matrix3f bodyRot = new Matrix3f();
    bodyRot.fromAngleNormalAxis(walkAngle * FastMath.DEG_TO_RAD, Vector3f.UNIT_Y);
    Vector3f bodyDir = bodyRot.mult(Vector3f.UNIT_Z.negate()).normalizeLocal();

    if (walking) {
      lastWalkDir = bodyDir.mult(walkMult * 2.0f);
      player.setWalkDirection(lastWalkDir);
      // set animation channels
View Full Code Here

        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

        Vector3f[] verts = new Vector3f[startingLinePoints.length];
        for (int j = 0; j < verts.length; ++j) {
            temp[0] = startingLinePoints[j].x;
            temp[1] = startingLinePoints[j].y;
            temp[2] = startingLinePoints[j].z;
            temp = m.mult(temp);// the result is stored in the array
            if (fixUpAxis) {
                verts[j] = new Vector3f(temp[0], -temp[2], temp[1]);
            } else {
                verts[j] = new Vector3f(temp[0], temp[1], temp[2]);
            }
View Full Code Here

        Spatial armature = (Spatial) objectHelper.toObject(blenderContext.getFileBlock(armatureObjectOMA).getStructure(blenderContext), blenderContext);
        ConstraintHelper constraintHelper = blenderContext.getHelper(ConstraintHelper.class);
        Matrix4f armatureWorldMatrix = constraintHelper.toMatrix(armature.getWorldTransform(), new Matrix4f());

        // and now compute the final bone matrix in world space
        globalBoneMatrix = armatureWorldMatrix.mult(globalBoneMatrix);

        // create the children
        List<Structure> childbase = ((Structure) boneStructure.getFieldValue("childbase")).evaluateListBase();
        for (Structure child : childbase) {
            children.add(new BoneContext(child, armatureObjectOMA, this, blenderContext));
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.