本文整理匯總了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);
}