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()
Assembly: cs.temp.dll.dll
Syntax
Constructors
RnRoadGroup(RnIntersection, RnIntersection, IEnumerable<RnRoad>)
Declaration
public RnRoadGroup(RnIntersection prevIntersection, RnIntersection nextIntersection, IEnumerable<RnRoad> roads)
Parameters
Properties
IsAligned
Declaration
public bool IsAligned { get; }
Property Value
| Type |
Description |
| System.Boolean |
|
IsValid
Declaration
public bool IsValid { get; }
Property Value
| Type |
Description |
| System.Boolean |
|
NextIntersection
Declaration
public RnIntersection NextIntersection { get; }
Property Value
PrevIntersection
Declaration
public RnIntersection PrevIntersection { get; }
Property Value
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
AdjustBorder()
交差点との境界線の角度を調整する(進行方向に垂直になるようにする)
Declaration
public void AdjustBorder()
Align()
Declaration
Returns
| Type |
Description |
| System.Boolean |
|
まだ中央分離帯がない場合は作成する.
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
Returns
中央分離帯の幅を拡縮する. deltaWidthが正なら幅が増加する
Declaration
public bool ExpandMedianWidth(float deltaWidth, LaneWayMoveOption moveOption)
Parameters
Returns
| Type |
Description |
| System.Boolean |
|
GetEdgeWays(RnDir)
Declaration
public RnRoadGroup.RnWayGroup GetEdgeWays(RnDir dir)
Parameters
| Type |
Name |
Description |
| RnDir |
dir |
|
Returns
GetLanes(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> |
|
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
GetSideWalkGroups(out IReadOnlyCollection<RnRoadGroup.RnSideWalkGroup>, out IReadOnlyCollection<RnRoadGroup.RnSideWalkGroup>)
Declaration
public void GetSideWalkGroups(out IReadOnlyCollection<RnRoadGroup.RnSideWalkGroup> left, out IReadOnlyCollection<RnRoadGroup.RnSideWalkGroup> right)
Parameters
中央分離帯があるかどうか.
構成するすべての道路に中央分離帯がある場合にtrueを返す
Declaration
Returns
| Type |
Description |
| System.Boolean |
|
Declaration
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
Returns
| Type |
Description |
| System.Boolean |
|
MergeRoads()
Declaration
Returns
| Type |
Description |
| System.Boolean |
|
Declaration
public void RemoveMedian(LaneWayMoveOption moveOption = LaneWayMoveOption.MoveBothWay)
Parameters
RemoveSideWalks(IReadOnlyCollection<RnRoadGroup.RnSideWalkGroup>)
Declaration
public void RemoveSideWalks(IReadOnlyCollection<RnRoadGroup.RnSideWalkGroup> sideWalks)
Parameters
SetLaneCount(RnDir, Int32, Boolean)
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 |
|
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 |
|