コード例 #1
0
    public int PathWeight;                 //^ but in cells generated instead of number of segments


    public SegmentStump(PlannedSegment parent, SegmentCellOriented zeroposrot, int role, int pathdepth, int pathweight)
    {
        Parent     = parent;
        ZeroPosRot = zeroposrot;
        StumpRole  = role;
        PathDepth  = pathdepth;
        PathWeight = pathweight;
    }
コード例 #2
0
    public int PathWeight;  //cells generated so far as branch from main path or cells generated so far as main path if part of it

    public void PlanFromScheme(ArchivedSegment scheme, SegmentStump gridStump)
    {
        Scheme     = scheme;
        ZeroPosRot = new SegmentCellOriented(gridStump.ZeroPosRot.U,
                                             gridStump.ZeroPosRot.R,
                                             gridStump.ZeroPosRot.Facing,
                                             gridStump.ZeroPosRot.Type,
                                             gridStump.ZeroPosRot.Altitude);
        SegmentRole = gridStump.StumpRole;
        PathDepth   = gridStump.PathDepth + 1;
        PathWeight  = gridStump.PathWeight + Scheme.Weight;

        this.HasParent(gridStump.Parent);
        if (gridStump.Parent != null)
        {
            gridStump.Parent.IsParentOf(this);
        }
    }