Package model.util

Examples of model.util.BoundingBox


        double distanceZAwayFromImageToSeeEntireImage = longerEntireImageDimension / 2;

        int height = numberOfRowPixels; // Y-Axis
        int width = numberOfColumnPixels; // X-Axis
        int depth = (int) distanceZAwayFromImageToSeeEntireImage; // Z-Axis
        this.boxRetinaIsStuckIn = new BoundingBox(width, height, depth);

        this.retinaPositionWithinBox = new Point3D(width/2, height/2, depth);
    }
View Full Code Here


    public void setUp() {
        this.layer5Region = new Layer5Region("layer 5 region", 100, 200, 1, 20, 3);
    }

    public void test_getMotorOutputOnInactiveRegion() {
        assertEquals(new Point3D(0, 0, 0), this.layer5Region.getMotorOutput(new BoundingBox(66, 66, 33)));
    }
View Full Code Here

    }

    public void test_shiftNewRetinaPositionToLeft() {
        this.layer5Region.getColumn(50, 1).getNeuron(0).setActiveState(true);

        Point3D newRetinaPosition = this.layer5Region.getMotorOutput(new BoundingBox(66, 66, 33));
        assertEquals(0.66, newRetinaPosition.getX(), 0.001);
        assertEquals(33, newRetinaPosition.getY(), 0.001);
        assertEquals(0, newRetinaPosition.getZ(), 0.001);
    }
View Full Code Here

    }

    public void test_shiftNewRetinaPositionToRight() {
        this.layer5Region.getColumn(50, 99).getNeuron(0).setActiveState(true);

        Point3D newRetinaPosition = this.layer5Region.getMotorOutput(new BoundingBox(66, 66, 33));
        assertEquals(65.34, newRetinaPosition.getX(), 0.001);
        assertEquals(33, newRetinaPosition.getY(), 0.001);
        assertEquals(0, newRetinaPosition.getZ(), 0.001);
    }
View Full Code Here

    }

    public void test_shiftNewRetinaPositionUp() {
        this.layer5Region.getColumn(1, 50).getNeuron(0).setActiveState(true);

        Point3D newRetinaPosition = this.layer5Region.getMotorOutput(new BoundingBox(66, 66, 33));
        assertEquals(33, newRetinaPosition.getX(), 0.001);
        assertEquals(0.66, newRetinaPosition.getY(), 0.001);
        assertEquals(0, newRetinaPosition.getZ(), 0.001);
    }
View Full Code Here

    }

    public void test_shiftNewRetinaPositionDown() {
        this.layer5Region.getColumn(99, 50).getNeuron(0).setActiveState(true);

        Point3D newRetinaPosition = this.layer5Region.getMotorOutput(new BoundingBox(66, 66, 33));
        assertEquals(33, newRetinaPosition.getX(), 0.001);
        assertEquals(65.34, newRetinaPosition.getY(), 0.001);
        assertEquals(0, newRetinaPosition.getZ(), 0.001);
    }
View Full Code Here

    }

    public void test_zoomInNewRetinaPosition() {
        this.layer5Region.getColumn(1, 150).getNeuron(0).setActiveState(true);

        Point3D newRetinaPosition = this.layer5Region.getMotorOutput(new BoundingBox(66, 66, 33));
        assertEquals(0, newRetinaPosition.getX(), 0.001);
        assertEquals(0, newRetinaPosition.getY(), 0.001);
        assertEquals(0.33, newRetinaPosition.getZ(), 0.001);

        // There should be no change along the newRetinaPositionZ when other neurons are active/predictive
        // since the X & Y positions are not used for calculating zooming in & zooming out.
        this.layer5Region.getColumn(1, 101).getNeuron(0).setActiveState(true);

        Point3D newRetinaPosition2 = this.layer5Region.getMotorOutput(new BoundingBox(66, 66, 33));
        assertEquals(0, newRetinaPosition2.getX(), 0.001);
        assertEquals(0, newRetinaPosition2.getY(), 0.001);
        assertEquals(0.33, newRetinaPosition2.getZ(), 0.001);
    }
View Full Code Here

    }

    public void test_zoomOutNewRetinaPosition() {
        this.layer5Region.getColumn(99, 150).getNeuron(0).setActiveState(true);

        Point3D newRetinaPosition = this.layer5Region.getMotorOutput(new BoundingBox(66, 66, 33));
        assertEquals(0, newRetinaPosition.getX(), 0.001);
        assertEquals(0, newRetinaPosition.getY(), 0.001);
        assertEquals(32.67, newRetinaPosition.getZ(), 0.001);
    }
View Full Code Here

TOP

Related Classes of model.util.BoundingBox

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.