Esempio n. 1
0
 def dc(b_box1, b_box2, return_type=Types.BOOL):
     obj1, obj2 = PredicateLibrary.create_polygons(b_box1, b_box2)
     return TypeConverter.return_correct_type(obj1.disjoint(obj2),
                                              return_type)
Esempio n. 2
0
 def inFrontOf(b_box1, b_box2, return_type=Types.BOOL):
     return TypeConverter.return_correct_type(b_box1.min.y > b_box2.max.y,
                                              return_type)
Esempio n. 3
0
 def ntppi(b_box1, b_box2, return_type=Types.BOOL):
     obj1, obj2 = PredicateLibrary.create_polygons(b_box1, b_box2)
     return TypeConverter.return_correct_type(
         obj2.within(obj1) and not obj1.equals(obj2), return_type)
Esempio n. 4
0
 def behind(b_box1, b_box2, return_type=Types.BOOL):
     return TypeConverter.return_correct_type(b_box1.max.y < b_box2.min.y,
                                              return_type)
Esempio n. 5
0
 def below(b_box1, b_box2, return_type=Types.BOOL):
     return TypeConverter.return_correct_type(b_box1.max.z < b_box2.min.z,
                                              return_type)
Esempio n. 6
0
 def rightOf(b_box1, b_box2, return_type=Types.BOOL):
     return TypeConverter.return_correct_type(b_box1.min.x > b_box2.max.x,
                                              return_type)
Esempio n. 7
0
 def onTable(b_box1, b_box2, return_type=Types.BOOL):
     return TypeConverter.return_correct_type(
         abs(b_box1.min.z - b_box2.min.z) < 5, return_type)
Esempio n. 8
0
 def po(b_box1, b_box2, return_type=Types.BOOL):
     obj1, obj2 = PredicateLibrary.create_polygons(b_box1, b_box2)
     return TypeConverter.return_correct_type(
         obj1.intersects(obj2) and not obj1.within(obj2)
         and not obj2.within(obj1), return_type)