# Path: blockplayer/config.py
# def load(dir_path):
# def save(dir_path):
# LH = 0.0192
# LW = 0.016
# GRIDRAD = 18
# 
# Path: blockplayer/blockdraw.py
# def clear():
# def show_grid(name, grid,
#               color=np.array([1,0,0,1]), opacity=1.0,
#               line_color=np.array([1,1,1,1])):
# def draw_block(blocks):
# def grid_vertices(grid, color=None):
# def grid_vertices_numpy(grid, color=None):
# def draw():


from wxpy3d.pointwindow import PointWindow
from OpenGL.GL import *
from OpenGL.GLU import *
from OpenGL.GL.ARB.vertex_buffer_object import *
from blockplayer import config
from blockplayer import blockdraw
import numpy as np
# Andrew Miller <amiller@cs.ucf.edu> 2011
#
# BlockPlayer - 3D model reconstruction using the Lattice-First algorithm
# See: 
#    "Interactive 3D Model Acquisition and Tracking of Building Block Structures"
#    Andrew Miller, Brandyn White, Emiko Charbonneau, Zach Kanzler, and Joseph J. LaViola Jr.
#    IEEE VR 2012, IEEE TVGC 2012
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this file,
# You can obtain one at http://mozilla.org/MPL/2.0/.



# Window for drawing point cloudsc
class BlockWindow(PointWindow):

    def __init__(self, *args, **kwargs):
        self.modelmat = np.eye(4)
        self.flag_drawgrid = False
        super(BlockWindow,self).__init__(*args, **kwargs)

    def draw_board(self):
        LW,LH = config.LW, config.LH
        glPolygonOffset(1.0,0.2)
        glEnable(GL_POLYGON_OFFSET_FILL)

        # Draw the gray table

# Path: blockplayer/config.py
# def load(dir_path):
# def save(dir_path):
# LH = 0.0192
# LW = 0.016
# GRIDRAD = 18
# 
# Path: blockplayer/blockdraw.py
# def clear():
# def show_grid(name, grid,
#               color=np.array([1,0,0,1]), opacity=1.0,
#               line_color=np.array([1,1,1,1])):
# def draw_block(blocks):
# def grid_vertices(grid, color=None):
# def grid_vertices_numpy(grid, color=None):
# def draw():


# Path: blockplayer/blockwindow.py
from wxpy3d.pointwindow import PointWindow
from OpenGL.GL import *
from OpenGL.GLU import *
from OpenGL.GL.ARB.vertex_buffer_object import *
from blockplayer import config
from blockplayer import blockdraw
import numpy as np

# Andrew Miller <amiller@cs.ucf.edu> 2011
#
# BlockPlayer - 3D model reconstruction using the Lattice-First algorithm
# See: 
#    "Interactive 3D Model Acquisition and Tracking of Building Block Structures"
#    Andrew Miller, Brandyn White, Emiko Charbonneau, Zach Kanzler, and Joseph J. LaViola Jr.
#    IEEE VR 2012, IEEE TVGC 2012
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this file,
# You can obtain one at http://mozilla.org/MPL/2.0/.



# Window for drawing point cloudsc
class BlockWindow(PointWindow):

    def __init__(self, *args, **kwargs):
        self.modelmat = np.eye(4)
        self.flag_drawgrid = False
        super(BlockWindow,self).__init__(*args, **kwargs)

    def draw_board(self):
        LW,LH = config.LW, config.LH
        glPolygonOffset(1.0,0.2)
        glEnable(GL_POLYGON_OFFSET_FILL)

        # Draw the gray table

        if 'bg' in config.__dict__: