package Shape;


import javafx.scene.shape.Box;
import javafx.scene.shape.DrawMode;
import javafx.scene.transform.Translate;

public class VisibleWindow {

    public VisibleWindow(){
        WindowSize = 300;
        halfWSize = WindowSize/2;
        xOffset = 600;
        xTranslation = halfWSize + xOffset;
        yOffset = 300;
        yTranslation = halfWSize + yOffset;
        zTranslation = halfWSize;
    }
    public VisibleWindow(int WindowSize,  int xOffset, int yOffset){
        this.WindowSize = WindowSize;
        halfWSize = WindowSize/2;
        this.xOffset = xOffset;
        xTranslation = halfWSize + xOffset;
        this.yOffset = yOffset;
        yTranslation = halfWSize + yOffset;
        zTranslation = halfWSize;
    }



    public Box makeWindow(){
        Box window = new Box(WindowSize,WindowSize,WindowSize);
        window.setDrawMode(DrawMode.LINE);
        Translate windowTranslation = new Translate();
        windowTranslation.setX(xTranslation);
        windowTranslation.setY(yTranslation);
        windowTranslation.setZ(zTranslation);
        window.getTransforms().add(windowTranslation);

        return window;
    }


    public int getXOffset() {
        return xOffset;
    }

    public int getYOffset() {
        return yOffset;
    }

    public int getWindowSize(){return WindowSize;
    }
    int WindowSize = 0;
    int halfWSize = 0;
    int xOffset, yOffset, xTranslation, yTranslation, zTranslation;
}
