本文整理汇总了Java中geometry.planar.IntOctagon.corner_y方法的典型用法代码示例。如果您正苦于以下问题:Java IntOctagon.corner_y方法的具体用法?Java IntOctagon.corner_y怎么用?Java IntOctagon.corner_y使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类geometry.planar.IntOctagon
的用法示例。
在下文中一共展示了IntOctagon.corner_y方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: obstacle_segment_touches_inside
import geometry.planar.IntOctagon; //导入方法依赖的package包/类
/**
* Checks, if the border line segment with index p_obstacle_border_line_no intersects with the inside
* of p_room_shape.
*/
private static boolean obstacle_segment_touches_inside(IntOctagon p_obstacle_shape,
int p_obstacle_border_line_no, IntOctagon p_room_shape)
{
int curr_border_line_no = p_obstacle_border_line_no;
int curr_obstacle_corner_x = p_obstacle_shape.corner_x(p_obstacle_border_line_no);
int curr_obstacle_corner_y = p_obstacle_shape.corner_y(p_obstacle_border_line_no);
for (int j = 0; j < 5; ++j)
{
if (p_room_shape.side_of_border_line(curr_obstacle_corner_x, curr_obstacle_corner_y,
curr_border_line_no) != Side.ON_THE_LEFT)
{
return false;
}
curr_border_line_no = (curr_border_line_no + 1) % 8;
}
int next_obstacle_border_line_no = (p_obstacle_border_line_no + 1) % 8;
int next_obstacle_corner_x = p_obstacle_shape.corner_x(next_obstacle_border_line_no);
int next_obstacle_corner_y = p_obstacle_shape.corner_y(next_obstacle_border_line_no);
curr_border_line_no = (p_obstacle_border_line_no + 5) % 8;
for (int j = 0; j < 3; ++j)
{
if (p_room_shape.side_of_border_line(next_obstacle_corner_x, next_obstacle_corner_y,
curr_border_line_no) != Side.ON_THE_LEFT)
{
return false;
}
curr_border_line_no = (curr_border_line_no + 1) % 8;
}
return true;
}