Search Results for

    Show / Hide Table of Contents

    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()
    Namespace: PLATEAU.RoadNetwork.Graph
    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
    Type Description
    HashSet<RVertex>

    ComputeConvexHullVertices(RFace)

    xz平明上での凸包頂点を計算する

    Declaration
    public static List<RVertex> ComputeConvexHullVertices(this RFace self)
    Parameters
    Type Name Description
    RFace self
    Returns
    Type Description
    List<RVertex>

    ComputeOutlineVertices(RFace)

    アウトライン頂点を計算する

    Declaration
    public static List<RVertex> ComputeOutlineVertices(this RFace self)
    Parameters
    Type Name Description
    RFace self
    Returns
    Type Description
    List<RVertex>

    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
    Type Description
    List<RVertex>

    ComputeOutlineVerticesByCityObjectGroup(RGraph, PLATEAUCityObjectGroup, RRoadTypeMask, RRoadTypeMask)

    CityObjectGroupに属する面のアウトライン頂点を計算する

    Declaration
    public static List<RVertex> ComputeOutlineVerticesByCityObjectGroup(this RGraph self, PLATEAUCityObjectGroup cityObjectGroup, RRoadTypeMask roadTypes, RRoadTypeMask removeRoadTypes)
    Parameters
    Type Name Description
    RGraph self
    PLATEAUCityObjectGroup cityObjectGroup
    RRoadTypeMask roadTypes
    RRoadTypeMask removeRoadTypes
    Returns
    Type Description
    List<RVertex>

    ConvertRnModelGraph(RGraph, RRoadTypeMask, Boolean)

    Declaration
    public static RGraph ConvertRnModelGraph(this RGraph self, RRoadTypeMask roadPackTypes, bool ignoreHighWay)
    Parameters
    Type Name Description
    RGraph self
    RRoadTypeMask roadPackTypes
    System.Boolean ignoreHighWay
    Returns
    Type Description
    RGraph

    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
    Type Description
    RGraph

    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
    Name Description
    T

    CreateSideWalk(RFace, out List<REdge>, out List<REdge>, out List<REdge>, out List<REdge>, HashSet<RnCityObjectGroupKey>)

    歩道を構築するREdgeを取得する.

    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
    Type Name Description
    RFace self
    List<REdge> outsideEdges
    List<REdge> insideEdges
    List<REdge> startEdges
    List<REdge> endEdges
    HashSet<RnCityObjectGroupKey> neighborCityObjectGroupsFilter
    Returns
    Type Description
    System.Boolean

    CreateSideWalk(RFaceGroup, out List<REdge>, out List<REdge>, out List<REdge>, out List<REdge>, HashSet<RnCityObjectGroupKey>)

    歩道を構築するREdgeを取得する.

    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
    Type Name Description
    RFaceGroup self
    List<REdge> outsideEdges
    List<REdge> insideEdges
    List<REdge> startEdges
    List<REdge> endEdges
    HashSet<RnCityObjectGroupKey> neighborCityObjectGroupsFilter
    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
    Type Description
    HashSet<RVertex>

    DeepCopy(RGraph)

    selfのコピーを作成

    Declaration
    public static RGraph DeepCopy(this RGraph self)
    Parameters
    Type Name Description
    RGraph self
    Returns
    Type Description
    RGraph

    EdgeReduction(RGraph)

    辺のリダクション処理(同じ頂点を持つ辺をマージする)

    Declaration
    public static void EdgeReduction(this RGraph self)
    Parameters
    Type Name Description
    RGraph self

    FaceReduction(RGraph)

    同じFaceは統合する

    Declaration
    public static int FaceReduction(this RGraph self)
    Parameters
    Type Name Description
    RGraph self
    Returns
    Type Description
    System.Int32

    GetAllFaceTypeMaskOrDefault(REdge)

    辺を参照する面のタイプマスクをandで取得

    Declaration
    public static RRoadTypeMask GetAllFaceTypeMaskOrDefault(this REdge self)
    Parameters
    Type Name Description
    REdge self
    Returns
    Type Description
    RRoadTypeMask

    GetAllFaceTypeMaskOrDefault(RVertex)

    頂点を参照する面のタイプマスクをandで取得

    Declaration
    public static RRoadTypeMask GetAllFaceTypeMaskOrDefault(this RVertex self)
    Parameters
    Type Name Description
    RVertex self
    Returns
    Type Description
    RRoadTypeMask

    GetAnyFaceTypeMaskOrDefault(REdge)

    辺を参照する面のタイプマスクをorで取得

    Declaration
    public static RRoadTypeMask GetAnyFaceTypeMaskOrDefault(this REdge self)
    Parameters
    Type Name Description
    REdge self
    Returns
    Type Description
    RRoadTypeMask

    GetAnyFaceTypeMaskOrDefault(RVertex)

    頂点を参照する面のタイプマスクをorで取得

    Declaration
    public static RRoadTypeMask GetAnyFaceTypeMaskOrDefault(this RVertex self)
    Parameters
    Type Name Description
    RVertex self
    Returns
    Type Description
    RRoadTypeMask

    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
    Type Description
    RRoadTypeMask

    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
    Type Description
    RRoadTypeMask

    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
    Type Name Description
    RGraph self
    Func<RFace, RFace, System.Boolean> isMatch
    Returns
    Type Description
    List<RFaceGroup>

    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)

    a/bが同じ頂点/辺/面を持つグラフか判定する

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

    IsShareEdge(RFace, RFace)

    aとbの間に共通の辺があるかどうか

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

    ModifySideWalkShape(RFace)

    Outsideの無い歩道に対して微小な辺を追加する

    Declaration
    public static void ModifySideWalkShape(RFace swFace)
    Parameters
    Type Name Description
    RFace swFace

    ModifySideWalkShape(RGraph)

    歩道部分のうちOutSideWalk

    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)

    selfの非連結な部分を分離する

    Declaration
    public static void Separate(this RFace self)
    Parameters
    Type Name Description
    RFace self

    SeparateFaces(RGraph)

    Face内で非連結な部分を分離する

    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
    Type Name Description
    RFace self
    List<RnEx.KeyEdgeGroup<RGraphEx.SideWalkEdgeKey, REdge>> edgeGroups
    HashSet<RnCityObjectGroupKey> neighborCityObjectGroupsFilter
    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
    Type Name Description
    RFaceGroup faceGroup
    List<RnEx.KeyEdgeGroup<RGraphEx.SideWalkEdgeKey, REdge>> edgeGroups
    HashSet<RnCityObjectGroupKey> neighborCityObjectGroupsFilter
    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をマージする

    In This Article
    Back to top PLATEAU SDK for Unity