Package com.ardor3d.math.type

Examples of com.ardor3d.math.type.ReadOnlyVector3.dot()


     *             if the plane is null.
     */
    @Override
    public boolean intersectsPlane(final ReadOnlyPlane plane, final Vector3 locationStore) {
        final ReadOnlyVector3 normal = plane.getNormal();
        final double denominator = normal.dot(_direction);

        if (denominator > -MathUtils.EPSILON && denominator < MathUtils.EPSILON) {
            return false; // coplanar
        }

View Full Code Here


        if (denominator > -MathUtils.EPSILON && denominator < MathUtils.EPSILON) {
            return false; // coplanar
        }

        final double numerator = -normal.dot(_origin) + plane.getConstant();
        final double ratio = numerator / denominator;

        if (ratio < MathUtils.EPSILON) {
            return false; // intersects behind _origin
        }
View Full Code Here

    }

    @Override
    public Side whichSide(final ReadOnlyPlane plane) {
        final ReadOnlyVector3 planeNormal = plane.getNormal();
        final double fRadius = Math.abs(_extent.getX() * (planeNormal.dot(_xAxis)))
                + Math.abs(_extent.getY() * (planeNormal.dot(_yAxis)))
                + Math.abs(_extent.getZ() * (planeNormal.dot(_zAxis)));
        final double fDistance = plane.pseudoDistance(_center);
        if (fDistance <= -fRadius) {
            return Plane.Side.Inside;
View Full Code Here

    @Override
    public Side whichSide(final ReadOnlyPlane plane) {
        final ReadOnlyVector3 planeNormal = plane.getNormal();
        final double fRadius = Math.abs(_extent.getX() * (planeNormal.dot(_xAxis)))
                + Math.abs(_extent.getY() * (planeNormal.dot(_yAxis)))
                + Math.abs(_extent.getZ() * (planeNormal.dot(_zAxis)));
        final double fDistance = plane.pseudoDistance(_center);
        if (fDistance <= -fRadius) {
            return Plane.Side.Inside;
        } else if (fDistance >= fRadius) {
View Full Code Here

    @Override
    public Side whichSide(final ReadOnlyPlane plane) {
        final ReadOnlyVector3 planeNormal = plane.getNormal();
        final double fRadius = Math.abs(_extent.getX() * (planeNormal.dot(_xAxis)))
                + Math.abs(_extent.getY() * (planeNormal.dot(_yAxis)))
                + Math.abs(_extent.getZ() * (planeNormal.dot(_zAxis)));
        final double fDistance = plane.pseudoDistance(_center);
        if (fDistance <= -fRadius) {
            return Plane.Side.Inside;
        } else if (fDistance >= fRadius) {
            return Plane.Side.Outside;
View Full Code Here

        final double[] fAWdU = new double[3];
        final double[] fDdU = new double[3];
        final double[] fADdU = new double[3];
        final double[] fAWxDdU = new double[3];

        fWdU[0] = rayDir.dot(_xAxis);
        fAWdU[0] = Math.abs(fWdU[0]);
        fDdU[0] = diff.dot(_xAxis);
        fADdU[0] = Math.abs(fDdU[0]);
        if (fADdU[0] > _extent.getX() && fDdU[0] * fWdU[0] >= 0.0) {
            return false;
View Full Code Here

        fADdU[0] = Math.abs(fDdU[0]);
        if (fADdU[0] > _extent.getX() && fDdU[0] * fWdU[0] >= 0.0) {
            return false;
        }

        fWdU[1] = rayDir.dot(_yAxis);
        fAWdU[1] = Math.abs(fWdU[1]);
        fDdU[1] = diff.dot(_yAxis);
        fADdU[1] = Math.abs(fDdU[1]);
        if (fADdU[1] > _extent.getY() && fDdU[1] * fWdU[1] >= 0.0) {
            return false;
View Full Code Here

        fADdU[1] = Math.abs(fDdU[1]);
        if (fADdU[1] > _extent.getY() && fDdU[1] * fWdU[1] >= 0.0) {
            return false;
        }

        fWdU[2] = rayDir.dot(_zAxis);
        fAWdU[2] = Math.abs(fWdU[2]);
        fDdU[2] = diff.dot(_zAxis);
        fADdU[2] = Math.abs(fDdU[2]);
        if (fADdU[2] > _extent.getZ() && fDdU[2] * fWdU[2] >= 0.0) {
            return false;
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.