private static int positionSort(Point3D pos1, Point3D pos2)
    {
        if(pos1.getX() == pos2.getX())
        {
            if(pos1.getY() == pos2.getY())
            {
                if(pos1.getZ() == pos2.getZ())
                    return 0; //Same
                else if(pos1.getZ() > pos2.getZ())
                    return -1; //Lower
                else
                    return 1; //Higher
            }
            else if(pos1.getY() > pos2.getY())
                return 1;  //Higher
            else
                return -1; //Lower
        }
        else if(pos1.getX() > pos2.getX())
            return 1; //Higher
        else
            return -1; //Lower
    }