Package com.jme3.math

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


            inputManager.getCursorPosition(), 0.0f);
        Vector3f direction = cam.getWorldCoordinates(
            inputManager.getCursorPosition(), 0.3f);
        direction.subtractLocal(origin).normalizeLocal();
       
        Line li = new Line(origin.clone(), origin.add(direction.mult(30f)));
//        li.setLineWidth(3f);
        Geometry g = new Geometry(null, li);
      g.setMaterial(matWireframe);
      bboxes.attachChild(g);
View Full Code Here


            Vector3f kNormal;
            int iSave = i;
            for (int iR = 0; iR < radialSamples; iR++) {
                float fRadialFraction = iR * fInvRS; // in [0,1)
                Vector3f kRadial = tempVc.set(afCos[iR], afSin[iR], 0);
                kRadial.mult(fSliceRadius, tempVa);
                posBuf.put(kSliceCenter.x + tempVa.x).put(
                        kSliceCenter.y + tempVa.y).put(
                        kSliceCenter.z + tempVa.z);

                BufferUtils.populateFromBuffer(tempVa, posBuf, i);
View Full Code Here

            Vector3f kNormal;
            int iSave = i;
            for (int iR = 0; iR < radialSamples; iR++, i++) {
                float fRadialFraction = iR * fInvRS; // in [0,1)
                Vector3f kRadial = tempVc.set(afCos[iR], 0, afSin[iR]);
                kRadial.mult(fSliceRadius, tempVa);
                vb.put(kSliceCenter.x + tempVa.x).put(
                        kSliceCenter.y + tempVa.y).put(
                        kSliceCenter.z + tempVa.z);

                BufferUtils.populateFromBuffer(tempVa, vb, i);
View Full Code Here

    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
    }
    else {
      player.setWalkDirection(Vector3f.ZERO);
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.