Class RnIntersection
Inheritance
System.Object
RnIntersection
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 RnIntersection : RnRoadBase
Constructors
RnIntersection()
Declaration
RnIntersection(IEnumerable<PLATEAUCityObjectGroup>, IEnumerable<RnCityObjectGroupKey>)
Declaration
public RnIntersection(IEnumerable<PLATEAUCityObjectGroup> targetTrans, IEnumerable<RnCityObjectGroupKey> targetGroupKeys)
Parameters
| Type |
Name |
Description |
| IEnumerable<PLATEAUCityObjectGroup> |
targetTrans |
|
| IEnumerable<RnCityObjectGroupKey> |
targetGroupKeys |
|
RnIntersection(PLATEAUCityObjectGroup, RnCityObjectGroupKey)
オリジナルのメッシュを含むPLATEAUCityObjectGroup, 自身が所属する主要地物キーを受け取るコンストラクタ
Declaration
public RnIntersection(PLATEAUCityObjectGroup targetTran, RnCityObjectGroupKey groupKey)
Parameters
Properties
Borders
他の道路との境界線Edge取得. edges.Where(e => e.IsBorder)と同義
Declaration
public IEnumerable<RnIntersectionEdge> Borders { get; }
Property Value
Edges
Declaration
public IReadOnlyList<RnIntersectionEdge> Edges { get; }
Property Value
IsEmptyIntersection
Declaration
public bool IsEmptyIntersection { get; }
Property Value
| Type |
Description |
| System.Boolean |
|
SignalController
Declaration
public TrafficSignalLightController SignalController { get; set; }
Property Value
Tracks
Declaration
public IReadOnlyList<RnTrack> Tracks { get; }
Property Value
| Type |
Description |
| IReadOnlyList<RnTrack> |
|
Methods
AddEdge(RnRoadBase, RnWay)
隣接情報追加. borderがnullの場合は追加しない
Declaration
public bool AddEdge(RnRoadBase road, RnWay border)
Parameters
Returns
| Type |
Description |
| System.Boolean |
|
Align()
edgesの順番を整列する. 各Edgeが連結かつ時計回りになるように整列する
Declaration
AllWays()
Declaration
public override IEnumerable<RnWay> AllWays()
Returns
| Type |
Description |
| IEnumerable<RnWay> |
|
Overrides
BuildTracks(BuildTrackOption)
Declaration
public void BuildTracks(BuildTrackOption op = null)
Parameters
Check(Boolean)
Declaration
public override bool Check(bool showLog = true)
Parameters
| Type |
Name |
Description |
| System.Boolean |
showLog |
|
Returns
| Type |
Description |
| System.Boolean |
|
Overrides
ClearTracks()
Declaration
public void ClearTracks()
ContainTrack(RnIntersectionEdge, RnIntersectionEdge)
Declaration
public bool ContainTrack(RnIntersectionEdge from, RnIntersectionEdge to)
Parameters
Returns
| Type |
Description |
| System.Boolean |
|
CreateEmptyIntersection(List<RnWay>, RnRoad, RnRoad)
Declaration
public static RnIntersection CreateEmptyIntersection(List<RnWay> borderLeft2Right, RnRoad prev, RnRoad next)
Parameters
Returns
DisConnect(Boolean)
Declaration
public override void DisConnect(bool removeFromModel)
Parameters
| Type |
Name |
Description |
| System.Boolean |
removeFromModel |
|
Overrides
FindTrack(RnIntersectionEdge, RnIntersectionEdge)
Declaration
public RnTrack FindTrack(RnIntersectionEdge from, RnIntersectionEdge to)
Parameters
Returns
GetBorders()
Declaration
public override IEnumerable<RnRoadBase.NeighborBorder> GetBorders()
Returns
Overrides
GetCenterPoint()
Declaration
public Vector3 GetCenterPoint()
Returns
GetCentralVertex()
Declaration
public override Vector3 GetCentralVertex()
Returns
Overrides
GetEdgeCenter(RnIntersectionEdge)
Declaration
public static Vector3 GetEdgeCenter(RnIntersectionEdge edge)
Parameters
Returns
GetEdgeCenter2D(RnIntersectionEdge)
Declaration
public static Vector2 GetEdgeCenter2D(RnIntersectionEdge edge)
Parameters
Returns
GetEdgeNormal(RnIntersectionEdge)
Declaration
public static Vector3 GetEdgeNormal(RnIntersectionEdge edge)
Parameters
Returns
GetEdgeNormal2D(RnIntersectionEdge)
edgeの法線方向(2D)取得(外側を向いているはず)
Declaration
public static Vector2 GetEdgeNormal2D(RnIntersectionEdge edge)
Parameters
Returns
GetNeighborRoads()
隣接するRnRoadBaseを取得重複チェックはしていないので注意
Declaration
public override IEnumerable<RnRoadBase> GetNeighborRoads()
Returns
Overrides
IsAligned()
Declaration
Returns
| Type |
Description |
| System.Boolean |
|
MergeContinuousNonBorderEdge()
境界線以外のEdgeが連続している場合一つのEdgeにまとめる
Declaration
public void MergeContinuousNonBorderEdge()
RemoveEdge(RnRoad, RnLane)
road/laneに接続している隣接情報を削除する
Declaration
public void RemoveEdge(RnRoad road, RnLane lane)
Parameters
RemoveEdges(Func<RnIntersectionEdge, Boolean>)
predicateで指定した隣接情報を削除する.
戻り値は削除された個数
Declaration
public int RemoveEdges(Func<RnIntersectionEdge, bool> predicate)
Parameters
Returns
| Type |
Description |
| System.Int32 |
|
RemoveEdges(RnWay)
Declaration
public int RemoveEdges(RnWay way)
Parameters
| Type |
Name |
Description |
| RnWay |
way |
|
Returns
| Type |
Description |
| System.Int32 |
|
RemoveTrack(RnIntersectionEdge, RnIntersectionEdge)
Declaration
public void RemoveTrack(RnIntersectionEdge from, RnIntersectionEdge to)
Parameters
RemoveTrack(RnTrack)
Declaration
public void RemoveTrack(RnTrack track)
Parameters
| Type |
Name |
Description |
| RnTrack |
track |
|
RemoveTracks(Predicate<RnTrack>)
Declaration
public void RemoveTracks(Predicate<RnTrack> predicate)
Parameters
| Type |
Name |
Description |
| Predicate<RnTrack> |
predicate |
|
ReplaceEdgeLink(RnWay, RnRoadBase)
borderを持つEdgeの隣接道路情報をafterRoadに差し替える.
戻り値は差し替えが行われた数
Declaration
public int ReplaceEdgeLink(RnWay border, RnRoadBase afterRoad)
Parameters
Returns
| Type |
Description |
| System.Int32 |
|
ReplaceEdges(List<RnIntersectionEdge>)
edgesを差し替え
afterEdgesは必ず連結している者とする
Declaration
public void ReplaceEdges(List<RnIntersectionEdge> afterEdges)
Parameters
ReplaceEdges(RnRoad, List<RnWay>, Boolean)
Declaration
public void ReplaceEdges(RnRoad road, List<RnWay> borders, bool reBuildTrack = true)
Parameters
| Type |
Name |
Description |
| RnRoad |
road |
|
| List<RnWay> |
borders |
|
| System.Boolean |
reBuildTrack |
|
ReplaceEdges(RnRoad, RnLaneBorderType, List<RnWay>, Boolean)
roadのborderTypeで指定した境界線を削除し, bordersを追加する
Declaration
public void ReplaceEdges(RnRoad road, RnLaneBorderType borderType, List<RnWay> borders, bool reBuildTrack = true)
Parameters
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
SeparateContinuousBorder()
必ず 境界線の間に輪郭線が来るように少し移動させて間に微小なEdgeを追加する
Declaration
public void SeparateContinuousBorder()
SetIsEmptyIntersection(Boolean)
Declaration
public void SetIsEmptyIntersection(bool val)
Parameters
| Type |
Name |
Description |
| System.Boolean |
val |
|
TryAddOrUpdateTrack(RnIntersectionEdge, RnIntersectionEdge)
トラック情報を追加/更新する.
同じfrom/toのトラックがすでにある場合は上書きする. そうでない場合は追加する
Declaration
public bool TryAddOrUpdateTrack(RnIntersectionEdge from, RnIntersectionEdge to)
Parameters
Returns
| Type |
Description |
| System.Boolean |
|
TryAddOrUpdateTrack(RnTrack)
トラック情報を追加/更新する.
同じfrom/toのトラックがすでにある場合は上書きする. そうでない場合は追加する
Declaration
public bool TryAddOrUpdateTrack(RnTrack track)
Parameters
| Type |
Name |
Description |
| RnTrack |
track |
|
Returns
| Type |
Description |
| System.Boolean |
|