コード例 #1
0
ファイル: vector-display.py プロジェクト: dklenowski/scripts
def on_resize(w, h):
    global width, height, scene_changed

    width = w
    height = h
    if height == 0:
        height = 1

    camera.focus(width, height)

    window.invalid = True
    return pyglet.event.EVENT_HANDLED
コード例 #2
0
ファイル: vector-display.py プロジェクト: dklenowski/analysis
def on_resize(w, h):
  global width, height, scene_changed
  
  width = w
  height = h
  if height == 0:
    height = 1

  camera.focus(width, height)
  
  window.invalid = True
  return pyglet.event.EVENT_HANDLED
コード例 #3
0
ファイル: vector-display.py プロジェクト: dklenowski/scripts
def on_draw():
    window.clear()

    logging.info("on_draw: %s" % str(camera))
    glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT)
    glLoadIdentity()

    camera.lookAt(0, 0, 0)
    camera.focus(width, height)

    drawAxes()
    drawPoints()

    return pyglet.event.EVENT_HANDLED
コード例 #4
0
ファイル: vector-display.py プロジェクト: dklenowski/analysis
def on_draw():
  window.clear()

  logging.info("on_draw: %s" % str(camera))
  glClear(GL_COLOR_BUFFER_BIT|GL_DEPTH_BUFFER_BIT)
  glLoadIdentity()

  camera.lookAt(0, 0, 0)
  camera.focus(width, height)
  
  drawAxes()
  drawPoints()

  return pyglet.event.EVENT_HANDLED