Package com.jme3.math

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


        if (Result.result == Cell.PATH_RESULT.EXITING_CELL) {
          Vector3f ClosestPoint3D = new Vector3f(
              Result.intersection.x, 0.0f, Result.intersection.y);
          pCell.MapVectorHeightToCell(ClosestPoint3D);

          ClosestPoint3D = ClosestPoint3D.subtract(Point);

          ThisDistance = ClosestPoint3D.length();

          if (ThisDistance < ClosestDistance) {
            ClosestDistance = ThisDistance;
View Full Code Here


            spatPosition = spat.getWorldBound().getCenter();
        }else{
            spatPosition = spat.getWorldTranslation();
        }
        spatPosition.subtract(camPosition, tempVec);
        spat.queueDistance = tempVec.dot(viewVector);
        return spat.queueDistance;
    }
View Full Code Here

            spatPosition = spat.getWorldBound().getCenter();
        }else{
            spatPosition = spat.getWorldTranslation();
        }

        spatPosition.subtract(camPosition, tempVec);
        spat.queueDistance = tempVec.dot(tempVec);

        float retval = Math.abs(tempVec.dot(viewVector)
                / viewVector.dot(viewVector));
        viewVector.mult(retval, tempVec);
View Full Code Here

//        System.out.println("cameraBody.getWorldRotation() " + cameraBody.getWorldRotation());
    }

    private Vector3f getOffsets(Spatial from, Spatial to) {
        Vector3f offsets = from.getWorldTranslation();
        offsets = offsets.subtract(to.getWorldTranslation());
        return offsets;
    }
   
    public Node getNode() {
        return machine;
View Full Code Here

        min.y = (float) Math.floor(min.y);
        min.z = (float) Math.floor(min.z);
        max.x = (float) Math.ceil(max.x);
        max.y = (float) Math.ceil(max.y);
        max.z = (float) Math.ceil(max.z);
        extent = max.subtract(min);
        data = new float[(int) extent.x + 1][(int) extent.y + 1][(int) extent.z + 1];

        for (int x = 0; x < (extent.x + 1); x++)
            for (int y = 0; y < (extent.y + 1); y++)
                for (int z = 0; z < (extent.z + 1); z++) {
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.