# 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
        glScale(LW,LH,LW)

        glEnable(GL_BLEND)
        glBlendFunc(GL_SRC_ALPHA,GL_ONE_MINUS_SRC_ALPHA)
        glPushMatrix()
        glTranslate(*config.bounds[0])
        blockdraw.draw()
        glPopMatrix()

        # Draw the shadow blocks (occlusions)
        glDisable(GL_POLYGON_OFFSET_FILL)

        # Draw the axes for the model coordinate space
        glLineWidth(3)
        glBegin(GL_LINES)
        glColor3f(1,0,0); glVertex3f(0,0,0); glVertex3f(1,0,0)
        glColor3f(0,1,0); glVertex3f(0,0,0); glVertex3f(0,1,0)
        glColor3f(0,0,1); glVertex3f(0,0,0); glVertex3f(0,0,1)
        glEnd()

        # Draw a grid for the model coordinate space
        if self.flag_drawgrid:
            glLineWidth(1)
            glBegin(GL_LINES)
            GR = config.GRIDRAD/2
            glColor3f(1.0,1.0,1.0)
            for j in range(0,1):
                for i in range(-GR,GR+1):
                    glVertex(i,j,-GR); glVertex(i,j,GR)
                    glVertex(-GR,j,i); glVertex(GR,j,i)

# 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

        glScale(LW,LH,LW)

        glEnable(GL_BLEND)
        glBlendFunc(GL_SRC_ALPHA,GL_ONE_MINUS_SRC_ALPHA)
        glPushMatrix()
        glTranslate(*config.bounds[0])
        blockdraw.draw()
        glPopMatrix()

        # Draw the shadow blocks (occlusions)
        glDisable(GL_POLYGON_OFFSET_FILL)

        # Draw the axes for the model coordinate space
        glLineWidth(3)
        glBegin(GL_LINES)
        glColor3f(1,0,0); glVertex3f(0,0,0); glVertex3f(1,0,0)
        glColor3f(0,1,0); glVertex3f(0,0,0); glVertex3f(0,1,0)
        glColor3f(0,0,1); glVertex3f(0,0,0); glVertex3f(0,0,1)
        glEnd()

        # Draw a grid for the model coordinate space
        if self.flag_drawgrid:
            glLineWidth(1)
            glBegin(GL_LINES)
            GR = config.GRIDRAD/2
            glColor3f(1.0,1.0,1.0)
            for j in range(0,1):
                for i in range(-GR,GR+1):
                    glVertex(i,j,-GR); glVertex(i,j,GR)
                    glVertex(-GR,j,i); glVertex(GR,j,i)

            glEnd()