Class RGraphEx
Inheritance
System.Object
RGraphEx
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 static class RGraphEx
Methods
AdjustSmallLodHeight(RGraph, Single, Int32, Single)
Lod1の外形の頂点を隣接するLOD2以上のポリゴンの頂点に高さを考慮してマージする
戻り値は削除された頂点
Declaration
public static HashSet<RVertex> AdjustSmallLodHeight(this RGraph self, float mergeCellSize, int mergeCellLength, float heightTolerance)
Parameters
| Type |
Name |
Description |
| RGraph |
self |
|
| System.Single |
mergeCellSize |
|
| System.Int32 |
mergeCellLength |
|
| System.Single |
heightTolerance |
|
Returns
ComputeConvexHullVertices(RFace)
Declaration
public static List<RVertex> ComputeConvexHullVertices(this RFace self)
Parameters
| Type |
Name |
Description |
| RFace |
self |
|
Returns
ComputeOutlineVertices(RFace)
Declaration
public static List<RVertex> ComputeOutlineVertices(this RFace self)
Parameters
| Type |
Name |
Description |
| RFace |
self |
|
Returns
ComputeOutlineVertices(RFaceGroup, Func<RFace, Boolean>)
faceGroupの中のpredicateで指定されたRFaceのアウトライン頂点を計算する
Declaration
public static List<RVertex> ComputeOutlineVertices(this RFaceGroup faceGroup, Func<RFace, bool> predicate)
Parameters
| Type |
Name |
Description |
| RFaceGroup |
faceGroup |
|
| Func<RFace, System.Boolean> |
predicate |
対象RFace
|
Returns
ComputeOutlineVerticesByCityObjectGroup(RGraph, PLATEAUCityObjectGroup, RRoadTypeMask, RRoadTypeMask)
CityObjectGroupに属する面のアウトライン頂点を計算する
Declaration
public static List<RVertex> ComputeOutlineVerticesByCityObjectGroup(this RGraph self, PLATEAUCityObjectGroup cityObjectGroup, RRoadTypeMask roadTypes, RRoadTypeMask removeRoadTypes)
Parameters
Returns
ConvertRnModelGraph(RGraph, RRoadTypeMask, Boolean)
Declaration
public static RGraph ConvertRnModelGraph(this RGraph self, RRoadTypeMask roadPackTypes, bool ignoreHighWay)
Parameters
Returns
Create(List<(SubDividedCityObject subObject, Matrix4x4 mat)>, Boolean)
Declaration
public static RGraph Create(List<(SubDividedCityObject subObject, Matrix4x4 mat)> cityObjects, bool useOutline)
Parameters
| Type |
Name |
Description |
| List<System.ValueTuple<SubDividedCityObject, Matrix4x4>> |
cityObjects |
|
| System.Boolean |
useOutline |
|
Returns
CreateOutlineBorderGroup<T>(List<RVertex>, Func<REdge, T>, IEqualityComparer<T>)
Declaration
public static List<RnEx.KeyEdgeGroup<T, REdge>> CreateOutlineBorderGroup<T>(List<RVertex> outlineVertices, Func<REdge, T> keySelector, IEqualityComparer<T> comparer = null)
Parameters
| Type |
Name |
Description |
| List<RVertex> |
outlineVertices |
|
| Func<REdge, T> |
keySelector |
|
| IEqualityComparer<T> |
comparer |
|
Returns
| Type |
Description |
| List<RnEx.KeyEdgeGroup<T, REdge>> |
|
Type Parameters
CreateSideWalk(RFace, out List<REdge>, out List<REdge>, out List<REdge>, out List<REdge>, HashSet<RnCityObjectGroupKey>)
Declaration
public static bool CreateSideWalk(this RFace self, out List<REdge> outsideEdges, out List<REdge> insideEdges, out List<REdge> startEdges, out List<REdge> endEdges, HashSet<RnCityObjectGroupKey> neighborCityObjectGroupsFilter = null)
Parameters
Returns
| Type |
Description |
| System.Boolean |
|
CreateSideWalk(RFaceGroup, out List<REdge>, out List<REdge>, out List<REdge>, out List<REdge>, HashSet<RnCityObjectGroupKey>)
Declaration
public static bool CreateSideWalk(this RFaceGroup self, out List<REdge> outsideEdges, out List<REdge> insideEdges, out List<REdge> startEdges, out List<REdge> endEdges, HashSet<RnCityObjectGroupKey> neighborCityObjectGroupsFilter = null)
Parameters
Returns
| Type |
Description |
| System.Boolean |
|
CreateVertexSet(RFace)
selfに所属する全頂点のHashSetを取得する
Declaration
public static HashSet<RVertex> CreateVertexSet(this RFace self)
Parameters
| Type |
Name |
Description |
| RFace |
self |
|
Returns
DeepCopy(RGraph)
Declaration
public static RGraph DeepCopy(this RGraph self)
Parameters
| Type |
Name |
Description |
| RGraph |
self |
|
Returns
EdgeReduction(RGraph)
辺のリダクション処理(同じ頂点を持つ辺をマージする)
Declaration
public static void EdgeReduction(this RGraph self)
Parameters
| Type |
Name |
Description |
| RGraph |
self |
|
FaceReduction(RGraph)
Declaration
public static int FaceReduction(this RGraph self)
Parameters
| Type |
Name |
Description |
| RGraph |
self |
|
Returns
| Type |
Description |
| System.Int32 |
|
GetAllFaceTypeMaskOrDefault(REdge)
Declaration
public static RRoadTypeMask GetAllFaceTypeMaskOrDefault(this REdge self)
Parameters
| Type |
Name |
Description |
| REdge |
self |
|
Returns
GetAllFaceTypeMaskOrDefault(RVertex)
Declaration
public static RRoadTypeMask GetAllFaceTypeMaskOrDefault(this RVertex self)
Parameters
Returns
GetAnyFaceTypeMaskOrDefault(REdge)
Declaration
public static RRoadTypeMask GetAnyFaceTypeMaskOrDefault(this REdge self)
Parameters
| Type |
Name |
Description |
| REdge |
self |
|
Returns
GetAnyFaceTypeMaskOrDefault(RVertex)
Declaration
public static RRoadTypeMask GetAnyFaceTypeMaskOrDefault(this RVertex self)
Parameters
Returns
GetTypeMaskOrDefault(REdge, Boolean)
辺のタイプマスクを取得する. anyOrAllがtrueの時は全ての面のタイプマスクを取得する
Declaration
public static RRoadTypeMask GetTypeMaskOrDefault(this REdge self, bool useAnyFaceType = false)
Parameters
| Type |
Name |
Description |
| REdge |
self |
|
| System.Boolean |
useAnyFaceType |
|
Returns
GetTypeMaskOrDefault(RVertex, Boolean)
頂点のタイプマスクを取得する. anyOrAllがtrueの時は全ての面のタイプマスクを取得する
Declaration
public static RRoadTypeMask GetTypeMaskOrDefault(this RVertex self, bool useAnyFaceType = false)
Parameters
| Type |
Name |
Description |
| RVertex |
self |
|
| System.Boolean |
useAnyFaceType |
|
Returns
GroupBy(RGraph, Func<RFace, RFace, Boolean>)
同じPLATEAUCityObjectGroupのFaceをpredicateのルールに従って一つのRFaceGroupにする.
Declaration
public static List<RFaceGroup> GroupBy(this RGraph self, Func<RFace, RFace, bool> isMatch)
Parameters
Returns
InsertVertexInNearEdge(RGraph, Single)
各頂点と辺の当たり判定チェック. 距離誤差許容量はtolerance
Declaration
public static void InsertVertexInNearEdge(this RGraph self, float tolerance)
Parameters
| Type |
Name |
Description |
| RGraph |
self |
|
| System.Single |
tolerance |
|
InsertVertices(REdge, IEnumerable<RVertex>)
辺の間にverticesを追加して分割する. verticesはself.V0 ~ V1の間にある前提
Declaration
public static List<REdge> InsertVertices(this REdge self, IEnumerable<RVertex> vertices)
Parameters
| Type |
Name |
Description |
| REdge |
self |
|
| IEnumerable<RVertex> |
vertices |
|
Returns
| Type |
Description |
| List<REdge> |
|
InsertVerticesInEdgeIntersection(RGraph, Single)
Declaration
public static void InsertVerticesInEdgeIntersection(this RGraph self, float heightTolerance)
Parameters
| Type |
Name |
Description |
| RGraph |
self |
|
| System.Single |
heightTolerance |
交点が高さ方向にずれていた時の許容量
|
IsEqual(RGraph, RGraph)
Declaration
public static bool IsEqual(RGraph a, RGraph b)
Parameters
Returns
| Type |
Description |
| System.Boolean |
|
IsShareEdge(RFace, RFace)
Declaration
public static bool IsShareEdge(RFace a, RFace b)
Parameters
Returns
| Type |
Description |
| System.Boolean |
|
ModifySideWalkShape(RFace)
Outsideの無い歩道に対して微小な辺を追加する
Declaration
public static void ModifySideWalkShape(RFace swFace)
Parameters
| Type |
Name |
Description |
| RFace |
swFace |
|
ModifySideWalkShape(RGraph)
Declaration
public static void ModifySideWalkShape(this RGraph self)
Parameters
| Type |
Name |
Description |
| RGraph |
self |
|
Optimize(RGraph, Single, Int32, Single, Single)
Declaration
public static void Optimize(this RGraph self, float mergeCellSize, int mergeCellLength, float midPointTolerance, float lod1HeightTolerance)
Parameters
| Type |
Name |
Description |
| RGraph |
self |
|
| System.Single |
mergeCellSize |
|
| System.Int32 |
mergeCellLength |
|
| System.Single |
midPointTolerance |
|
| System.Single |
lod1HeightTolerance |
|
OutlineVertex2Edge(IReadOnlyList<RVertex>, out List<REdge>, Boolean)
アウトライン頂点のリストを同じアウトラインを構成する辺のリストに変換する
Declaration
public static bool OutlineVertex2Edge(IReadOnlyList<RVertex> vertices, out List<REdge> outlineEdges, bool keepEdgeOnFail = false)
Parameters
| Type |
Name |
Description |
| IReadOnlyList<RVertex> |
vertices |
|
| List<REdge> |
outlineEdges |
|
| System.Boolean |
keepEdgeOnFail |
辺リストが作れない時にその場で打ち切るのではなくnullを入れて続きを行う
|
Returns
| Type |
Description |
| System.Boolean |
|
RemoveInnerVertex(RFace)
Declaration
public static void RemoveInnerVertex(this RFace self)
Parameters
| Type |
Name |
Description |
| RFace |
self |
|
RemoveInnerVertex(RGraph)
Declaration
public static void RemoveInnerVertex(this RGraph self)
Parameters
| Type |
Name |
Description |
| RGraph |
self |
|
RemoveIsolatedEdge(RFace)
o-o
| |
o-o---o ←の様な飛び出た辺をFaceから削除する.
戻り値は削除された辺の数
Declaration
public static HashSet<REdge> RemoveIsolatedEdge(this RFace self)
Parameters
| Type |
Name |
Description |
| RFace |
self |
|
Returns
| Type |
Description |
| HashSet<REdge> |
|
RemoveIsolatedEdgeFromFace(RGraph)
各Faceに対して以下のような飛び出た辺をFaceから取り除く
o-o
| |
o-o---o ←の様な飛び出た頂点を削除する
Declaration
public static void RemoveIsolatedEdgeFromFace(this RGraph self)
Parameters
| Type |
Name |
Description |
| RGraph |
self |
|
SegmentEdge2Vertex(IReadOnlyList<REdge>, out List<RVertex>, out Boolean)
Declaration
public static bool SegmentEdge2Vertex(IReadOnlyList<REdge> edges, out List<RVertex> outlineVertices, out bool isLoop)
Parameters
| Type |
Name |
Description |
| IReadOnlyList<REdge> |
edges |
|
| List<RVertex> |
outlineVertices |
|
| System.Boolean |
isLoop |
edgesが閉路かどうか
|
Returns
| Type |
Description |
| System.Boolean |
|
Separate(RFace)
Declaration
public static void Separate(this RFace self)
Parameters
| Type |
Name |
Description |
| RFace |
self |
|
SeparateFaces(RGraph)
Declaration
public static void SeparateFaces(this RGraph self)
Parameters
| Type |
Name |
Description |
| RGraph |
self |
|
TryGroupBySideWalkEdge(RFace, out List<RnEx.KeyEdgeGroup<RGraphEx.SideWalkEdgeKey, REdge>>, HashSet<RnCityObjectGroupKey>)
Declaration
public static bool TryGroupBySideWalkEdge(RFace self, out List<RnEx.KeyEdgeGroup<RGraphEx.SideWalkEdgeKey, REdge>> edgeGroups, HashSet<RnCityObjectGroupKey> neighborCityObjectGroupsFilter = null)
Parameters
Returns
| Type |
Description |
| System.Boolean |
|
TryGroupBySideWalkEdge(RFaceGroup, out List<RnEx.KeyEdgeGroup<RGraphEx.SideWalkEdgeKey, REdge>>, HashSet<RnCityObjectGroupKey>)
selfの輪郭線を歩道の内側, 外側, 境界線に分類する.
NeighborCityObjectGroupsFilterが設定されている場合, 歩道の境界判定対象はこのリストに含まれるPLATEAUCityObjectGroupと繋がっているものに限定される.
Declaration
public static bool TryGroupBySideWalkEdge(RFaceGroup faceGroup, out List<RnEx.KeyEdgeGroup<RGraphEx.SideWalkEdgeKey, REdge>> edgeGroups, HashSet<RnCityObjectGroupKey> neighborCityObjectGroupsFilter = null)
Parameters
Returns
| Type |
Description |
| System.Boolean |
|
VertexReduction(RGraph, Single, Int32, Single)
Declaration
public static void VertexReduction(this RGraph self, float mergeCellSize, int mergeCellLength, float midPointTolerance)
Parameters
| Type |
Name |
Description |
| RGraph |
self |
|
| System.Single |
mergeCellSize |
|
| System.Int32 |
mergeCellLength |
|
| System.Single |
midPointTolerance |
aとcとしか接続していない点bに対して、a-cの直線との距離がこれ以下だとbをマージする
|