本文整理汇总了Java中geometry.planar.IntOctagon.dimension方法的典型用法代码示例。如果您正苦于以下问题:Java IntOctagon.dimension方法的具体用法?Java IntOctagon.dimension怎么用?Java IntOctagon.dimension使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类geometry.planar.IntOctagon
的用法示例。
在下文中一共展示了IntOctagon.dimension方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: insert_incomplete_room
import geometry.planar.IntOctagon; //导入方法依赖的package包/类
/**
* Inserts a new incomplete room with an octagon shape.
*/
private void insert_incomplete_room(AutorouteEngine p_autoroute_engine, int p_lx, int p_ly, int p_rx, int p_uy,
int p_ulx, int p_lrx, int p_llx, int p_urx)
{
IntOctagon new_incomplete_room_shape = new IntOctagon(p_lx, p_ly, p_rx, p_uy, p_ulx, p_lrx, p_llx, p_urx);
new_incomplete_room_shape = new_incomplete_room_shape.normalize();
if (new_incomplete_room_shape.dimension() == 2)
{
IntOctagon new_contained_shape = this.room_shape.intersection(new_incomplete_room_shape);
if (!new_contained_shape.is_empty())
{
int door_dimension = new_contained_shape.dimension();
if (door_dimension > 0)
{
FreeSpaceExpansionRoom new_room =
p_autoroute_engine.add_incomplete_expansion_room(new_incomplete_room_shape, this.from_room.get_layer(), new_contained_shape);
ExpansionDoor new_door = new ExpansionDoor(this.completed_room, new_room, door_dimension);
this.completed_room.add_door(new_door);
new_room.add_door(new_door);
}
}
}
}