Package aspect.util

Examples of aspect.util.Vector2


        int index = start;
        for (int i = lod; i > 0; i--) {
            float u = i * texstep;
            for (int j = 0; j < vlod; j++) {
                float v = j * texstep * 2;
                Vector2 tex1 = new Vector2(u + texstep, v);
                Vector2 tex2 = new Vector2(u, v);
                Vector2 tex3 = new Vector2(u, v + texstep * 2);
                Vector2 tex4 = new Vector2(u + texstep, v + texstep * 2);
               
                index += copyVector2(tex1, dest, index, 1);
                index += copyVector2(tex2, dest, index, 1);
                index += copyVector2(tex3, dest, index, 1);
                index += copyVector2(tex4, dest, index, 1);
View Full Code Here


    }

    public void render() {
        setRenderMode(RenderMode.ORTHOGRAPHIC);
        loadIdentity();
        translate(new Vector2(getCanvasWidth() / 2, getCanvasHeight() / 2));

        drawModel.render();
    }
View Full Code Here

        int height = ((int) Math.round(dim.height / 16.0f)) * 16;
        return new Dimension(width, height);
    }

    public Point getPointInView(Vector3 point) {
        Vector2 usedAxes = axes.toView(point);
        int x = centerX() + scaleToView(usedAxes.x);
        int y = centerY() - scaleToView(usedAxes.y);
        return new Point(x, y);
    }
View Full Code Here

    }

    public Vector3 getPointInWorld(Point point) {
        float x = scaleToWorld(point.x - centerX());
        float y = -scaleToWorld(point.y - centerY());
        Vector2 usedAxes = new Vector2(x, y);
        return axes.toWorld(usedAxes);
    }
View Full Code Here

        Vector2 usedAxes = new Vector2(x, y);
        return axes.toWorld(usedAxes);
    }

    public Dimension getSizeInView(Vector3 size) {
        Vector2 usedAxes = axes.toView(size);
        int x = scaleToView(usedAxes.x);
        int y = scaleToView(usedAxes.y);
        return new Dimension(x, y);
    }
View Full Code Here

    }

    public Vector3 getSizeInWorld(Dimension size) {
        float x = scaleToWorld(size.width);
        float y = scaleToWorld(size.height);
        Vector2 usedAxes = new Vector2(x, y);
        return axes.toWorld(usedAxes);
    }
View Full Code Here

TOP

Related Classes of aspect.util.Vector2

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.