本文整理汇总了Java中geometry.planar.Simplex.get_instance方法的典型用法代码示例。如果您正苦于以下问题:Java Simplex.get_instance方法的具体用法?Java Simplex.get_instance怎么用?Java Simplex.get_instance使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类geometry.planar.Simplex
的用法示例。
在下文中一共展示了Simplex.get_instance方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: remove_complete_expansion_room
import geometry.planar.Simplex; //导入方法依赖的package包/类
/**
* Removes a complete expansion room from the database and creates
* new incomplete expansion rooms for the neighbours.
*/
public void remove_complete_expansion_room(CompleteFreeSpaceExpansionRoom p_room)
{
// create new incomplete expansion rooms for all neighbours
TileShape room_shape = p_room.get_shape();
int room_layer = p_room.get_layer();
Collection<ExpansionDoor> room_doors = p_room.get_doors();
for (ExpansionDoor curr_door : room_doors)
{
ExpansionRoom curr_neighbour = curr_door.other_room(p_room);
if (curr_neighbour != null)
{
curr_neighbour.remove_door(curr_door);
TileShape neighbour_shape = curr_neighbour.get_shape();
TileShape intersection = room_shape.intersection(neighbour_shape);
if (intersection.dimension() == 1)
{
// add a new incomplete room to curr_neighbour.
int[] touching_sides = room_shape.touching_sides(neighbour_shape);
Line[] line_arr = new Line[1];
line_arr[0] = neighbour_shape.border_line(touching_sides[1]).opposite();
Simplex new_incomplete_room_shape = Simplex.get_instance(line_arr);
IncompleteFreeSpaceExpansionRoom new_incomplete_room =
add_incomplete_expansion_room(new_incomplete_room_shape, room_layer, intersection);
ExpansionDoor new_door = new ExpansionDoor(curr_neighbour, new_incomplete_room, 1);
curr_neighbour.add_door(new_door);
new_incomplete_room.add_door(new_door);
}
}
}
this.remove_all_doors(p_room);
p_room.remove_from_tree(this.autoroute_search_tree);
if (complete_expansion_rooms != null)
{
complete_expansion_rooms.remove(p_room);
}
else
{
System.out.println("AutorouteEngine.remove_complete_expansion_room: this.complete_expansion_rooms is null");
}
this.drill_page_array.invalidate(room_shape);
}