Package transientlibs.objects.primitives

Examples of transientlibs.objects.primitives.Coords


    }

    @Override
    public Coords multiplyVectorByDirection(float vector) {

        Coords resultCoords = new Coords(vector, vector);

        if (direction == 7) {
            resultCoords.x = resultCoords.x * -1;
            resultCoords.y = resultCoords.y * -1;
        }
View Full Code Here


        mapCoords.x = (float) Math.round(mapCoords.x * 100000) / 100000;
        mapCoords.y = (float) Math.round(mapCoords.y * 100000) / 100000;
    }

    public void takeOneFractionalStep(float stepSize) {
        Coords delta = setVectorByDirection(stepSize);
        performMove(delta.x, delta.y);
    }
View Full Code Here

    public void takeOneFractionalStep() {

        //Coords delta = setVectorByDirectionDefault();

        //Coords delta = setVectorByDirection(0.015625f);
        Coords delta = setVectorByDirection(0.03125f);
        //Coords delta = setVectorByDirection(0.0625f);

        //Log.info("D+ " + Terrain.tileStepVectorSize);

        //Coords delta = setVectorByDirection(Terrain.tileStepVectorSize);
View Full Code Here

        throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
    }

    // @Override
    public Coords returnMapCoordsAdjusted(float scrX, float scrY, MapEye eye) {
        return new Coords((scrX / Terrain.tileWidth) + eye.eyePosition.x, (scrY / Terrain.tileHeight) + eye.eyePosition.y);
    }
View Full Code Here

        return new Coords((scrX / Terrain.tileWidth) + eye.eyePosition.x, (scrY / Terrain.tileHeight) + eye.eyePosition.y);
    }

    @Override
    public Coords returnMapCoords(float scrX, float scrY) {
        return new Coords(scrX / Terrain.tileWidth, scrY / Terrain.tileHeight);
    }
View Full Code Here

   
    @Override
    public Coords returnScreenCoords(MapObject object) {

        Coords result = new Coords();

        result.x = (object.mapCoords.x * Terrain.tileWidth) + mapOffsetX;
        result.y = (object.mapCoords.y * Terrain.tileHeight) + mapOffsetY;

        return result;
View Full Code Here

        int actualX = (int) (scrX - realCameraX);
        int actualY = (int) (scrY - realCameraY);

        //return new Coords((scrX/Terrain.tileWidth)+camera.position.x, (scrY/Terrain.tileHeight)+camera.position.y);
        return new Coords((actualX / Terrain.tileWidth), (actualY / Terrain.tileHeight));
    }
View Full Code Here

        return new Coords((actualX / Terrain.tileWidth), (actualY / Terrain.tileHeight));
    }

    //@Override
    public Coords returnMapCoordsAdjusted(float scrX, float scrY, MapEye eye) {
        return new Coords((scrX / Terrain.tileWidth) + eye.eyePosition.x, (scrY / Terrain.tileHeight) + eye.eyePosition.y);
    }
View Full Code Here

        return new Coords((scrX / Terrain.tileWidth) + eye.eyePosition.x, (scrY / Terrain.tileHeight) + eye.eyePosition.y);
    }

    @Override
    public Coords returnMapCoords(float scrX, float scrY) {
        return new Coords(scrX / Terrain.tileWidth, scrY / Terrain.tileHeight);
    }
View Full Code Here

        int actualY = ((object.mapCoords.getIntY()) * Terrain.tileHeight) - realCameraY - Terrain.tileHeight;


       

        Coords result = new Coords();

        result.x = actualX;
        result.y = actualY;

       
View Full Code Here

TOP

Related Classes of transientlibs.objects.primitives.Coords

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.