Search Results for

    Show / Hide Table of Contents

    Class RnRoadGroup

    実際にデータ化されるものではない Intersection -> Intersectionを繋ぐ複数のRoadをまとめるクラス

    Inheritance
    System.Object
    RnRoadGroup
    Inherited Members
    System.Object.ToString()
    System.Object.Equals(System.Object)
    System.Object.Equals(System.Object, System.Object)
    System.Object.ReferenceEquals(System.Object, System.Object)
    System.Object.GetHashCode()
    System.Object.GetType()
    System.Object.MemberwiseClone()
    Namespace: PLATEAU.RoadNetwork.Structure
    Assembly: cs.temp.dll.dll
    Syntax
    public class RnRoadGroup

    Constructors

    RnRoadGroup(RnIntersection, RnIntersection, IEnumerable<RnRoad>)

    コンストラクタ

    Declaration
    public RnRoadGroup(RnIntersection prevIntersection, RnIntersection nextIntersection, IEnumerable<RnRoad> roads)
    Parameters
    Type Name Description
    RnIntersection prevIntersection
    RnIntersection nextIntersection
    IEnumerable<RnRoad> roads

    Properties

    IsAligned

    向きがそろっているかどうか

    Declaration
    public bool IsAligned { get; }
    Property Value
    Type Description
    System.Boolean

    IsValid

    有効なRoadGroupかどうか

    Declaration
    public bool IsValid { get; }
    Property Value
    Type Description
    System.Boolean

    NextIntersection

    終了ノード

    Declaration
    public RnIntersection NextIntersection { get; }
    Property Value
    Type Description
    RnIntersection

    PrevIntersection

    開始ノード

    Declaration
    public RnIntersection PrevIntersection { get; }
    Property Value
    Type Description
    RnIntersection

    Roads

    Declaration
    public IReadOnlyList<RnRoad> Roads { get; }
    Property Value
    Type Description
    IReadOnlyList<RnRoad>

    Methods

    AddSideWalks(IReadOnlyCollection<RnRoadGroup.RnSideWalkGroup>)

    Declaration
    public void AddSideWalks(IReadOnlyCollection<RnRoadGroup.RnSideWalkGroup> sideWalkGroup)
    Parameters
    Type Name Description
    IReadOnlyCollection<RnRoadGroup.RnSideWalkGroup> sideWalkGroup

    AdjustBorder()

    交差点との境界線の角度を調整する(進行方向に垂直になるようにする)

    Declaration
    public void AdjustBorder()

    Align()

    LaneのPrev/Nextの向きをそろえる

    Declaration
    public bool Align()
    Returns
    Type Description
    System.Boolean

    CreateMedianOrSkip(Single, Single)

    まだ中央分離帯がない場合は作成する. medianWidthは作成時の中央分離帯の幅. 最低1m. ただし目安であり、実際の幅は最小のレーン幅に合わせる

    Declaration
    public bool CreateMedianOrSkip(float medianWidth = 1F, float maxMedianLaneRate = 0.5F)
    Parameters
    Type Name Description
    System.Single medianWidth
    System.Single maxMedianLaneRate

    中央分離帯の割合が全体の道のこれを超えないようにする

    Returns
    Type Description
    System.Boolean

    CreateRoadGroupOrDefault(RnIntersection, RnIntersection)

    2つのノードを繋ぐRoadGroupを作成する 2つのノードが直接繋がっていない場合はnullを返す

    Declaration
    public static RnRoadGroup CreateRoadGroupOrDefault(RnIntersection prevIntersection, RnIntersection nextIntersection)
    Parameters
    Type Name Description
    RnIntersection prevIntersection
    RnIntersection nextIntersection
    Returns
    Type Description
    RnRoadGroup

    ExpandMedianWidth(Single, LaneWayMoveOption)

    中央分離帯の幅を拡縮する. deltaWidthが正なら幅が増加する

    Declaration
    public bool ExpandMedianWidth(float deltaWidth, LaneWayMoveOption moveOption)
    Parameters
    Type Name Description
    System.Single deltaWidth
    LaneWayMoveOption moveOption
    Returns
    Type Description
    System.Boolean

    GetEdgeWays(RnDir)

    Declaration
    public RnRoadGroup.RnWayGroup GetEdgeWays(RnDir dir)
    Parameters
    Type Name Description
    RnDir dir
    Returns
    Type Description
    RnRoadGroup.RnWayGroup

    GetLanes(RnDir)

    RnDirで指定した側のレーンを取得する

    Declaration
    public IEnumerable<RnLane> GetLanes(RnDir dir)
    Parameters
    Type Name Description
    RnDir dir
    Returns
    Type Description
    IEnumerable<RnLane>

    GetLeftLaneCount()

    左側のレーン数

    Declaration
    public int GetLeftLaneCount()
    Returns
    Type Description
    System.Int32

    GetLeftLanes()

    Declaration
    public IEnumerable<RnLane> GetLeftLanes()
    Returns
    Type Description
    IEnumerable<RnLane>

    GetMedians(out IReadOnlyCollection<RnWay>, out IReadOnlyCollection<RnWay>)

    中央分離帯を取得する

    Declaration
    public void GetMedians(out IReadOnlyCollection<RnWay> left, out IReadOnlyCollection<RnWay> right)
    Parameters
    Type Name Description
    IReadOnlyCollection<RnWay> left
    IReadOnlyCollection<RnWay> right

    GetRightLaneCount()

    右側レーン数

    Declaration
    public int GetRightLaneCount()
    Returns
    Type Description
    System.Int32

    GetRightLanes()

    Declaration
    public IEnumerable<RnLane> GetRightLanes()
    Returns
    Type Description
    IEnumerable<RnLane>

    GetSideWalkGroups()

    Declaration
    public IReadOnlyCollection<RnRoadGroup.RnSideWalkGroup> GetSideWalkGroups()
    Returns
    Type Description
    IReadOnlyCollection<RnRoadGroup.RnSideWalkGroup>

    GetSideWalkGroups(out IReadOnlyCollection<RnRoadGroup.RnSideWalkGroup>, out IReadOnlyCollection<RnRoadGroup.RnSideWalkGroup>)

    Declaration
    public void GetSideWalkGroups(out IReadOnlyCollection<RnRoadGroup.RnSideWalkGroup> left, out IReadOnlyCollection<RnRoadGroup.RnSideWalkGroup> right)
    Parameters
    Type Name Description
    IReadOnlyCollection<RnRoadGroup.RnSideWalkGroup> left
    IReadOnlyCollection<RnRoadGroup.RnSideWalkGroup> right

    HasMedian()

    中央分離帯があるかどうか. 構成するすべての道路に中央分離帯がある場合にtrueを返す

    Declaration
    public bool HasMedian()
    Returns
    Type Description
    System.Boolean

    HasMedians()

    Declaration
    public bool HasMedians()
    Returns
    Type Description
    System.Boolean

    IsDeepAligned()

    複数道路がきれいに整列されているかどうか 道路の方向が一致, かつレーンの方向も含めて向きが一致している

    Declaration
    public bool IsDeepAligned()
    Returns
    Type Description
    System.Boolean

    IsSameRoadGroup(RnRoadGroup, RnRoadGroup)

    2つのRoadGroupが同じかどうかを識別する 両方nullである場合はfalseを返す

    判定は同じ交差点、同じ道路を含むかで行う。 この時、各要素の順序は問わない

    Declaration
    public static bool IsSameRoadGroup(RnRoadGroup a, RnRoadGroup b)
    Parameters
    Type Name Description
    RnRoadGroup a
    RnRoadGroup b
    Returns
    Type Description
    System.Boolean

    MergeRoads()

    複数のRoadsを1つのRoadにまとめる

    Declaration
    public bool MergeRoads()
    Returns
    Type Description
    System.Boolean

    RemoveMedian(LaneWayMoveOption)

    中央分離帯を削除する

    Declaration
    public void RemoveMedian(LaneWayMoveOption moveOption = LaneWayMoveOption.MoveBothWay)
    Parameters
    Type Name Description
    LaneWayMoveOption moveOption

    RemoveSideWalks(IReadOnlyCollection<RnRoadGroup.RnSideWalkGroup>)

    Declaration
    public void RemoveSideWalks(IReadOnlyCollection<RnRoadGroup.RnSideWalkGroup> sideWalks)
    Parameters
    Type Name Description
    IReadOnlyCollection<RnRoadGroup.RnSideWalkGroup> sideWalks

    SetLaneCount(RnDir, Int32, Boolean)

    RnDirで指定した側のレーン数を設定する

    Declaration
    public void SetLaneCount(RnDir dir, int count, bool rebuildTrack = true)
    Parameters
    Type Name Description
    RnDir dir
    System.Int32 count
    System.Boolean rebuildTrack

    レーン分割後に関係する交差点のトラックを再生成する

    SetLaneCount(Int32, Int32, Boolean)

    レーン数を変更する

    Declaration
    public void SetLaneCount(int leftCount, int rightCount, bool rebuildTrack = true)
    Parameters
    Type Name Description
    System.Int32 leftCount
    System.Int32 rightCount
    System.Boolean rebuildTrack

    SetLaneCountWithMedian(Int32, Int32, Single)

    中央分離帯を考慮したレーン分割

    Declaration
    public void SetLaneCountWithMedian(int leftCount, int rightCount, float medianWidthRate)
    Parameters
    Type Name Description
    System.Int32 leftCount
    System.Int32 rightCount
    System.Single medianWidthRate

    SetLeftLaneCount(Int32, Boolean)

    左側レーン数を変更する

    Declaration
    public void SetLeftLaneCount(int count, bool rebuildTrack = true)
    Parameters
    Type Name Description
    System.Int32 count
    System.Boolean rebuildTrack

    SetRightLaneCount(Int32, Boolean)

    右側レーン数を変更する

    Declaration
    public void SetRightLaneCount(int count, bool rebuildTrack = true)
    Parameters
    Type Name Description
    System.Int32 count
    System.Boolean rebuildTrack

    TryCreateSimpleSpline(out Spline, out Single, Single, Single)

    中央を通るスプラインとその幅を取得する 幅は中間点から取得するので完璧な値ではない

    Declaration
    public bool TryCreateSimpleSpline(out Spline spline, out float width, float tangentLength = 1F, float pointSkipDistance = 0.001F)
    Parameters
    Type Name Description
    Spline spline
    System.Single width
    System.Single tangentLength
    System.Single pointSkipDistance
    Returns
    Type Description
    System.Boolean

    TryCreateSpline(out Spline, out Single, Single, Single)

    中央を通るスプラインとその幅を取得する 幅は中間点から取得するので完璧な値ではない

    Declaration
    public bool TryCreateSpline(out Spline spline, out float width, float tangentLength = 1F, float pointSkipDistance = 0.001F)
    Parameters
    Type Name Description
    Spline spline
    System.Single width
    System.Single tangentLength
    System.Single pointSkipDistance
    Returns
    Type Description
    System.Boolean
    In This Article
    Back to top PLATEAU SDK for Unity