本文整理汇总了Python中World.addBox方法的典型用法代码示例。如果您正苦于以下问题:Python World.addBox方法的具体用法?Python World.addBox怎么用?Python World.addBox使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类World
的用法示例。
在下文中一共展示了World.addBox方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: buildWorld
# 需要导入模块: import World [as 别名]
# 或者: from World import addBox [as 别名]
def buildWorld():
world = World(10, 10)
# top 1
world.addLine(5, 3, 9, 3)
# bottom 1
world.addLine(5, 7, 9, 7)
# side left bootom
world.addLine(5, 3, 5, 3.5)
# side left middle
world.addLine(5, 3.75, 5, 5) # (narrow door, robot does not)
# world.addLine(5, 4, 5, 4.5) # (narrow door, robot still fits)
# side left top (wide door)
world.addLine(5, 6.5, 5, 7)
# side right top
world.addLine(9, 3, 9, 7)
world.addBox(target_x, target_y)
#polyline = [[1,6],[10.5,6],[10.5,3]]
#world.drawPolyline(polyline)
return world
示例2: buildWorld
# 需要导入模块: import World [as 别名]
# 或者: from World import addBox [as 别名]
def buildWorld():
world = World(20, 10)
world.addLine(1, 5, 10, 5)
world.addLine(11, 5, 19, 5)
world.addLine(1, 7, 19, 7)
world.addLine(11, 5, 11, 3.5)
world.addLine(11, 2.5, 11, 1)
world.addBox(15,3)
polyline = [[1,6],[10.5,6],[10.5,3],[15,3]]
world.drawPolyline(polyline)
return world
示例3: buildWorld
# 需要导入模块: import World [as 别名]
# 或者: from World import addBox [as 别名]
def buildWorld():
world = World(20, 10)
world.addLine(1, 5, 10, 5)
world.addLine(11, 5, 19, 5)
world.addLine(1, 7, 19, 7)
world.addLine(5, 5.3, 5, 6)
world.addLine(5, 6, 5.5, 6)
world.addLine(5.5, 6, 5.5, 5.3)
world.addLine(5, 5.3, 5.5, 5.3)
world.addBox(10.5,3)
#polyline = [[1,6],[10.5,6],[10.5,3]]
#world.drawPolyline(polyline)
return world