Package com.jme3.util

Examples of com.jme3.util.TempVars.release()


            return true;
        }

        // outside sphere
        float b = ray.getDirection().dot(diff);
        vars.release();
        if (b >= 0.0) {
            return false;
        }
        return b * b >= a;
    }
View Full Code Here


            float distance = root - a1;
            Vector3f point = new Vector3f(ray.direction).multLocal(distance).addLocal(ray.origin);

            CollisionResult result = new CollisionResult(point, distance);
            results.addCollision(result);
            vars.release();
            return 1;
        }

        a1 = ray.direction.dot(diff);
        vars.release();
View Full Code Here

            vars.release();
            return 1;
        }

        a1 = ray.direction.dot(diff);
        vars.release();
        if (a1 >= 0.0) {
            return 0;
        }

        discr = a1 * a1 - a;
View Full Code Here

        xExtent = max.x - center.x;
        yExtent = max.y - center.y;
        zExtent = max.z - center.z;

        vars.release();
    }

    public void computeFromTris(int[] indices, Mesh mesh, int start, int end) {
        if (end - start <= 0) {
            return;
View Full Code Here

        xExtent = max.x - center.x;
        yExtent = max.y - center.y;
        zExtent = max.z - center.z;

        vars.release();
    }

    public static void checkMinMax(Vector3f min, Vector3f max, Vector3f point) {
        if (point.x < min.x) {
            min.x = point.x;
View Full Code Here

        point.subtract(origin, compVec1);
        float lineParameter = direction.dot(compVec1);
        origin.add(direction.mult(lineParameter, compVec2), compVec2);
        compVec2.subtract(point, compVec1);
        float len = compVec1.lengthSquared();
        vars.release();
        return len;
    }

    public float distance(Vector3f point) {
        return FastMath.sqrt(distanceSquared(point));
View Full Code Here

        compMat1.m22 = sumXX + sumYY;

        compEigen1.calculateEigen(compMat1);
        direction = compEigen1.getEigenVector(0);

        vars.release();
    }

    /**
     *
     * <code>random</code> determines a random point along the line.
View Full Code Here

                    maxZ = vars.vect1.z;
                }
            }
        }

        vars.release();

        center.set(minX + maxX, minY + maxY, minZ + maxZ);
        center.multLocal(0.5f);

        xExtent = maxX - center.x;
View Full Code Here

        // Assign the biggest rotations after scales.
        box.xExtent = FastMath.abs(vars.vect2.getX());
        box.yExtent = FastMath.abs(vars.vect2.getY());
        box.zExtent = FastMath.abs(vars.vect2.getZ());

        vars.release();

        return box;
    }

    public BoundingVolume transform(Matrix4f trans, BoundingVolume store) {
View Full Code Here

        // Assign the biggest rotations after scales.
        box.xExtent = FastMath.abs(vars.vect1.getX());
        box.yExtent = FastMath.abs(vars.vect1.getY());
        box.zExtent = FastMath.abs(vars.vect1.getZ());

        vars.release();

        return box;
    }

    /**
 
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.