Package com.jme.math

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


        float scalarForce=GravityObject.G * weight * other.weight / (distance);
        if (maxForce<scalarForce) scalarForce=maxForce;


        force=vect.mult(scalarForce);



        //Count acceleration a=f/m
        accel=force.divide(weight);
View Full Code Here

        //WRONG !!!!!!!!!!!
        //Vector3f dglobdir=shipOrientation.mult(drivedir);
        Vector3f dglobdir=driveMeshes.get(drivenumber).getWorldRotation().getRotationColumn(1);


        dn.addForce(dglobdir.mult(time*force), drivepos);

        //System.out.println(force+" x:"+dglobdir.x+" y:"+dglobdir.y+" z:"+dglobdir.z);

        //dn.addForce(shipOrientation.mult(time*GetDrive(drivenumber).getForce()).add(GetDrive(drivenumber).getDirection()),GetDrive(drivenumber).getPosition());
    }
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.