Examples of multLocal()


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

                }
                break;
            case LIMITDIST_ONSURFACE:
                if (currentDistance > dist) {
                    v.normalizeLocal();
                    v.multLocal(dist + (currentDistance - dist) * (1.0f - influence));
                    ownerTransform.getTranslation().set(v.addLocal(targetTransform.getTranslation()));
                } else if (currentDistance < dist) {
                    v.normalizeLocal().multLocal(dist * influence);
                    ownerTransform.getTranslation().set(targetTransform.getTranslation().add(v));
                }
View Full Code Here

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

            center.divideLocal(8f);

            Vector3f cDir = new Vector3f();
            for (int i = 0; i < 8; i++) {
                cDir.set(points[i]).subtractLocal(center);
                cDir.multLocal(scale - 1.0f);
                points[i].addLocal(cDir);
            }
        }
    }
View Full Code Here

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

        int vertexCount = input.capacity() / 3;
        for (int i = 0; i < vertexCount; i++){
            BufferUtils.populateFromBuffer(temp, input, i);

            // offset and scale vector into -128 ... 127
            temp.multLocal(127).addLocal(0.5f, 0.5f, 0.5f);

            // quantize
            byte v1 = (byte) temp.getX();
            byte v2 = (byte) temp.getY();
            byte v3 = (byte) temp.getZ();
View Full Code Here

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

        if (output.capacity() < input.capacity())
            throw new RuntimeException("Output must be at least as large as input!");

        Vector3f offset = bbox.getCenter().negate();
        Vector3f size = new Vector3f(bbox.getXExtent(), bbox.getYExtent(), bbox.getZExtent());
        size.multLocal(2);

        ShortBuffer sb = null;
        ByteBuffer bb = null;
        float dataTypeSize;
        float dataTypeOffset;
View Full Code Here

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

        for (int i = 0; i < vertexCount; i++){
            BufferUtils.populateFromBuffer(temp, input, i);

            // offset and scale vector into -32768 ... 32767
            // or into -128 ... 127 if using bytes
            temp.multLocal(scale);
            temp.addLocal(offset);

            // quantize and store
            if (sb != null){
                short v1 = (short) temp.getX();
View Full Code Here

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

            int index = i * 2;
           
            setInBuffer(origin, lineVertex, index);
            setInBuffer(originColor, lineColor, index);
           
            point.multLocal(scale);
            point.addLocal(origin);
            setInBuffer(point, lineVertex, index + 1);
            setInBuffer(normalColor, lineColor, index + 1);
        }
       
View Full Code Here

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

    cam.setFrustumBottom(-h);
    cam.setFrustumLeft(-w);
    cam.setFrustumRight(w);
   
    Vector3f pos = cam.getLocation().clone();
    pos.multLocal(0f, zoomed ? 0.1f : -0.1f, 0f);
    cam.setLocation(pos);
    zoomed = !zoomed;
  }

  public void showElement(String element) {
View Full Code Here

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

        if(i.jump) {
            main.playerc.jump();
            i.jump=false;
        }
        main.player.getChild("body").rotateUpTo(new Vector3f(0, 0, camDir.z));
        walkDirection=walkDirection.multLocal(3);
        main.playerc.setWalkDirection(walkDirection);
        main.player.getChild("body").setLocalTranslation(main.playerc.getPhysicsLocation());
        main.player.getChild("body").setLocalRotation(this.getCamera().getRotation());
        this.getCamera().setLocation(main.playerc.getPhysicsLocation());
    }
View Full Code Here

Examples of org.mt4j.util.math.Matrix.multLocal()

    if (this.isGlobalMatrixDirty()){
//      System.out.println(this.getName() + "'s global matrix is dirty! calculate it:");
      resMatrix = new Matrix();
      this.getGlobalMatrixRecursive(this, resMatrix);
      //System.out.println("Applying Matrix of: '" + this.getName() + "' Matrix: " + this.getLocalBasisMatrix().toString());
      resMatrix.multLocal(this.getLocalMatrix());
     
      this.globalMatrix = resMatrix;
     
      this.setGlobalMatrixDirty(false);
    }
View Full Code Here

Examples of org.mt4j.util.math.Matrix.multLocal()

   
   
    Matrix svgButtonAbsInv = new Matrix(this.getCompToResize().getGlobalInverseMatrix());
    //TODO doch wieder localbase von svg dazutransformen?
    //svgbutton inverse parent relative machen
    svgButtonAbsInv.multLocal(this.getCompToResize().getLocalMatrix());
    //Remove translation for direction vectors(width/height)
    svgButtonAbsInv.removeTranslationFromMatrix();
    //Width vect in svgbutton parent relative space
    v.transform(svgButtonAbsInv);
    float width = v.length();
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.