@staticmethod
def create_table(env, geom):
    thickness = geom.thickness
    leg_height = geom.leg_height
    back = geom.back
    (dim1, dim2) = geom.table_dim
    (legdim1, legdim2) = geom.leg_dim
    table_color = [0.5, 0.2, 0.1]
    component_type = KinBody.Link.GeomType.Box
    tabletop = OpenRAVEBody.create_body_info(component_type, [(dim1 / 2), (dim2 / 2), (thickness / 2)], table_color)
    leg1 = OpenRAVEBody.create_body_info(component_type, [(legdim1 / 2), (legdim2 / 2), (leg_height / 2)], table_color)
    leg1._t[(0, 3)] = ((dim1 / 2) - (legdim1 / 2))
    leg1._t[(1, 3)] = ((dim2 / 2) - (legdim2 / 2))
    leg1._t[(2, 3)] = (((- leg_height) / 2) - (thickness / 2))
    leg2 = OpenRAVEBody.create_body_info(component_type, [(legdim1 / 2), (legdim2 / 2), (leg_height / 2)], table_color)
    leg2._t[(0, 3)] = ((dim1 / 2) - (legdim1 / 2))
    leg2._t[(1, 3)] = (((- dim2) / 2) + (legdim2 / 2))
    leg2._t[(2, 3)] = (((- leg_height) / 2) - (thickness / 2))
    leg3 = OpenRAVEBody.create_body_info(component_type, [(legdim1 / 2), (legdim2 / 2), (leg_height / 2)], table_color)
    leg3._t[(0, 3)] = (((- dim1) / 2) + (legdim1 / 2))
    leg3._t[(1, 3)] = ((dim2 / 2) - (legdim2 / 2))
    leg3._t[(2, 3)] = (((- leg_height) / 2) - (thickness / 2))
    leg4 = OpenRAVEBody.create_body_info(component_type, [(legdim1 / 2), (legdim2 / 2), (leg_height / 2)], table_color)
    leg4._t[(0, 3)] = (((- dim1) / 2) + (legdim1 / 2))
    leg4._t[(1, 3)] = (((- dim2) / 2) + (legdim2 / 2))
    leg4._t[(2, 3)] = (((- leg_height) / 2) - (thickness / 2))
    if back:
        back_plate = OpenRAVEBody.create_body_info(component_type, [(legdim1 / 10), (dim2 / 2), (leg_height - (thickness / 2))], table_color)
        back_plate._t[(0, 3)] = ((dim1 / 2) - (legdim1 / 10))
        back_plate._t[(1, 3)] = 0
        back_plate._t[(2, 3)] = (((- leg_height) / 2) - (thickness / 4))
    table = RaveCreateRobot(env, '')
    if (not back):
        table.InitFromGeometries([tabletop, leg1, leg2, leg3, leg4])
    else:
        table.InitFromGeometries([tabletop, leg1, leg2, leg3, leg4, back_plate])
    return table
@staticmethod
def create_table(env, geom):
    thickness = geom.thickness
    leg_height = geom.leg_height
    back = geom.back
    (dim1, dim2) = geom.table_dim
    (legdim1, legdim2) = geom.leg_dim
    table_color = [0.5, 0.2, 0.1]
    component_type = KinBody.Link.GeomType.Box
    tabletop = OpenRAVEBody.create_body_info(component_type, [(dim1 / 2), (dim2 / 2), (thickness / 2)], table_color)
    leg1 = OpenRAVEBody.create_body_info(component_type, [(legdim1 / 2), (legdim2 / 2), (leg_height / 2)], table_color)
    leg1._t[(0, 3)] = ((dim1 / 2) - (legdim1 / 2))
    leg1._t[(1, 3)] = ((dim2 / 2) - (legdim2 / 2))
    leg1._t[(2, 3)] = (((- leg_height) / 2) - (thickness / 2))
    leg2 = OpenRAVEBody.create_body_info(component_type, [(legdim1 / 2), (legdim2 / 2), (leg_height / 2)], table_color)
    leg2._t[(0, 3)] = ((dim1 / 2) - (legdim1 / 2))
    leg2._t[(1, 3)] = (((- dim2) / 2) + (legdim2 / 2))
    leg2._t[(2, 3)] = (((- leg_height) / 2) - (thickness / 2))
    leg3 = OpenRAVEBody.create_body_info(component_type, [(legdim1 / 2), (legdim2 / 2), (leg_height / 2)], table_color)
    leg3._t[(0, 3)] = (((- dim1) / 2) + (legdim1 / 2))
    leg3._t[(1, 3)] = ((dim2 / 2) - (legdim2 / 2))
    leg3._t[(2, 3)] = (((- leg_height) / 2) - (thickness / 2))
    leg4 = OpenRAVEBody.create_body_info(component_type, [(legdim1 / 2), (legdim2 / 2), (leg_height / 2)], table_color)
    leg4._t[(0, 3)] = (((- dim1) / 2) + (legdim1 / 2))
    leg4._t[(1, 3)] = (((- dim2) / 2) + (legdim2 / 2))
    leg4._t[(2, 3)] = (((- leg_height) / 2) - (thickness / 2))
    if back:
        back_plate = OpenRAVEBody.create_body_info(component_type, [(legdim1 / 10), (dim2 / 2), (leg_height - (thickness / 2))], table_color)
        back_plate._t[(0, 3)] = ((dim1 / 2) - (legdim1 / 10))
        back_plate._t[(1, 3)] = 0
        back_plate._t[(2, 3)] = (((- leg_height) / 2) - (thickness / 4))
    table = RaveCreateRobot(env, )
    if (not back):
        table.InitFromGeometries([tabletop, leg1, leg2, leg3, leg4])
    else:
        table.InitFromGeometries([tabletop, leg1, leg2, leg3, leg4, back_plate])
    return table