public void renderAll(){

        Camera camera = this.raycaster.getCamera();

        double x = camera.getX();
        double z = camera.getZ();

        double width = raycaster.getWidth();

        for(int i = 0; i < width; i++){

            double grad = ((double)i)/(width/2) - 1;
            double angle = Math.atan(grad/camera.getProjectionDistance()) + camera.getAngle();

            RayIntersect ray = raycaster.getWallfinder().fireRay(x, z, angle);

            if(ray == null){
                floorRender.renderPlanes(i, (raycaster.getHeight() / 2) - 1, (raycaster.getHeight() / 2) + 1);
                continue;
            }

            double distance = ray.getDistance() * Math.cos(angle - camera.getAngle());
            renderScreenSlice(ray, distance, i);

        }



    }