Package engine.geometry

Examples of engine.geometry.Vector


        // - apply an impulse to the metal
        // - apply an opposite impulse to self

        Set<MetalHabit> set = ((LevelScene) getScene()).getSpace().findObjects(area, MetalHabit.class);
        for (MetalHabit m : set) {
            m.applyImpulse(new Vector(1, -1));
            dynamic.applyImpulse(new Vector(-1, 1));
        }
    }
View Full Code Here


        return true;
    }

    public static double maxProjection(Polygon polygon, Vector vector) {
        double max = Double.NEGATIVE_INFINITY;
        Vector v = new Vector();
        final int size = polygon.getSize();
        for (int i = 0; i < size; i++) {
            double dot = polygon.getVertex(i, v).dot(vector);
            if (dot > max) {
                max = dot;
View Full Code Here

        return max;
    }

    public static double minProjection(Polygon polygon, Vector vector) {
        double min = Double.POSITIVE_INFINITY;
        Vector v = new Vector();
        final int size = polygon.getSize();
        for (int i = 0; i < size; i++) {
            double dot = polygon.getVertex(i, v).dot(vector);
            if (dot < min) {
                min = dot;
View Full Code Here

TOP

Related Classes of engine.geometry.Vector

Copyright © 2018 www.massapicom. 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.