Class RnRoad
Inheritance
System.Object
RnRoad
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
public class RnRoad : RnRoadBase
Constructors
RnRoad()
Declaration
RnRoad(IEnumerable<PLATEAUCityObjectGroup>, IEnumerable<RnCityObjectGroupKey>)
Declaration
public RnRoad(IEnumerable<PLATEAUCityObjectGroup> targetTrans, IEnumerable<RnCityObjectGroupKey> groupKeys)
Parameters
| Type |
Name |
Description |
| IEnumerable<PLATEAUCityObjectGroup> |
targetTrans |
|
| IEnumerable<RnCityObjectGroupKey> |
groupKeys |
|
RnRoad(PLATEAUCityObjectGroup, RnCityObjectGroupKey)
オリジナルのメッシュを含むPLATEAUCityObjectGroup, 自身が所属する主要地物キーを受け取るコンストラクタ
Declaration
public RnRoad(PLATEAUCityObjectGroup targetTran, RnCityObjectGroupKey groupKey)
Parameters
Properties
中央分離帯を含めた全てのレーン。
左車線 -> 中央分離帯 -> 右車線の順番になっている
Declaration
public IEnumerable<RnLane> AllLanesWithMedian { get; }
Property Value
| Type |
Description |
| IEnumerable<RnLane> |
|
HasBothLane
Declaration
public bool HasBothLane { get; }
Property Value
| Type |
Description |
| System.Boolean |
|
IsAllBothConnectedLane
Declaration
public bool IsAllBothConnectedLane { get; }
Property Value
| Type |
Description |
| System.Boolean |
|
IsAllLaneValid
Declaration
public bool IsAllLaneValid { get; }
Property Value
| Type |
Description |
| System.Boolean |
|
IsEmptyRoad
Declaration
public bool IsEmptyRoad { get; }
Property Value
| Type |
Description |
| System.Boolean |
|
IsValid
Declaration
public bool IsValid { get; }
Property Value
| Type |
Description |
| System.Boolean |
|
MainLanes
Declaration
public IReadOnlyList<RnLane> MainLanes { get; }
Property Value
| Type |
Description |
| IReadOnlyList<RnLane> |
|
Declaration
public RnLane MedianLane { get; }
Property Value
Next
Declaration
public RnRoadBase Next { get; }
Property Value
Prev
Declaration
public RnRoadBase Prev { get; }
Property Value
Methods
AddMainLane(RnLane)
TODO : 左右の隣接情報がないので要修正
laneを追加する. ParentRoad情報も更新する
Declaration
public bool AddMainLane(RnLane lane)
Parameters
| Type |
Name |
Description |
| RnLane |
lane |
|
Returns
| Type |
Description |
| System.Boolean |
|
AddMainLane(RnLane, Int32)
laneを追加. indexで指定した位置に追加する
Declaration
public bool AddMainLane(RnLane lane, int index)
Parameters
| Type |
Name |
Description |
| RnLane |
lane |
|
| System.Int32 |
index |
|
Returns
| Type |
Description |
| System.Boolean |
|
AlignLaneBorder(RnLaneBorderDir)
Declaration
public void AlignLaneBorder(RnLaneBorderDir borderDir = RnLaneBorderDir.Left2Right)
Parameters
AllWays()
Declaration
public override IEnumerable<RnWay> AllWays()
Returns
| Type |
Description |
| IEnumerable<RnWay> |
|
Overrides
Check(Boolean)
Declaration
public override bool Check(bool showLog = true)
Parameters
| Type |
Name |
Description |
| System.Boolean |
showLog |
|
Returns
| Type |
Description |
| System.Boolean |
|
Overrides
CreateIsolatedRoad(PLATEAUCityObjectGroup, RnCityObjectGroupKey, RnWay)
Declaration
public static RnRoad CreateIsolatedRoad(PLATEAUCityObjectGroup targetTran, RnCityObjectGroupKey groupKey, RnWay way)
Parameters
Returns
CreateOneLaneRoad(PLATEAUCityObjectGroup, RnCityObjectGroupKey, RnLane)
Declaration
public static RnRoad CreateOneLaneRoad(PLATEAUCityObjectGroup targetTran, RnCityObjectGroupKey groupKey, RnLane lane)
Parameters
Returns
DisConnect(Boolean)
Declaration
public override void DisConnect(bool removeFromModel)
Parameters
| Type |
Name |
Description |
| System.Boolean |
removeFromModel |
|
Overrides
GetBorders()
Declaration
public override IEnumerable<RnRoadBase.NeighborBorder> GetBorders()
Returns
Overrides
GetBorderWay(RnLane, RnLaneBorderType, RnLaneBorderDir)
laneの車線に対して, RnRoad基準におけるborderTypeで指定した境界線を取ってくる
(laneのPrev/Nextをそのまま持ってくるわけではないことに注意)
この時境界線の方向はborderDirで指定する
Declaration
public RnWay GetBorderWay(RnLane lane, RnLaneBorderType borderType, RnLaneBorderDir borderDir)
Parameters
Returns
GetBorderWays(RnLaneBorderType)
境界線の一覧を取得する. left->rightの順番
Declaration
public IEnumerable<RnWay> GetBorderWays(RnLaneBorderType type)
Parameters
Returns
| Type |
Description |
| IEnumerable<RnWay> |
|
GetCentralVertex()
Declaration
public override Vector3 GetCentralVertex()
Returns
Overrides
GetLanes(RnDir)
Declaration
public IEnumerable<RnLane> GetLanes(RnDir dir)
Parameters
| Type |
Name |
Description |
| RnDir |
dir |
|
Returns
| Type |
Description |
| IEnumerable<RnLane> |
|
GetLeftLaneCount()
左側レーン数(Prev/NextとBorderが共通である前提)
Declaration
public int GetLeftLaneCount()
Returns
| Type |
Description |
| System.Int32 |
|
GetLeftLanes()
左側のレーン(Prev/NextとBorderが共通である前提)
Declaration
public IEnumerable<RnLane> GetLeftLanes()
Returns
| Type |
Description |
| IEnumerable<RnLane> |
|
GetLeftWayOfLanes()
Declaration
public RnWay GetLeftWayOfLanes()
Returns
Declaration
public float GetMedianWidth()
Returns
| Type |
Description |
| System.Single |
|
GetMergedBorder(RnLaneBorderType, Nullable<RnDir>)
dirで指定した側の全レーンのBorderを統合した一つの大きなBorderを返す
WayはLeft -> Right方向になっている
dir == nullの時は中央分離帯含む全レーン
Declaration
public RnWay GetMergedBorder(RnLaneBorderType type, RnDir? dir = null)
Parameters
Returns
GetMergedSideWay(RnDir)
Lanes全体を一つのLaneとしたときのdir側のWayを返す
WayはPrev -> Nextの方向になっている
Declaration
public RnWay GetMergedSideWay(RnDir dir)
Parameters
| Type |
Name |
Description |
| RnDir |
dir |
|
Returns
GetNeighborRoads()
Declaration
public override IEnumerable<RnRoadBase> GetNeighborRoads()
Returns
Overrides
GetRightLaneCount()
右側レーン数(Prev/NextとBorderが共通である前提)
Declaration
public int GetRightLaneCount()
Returns
| Type |
Description |
| System.Int32 |
|
GetRightLanes()
右側のレーン(Prev/NextとBorderが共通である前提)
Declaration
public IEnumerable<RnLane> GetRightLanes()
Returns
| Type |
Description |
| IEnumerable<RnLane> |
|
GetRightWayOfLanes()
Declaration
public RnWay GetRightWayOfLanes()
Returns
IsLeftLane(RnLane)
laneがこのRoadの左車線かどうか(Prev/NextとBorderが共通である前提)
Declaration
public bool IsLeftLane(RnLane lane)
Parameters
| Type |
Name |
Description |
| RnLane |
lane |
|
Returns
| Type |
Description |
| System.Boolean |
|
IsRightLane(RnLane)
laneがこのRoadの右車線かどうか(Prev/NextとBorderが共通である前提)
Declaration
public bool IsRightLane(RnLane lane)
Parameters
| Type |
Name |
Description |
| RnLane |
lane |
|
Returns
| Type |
Description |
| System.Boolean |
|
RemoveMainLane(RnLane)
MainLaneのみ削除. laneを削除するParentRoad情報も更新する
Declaration
public bool RemoveMainLane(RnLane lane)
Parameters
| Type |
Name |
Description |
| RnLane |
lane |
|
Returns
| Type |
Description |
| System.Boolean |
|
ReplaceLane(RnLane, IEnumerable<RnLane>)
Declaration
public void ReplaceLane(RnLane before, IEnumerable<RnLane> newLanes)
Parameters
| Type |
Name |
Description |
| RnLane |
before |
|
| IEnumerable<RnLane> |
newLanes |
|
ReplaceLane(RnLane, RnLane)
Declaration
public void ReplaceLane(RnLane before, RnLane after)
Parameters
ReplaceLanes(IEnumerable<RnLane>)
Declaration
public void ReplaceLanes(IEnumerable<RnLane> newLanes)
Parameters
| Type |
Name |
Description |
| IEnumerable<RnLane> |
newLanes |
|
ReplaceLanes(IEnumerable<RnLane>, RnDir)
Declaration
public void ReplaceLanes(IEnumerable<RnLane> newLanes, RnDir dir)
Parameters
| Type |
Name |
Description |
| IEnumerable<RnLane> |
newLanes |
|
| RnDir |
dir |
|
ReplaceNeighbor(RnRoadBase, RnRoadBase)
情報を直接書き換えるので呼び出し注意(相互に隣接情報を維持するように書き換える必要がある)
隣接情報をfrom -> toに変更する.
(from/to側の隣接情報は変更しない)
Declaration
public override void ReplaceNeighbor(RnRoadBase from, RnRoadBase to)
Parameters
Overrides
ReplaceNeighbor(RnWay, RnRoadBase)
情報を直接書き換えるので呼び出し注意(相互に隣接情報を維持するように書き換える必要がある)
borderWayで指定される境界線の隣接道路情報をtoに置き換える
Declaration
public override void ReplaceNeighbor(RnWay borderWay, RnRoadBase to)
Parameters
Overrides
Reverse(Boolean)
Next,Prevを逆転する.
その結果, レーンのIsReverseも逆転/mainLanesの配列順も逆転する
keepOneLaneIsLeftがtrueの場合, 1車線しか無い道路だとその1車線がRoadのPrev/Nextを同じ方向になるように(左車線扱い)する
Declaration
public void Reverse(bool keepOneLaneIsLeft = true)
Parameters
| Type |
Name |
Description |
| System.Boolean |
keepOneLaneIsLeft |
|
SeparateContinuousBorder()
必ず 境界線の間に輪郭線が来るように少し移動させて間に微小なEdgeを追加する
Declaration
public void SeparateContinuousBorder()
直接呼ぶの禁止. RnRoadGroupから呼ばれる
Declaration
public void SetMedianLane(RnLane lane)
Parameters
| Type |
Name |
Description |
| RnLane |
lane |
|
SetPrevNext(RnRoadBase, RnRoadBase)
Factoryからのみ呼ぶ. Prev/Nextの更新
Declaration
public void SetPrevNext(RnRoadBase prev, RnRoadBase next)
Parameters
TryGetMergedSideWay(Nullable<RnDir>, out RnWay, out RnWay)
dirで指定した側の全レーンの左右のWayを返す
dir==nullの時は全レーン共通で返す
例) 左2車線でdir==RnDir.Leftの場合, 一番左の車線の左側のWayと左から2番目の車線の右側のWayを返す
Declaration
public bool TryGetMergedSideWay(RnDir? dir, out RnWay leftWay, out RnWay rightWay)
Parameters
| Type |
Name |
Description |
| System.Nullable<RnDir> |
dir |
|
| RnWay |
leftWay |
|
| RnWay |
rightWay |
|
Returns
| Type |
Description |
| System.Boolean |
|
TryGetSideBorderWay(RnDir, out RnWay, out RnWay)
dir方向の一番左のWayと右のWayを取得.
向きは調整されていない
Declaration
public bool TryGetSideBorderWay(RnDir dir, out RnWay leftWay, out RnWay rightWay)
Parameters
Returns
| Type |
Description |
| System.Boolean |
|