当前位置: 首页>>代码示例>>Java>>正文


Java Simplex.EMPTY属性代码示例

本文整理汇总了Java中geometry.planar.Simplex.EMPTY属性的典型用法代码示例。如果您正苦于以下问题:Java Simplex.EMPTY属性的具体用法?Java Simplex.EMPTY怎么用?Java Simplex.EMPTY使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在geometry.planar.Simplex的用法示例。


在下文中一共展示了Simplex.EMPTY属性的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: TargetItemExpansionDoor

/** Creates a new instance of ItemExpansionInfo */
public TargetItemExpansionDoor(Item p_item, int p_tree_entry_no, CompleteExpansionRoom p_room, ShapeSearchTree p_search_tree)
{
    item = p_item;
    tree_entry_no = p_tree_entry_no;
    room = p_room;
    if (room == null)
    {
        this.shape = Simplex.EMPTY;
    }
    else
    {
        TileShape item_shape = item.get_tree_shape(p_search_tree, tree_entry_no);
        this.shape = item_shape.intersection(room.get_shape());
    }
    maze_search_info = new MazeSearchElement();
}
 
开发者ID:andrasfuchs,项目名称:BioBalanceDetector,代码行数:17,代码来源:TargetItemExpansionDoor.java

示例2: reduce_trace_shape_at_tie_pin

/**
 * Reduces the first or last shape of p_trace at a tie pin, so that the autorouter algorithm
 * can find a connection for a different net.
 */
public void reduce_trace_shape_at_tie_pin(Pin p_tie_pin, PolylineTrace p_trace)
{
    TileShape pin_shape = p_tie_pin.get_tree_shape_on_layer(this, p_trace.get_layer());
    FloatPoint compare_corner;
    int trace_shape_no;
    if (p_trace.first_corner().equals(p_tie_pin.get_center()))
    {
        trace_shape_no = 0;
        compare_corner = p_trace.polyline().corner_approx(1);

    }
    else if (p_trace.last_corner().equals(p_tie_pin.get_center()))
    {
        trace_shape_no = p_trace.corner_count() - 2;
        compare_corner = p_trace.polyline().corner_approx(p_trace.corner_count() - 2);
    }
    else
    {
        return;
    }
    TileShape trace_shape = p_trace.get_tree_shape(this, trace_shape_no);
    TileShape intersection = trace_shape.intersection(pin_shape);
    if (intersection.dimension() < 2)
    {
        return;
    }
    TileShape[] shape_pieces = trace_shape.cutout(pin_shape);
    TileShape new_trace_shape = Simplex.EMPTY;
    for (int i = 0; i < shape_pieces.length; ++i)
    {
        if (shape_pieces[i].dimension() == 2)
        {
            if (new_trace_shape == Simplex.EMPTY || shape_pieces[i].contains(compare_corner))
            {
                new_trace_shape = shape_pieces[i];
            }
        }
    }
    change_item_shape(p_trace, trace_shape_no, new_trace_shape);
}
 
开发者ID:andrasfuchs,项目名称:BioBalanceDetector,代码行数:44,代码来源:ShapeSearchTree.java


注:本文中的geometry.planar.Simplex.EMPTY属性示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。