def drawBoundingSphere(self):
     engine.drawRect(
         self.aabb.worldSphere.posX - self.aabb.worldSphere.radius,
         self.aabb.worldSphere.posY - self.aabb.worldSphere.radius,
         self.aabb.worldSphere.radius*2,
         self.aabb.worldSphere.radius*2,            
         (255,255,255,100) )            
 def drawAABB(self):
     engine.drawRect(
         self.aabb.worldAABB.minX,
         self.aabb.worldAABB.minY,
         self.aabb.worldAABB.maxX - self.aabb.worldAABB.minX,
         self.aabb.worldAABB.maxY - self.aabb.worldAABB.minY,
         (255,255,255,100) )
示例#3
0
def drawStuff(width, height):
    engine.clear()
    color = pyui.colors.yellow
    engine.drawLine(10, 10, width - 10, 10, color)
    engine.drawLine(width - 10, 10, width - 10, height - 10, color)
    engine.drawLine(width - 10, height - 10, 10, height - 10, color)
    engine.drawLine(10, height - 10, 10, 10, color)

    engine.drawRect(50, 50, 300, 200, pyui.colors.blue)
    engine.drawText("First Graphics Test", (50, 50), pyui.colors.white)
def drawStuff(width, height):
    engine.clear()
    color = pyui.colors.yellow
    engine.drawLine(10,10, width-10,10, color)
    engine.drawLine(width-10,10, width-10,height-10, color)
    engine.drawLine(width-10,height-10, 10,height-10, color)
    engine.drawLine(10,height-10, 10,10, color)

    engine.drawRect(50, 50, 300, 200, pyui.colors.blue)
    engine.drawText("First Graphics Test", (50,50), pyui.colors.white)