Package co.paralleluniverse.spacebase

Examples of co.paralleluniverse.spacebase.MutableAABB.max()


            portToMvMatrix(currentPort);
            double margins = WIDTH_MARGINS;

            final int n;
            if (clock - lastQueryTime > SB_QUERY_RATE) {
                n = query(now, SpatialQueries.contained(AABB.create(currentPort.min(X) - margins, currentPort.max(X) + margins, currentPort.min(Y) - margins, currentPort.max(Y) + margins)));
                lastQueryTime = clock;
            } else {
                n = indexGen.get();
                lastDispTime = clock;
            }
View Full Code Here


            portToMvMatrix(currentPort);
            double margins = WIDTH_MARGINS;

            final int n;
            if (clock - lastQueryTime > SB_QUERY_RATE) {
                n = query(now, SpatialQueries.contained(AABB.create(currentPort.min(X) - margins, currentPort.max(X) + margins, currentPort.min(Y) - margins, currentPort.max(Y) + margins)));
                lastQueryTime = clock;
            } else {
                n = indexGen.get();
                lastDispTime = clock;
            }
View Full Code Here

        final double height = port.max(Y) - port.min(Y);
        final double ratio = height / width;
        double animation = Math.min(1.0, (double) (ct - portAnimationStartTime) / ANIMATION_DURATION);
        currentPort.min(X, port.min(X) + animation * portMinXAnimation);
        currentPort.min(Y, port.min(Y) + animation * portMinYAnimation);
        currentPort.max(X, port.max(X) + animation * portMaxXAnimation);
        currentPort.max(Y, port.max(Y) + animation * portMaxYAnimation);
        return currentPort;
    }

    private void fixPort(final long ct, boolean onlyIfFinished) {
View Full Code Here

        final double ratio = height / width;
        double animation = Math.min(1.0, (double) (ct - portAnimationStartTime) / ANIMATION_DURATION);
        currentPort.min(X, port.min(X) + animation * portMinXAnimation);
        currentPort.min(Y, port.min(Y) + animation * portMinYAnimation);
        currentPort.max(X, port.max(X) + animation * portMaxXAnimation);
        currentPort.max(Y, port.max(Y) + animation * portMaxYAnimation);
        return currentPort;
    }

    private void fixPort(final long ct, boolean onlyIfFinished) {
        final double width = port.max(X) - port.min(X);
View Full Code Here

        MutableAABB aabb = AABB.create(bounds.dims());
        for (int i = 0; i < bounds.dims(); i++) {
            double a = randRange(bounds.min(i), bounds.max(i));
            double b = randRange(bounds.min(i), bounds.max(i));
            aabb.min(i, (float) min(a, b));
            aabb.max(i, (float) max(a, b));
        }

        return floatify(aabb);
    }
View Full Code Here

            double size = (tmp*tmp) * variance + expSize;
            if(expSize > 0 && size == 0)
                size = 0.01;
            double a = randRange(bounds.min(i), bounds.max(i) - size);
            aabb.min(i, (float) a);
            aabb.max(i, (float) (a + size));
        }

        return floatify(aabb);
    }

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.