当前位置: 首页>>代码示例>>Python>>正文


Python World.addBox方法代码示例

本文整理汇总了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
开发者ID:CptainWho,项目名称:AR_MSI_Project,代码行数:28,代码来源:obstacleWorld_box_2doors.py

示例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
开发者ID:CptainWho,项目名称:AR_MSI_Project,代码行数:19,代码来源:corridorWithDoorWorld.py

示例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
开发者ID:CptainWho,项目名称:AR_MSI_Project,代码行数:20,代码来源:obstacleWorld3.py


注:本文中的World.addBox方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。