當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。