forked from Synesthesias/PLATEAU-SDK-for-Unity
-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
# Conflicts: # Plugins/Android/libplateau.so # Plugins/Linux/x86_64/libplateau.so # Plugins/MacOS/arm64/libOpenMeshCore.8.0.dylib # Plugins/MacOS/arm64/libOpenMeshCore.dylib # Plugins/MacOS/arm64/libOpenMeshTools.8.0.dylib # Plugins/MacOS/arm64/libOpenMeshTools.dylib # Plugins/MacOS/arm64/libplateau.dylib # Plugins/MacOS/arm64/libz.1.2.13.dylib # Plugins/MacOS/arm64/libz.1.dylib # Plugins/MacOS/arm64/libz.dylib # Plugins/MacOS/x86_64/libOpenMeshCore.8.0.dylib # Plugins/MacOS/x86_64/libOpenMeshCore.dylib # Plugins/MacOS/x86_64/libOpenMeshTools.8.0.dylib # Plugins/MacOS/x86_64/libOpenMeshTools.dylib # Plugins/MacOS/x86_64/libplateau.dylib # Plugins/MacOS/x86_64/libz.1.2.13.dylib # Plugins/MacOS/x86_64/libz.1.dylib # Plugins/MacOS/x86_64/libz.dylib # Plugins/Windows/x86_64/plateau.dll # Plugins/iOS/plateau.framework/plateau # README.md # Runtime/CityAdjust/NonLibData/ContourMeshesMaker.cs # Runtime/CityAdjust/NonLibData/InstancedCityModelDict.cs # package.json
- Loading branch information
Showing
495 changed files
with
30,401 additions
and
7,912 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
61 changes: 61 additions & 0 deletions
61
Editor/RoadNetwork/CityObject/PLATEAUSubDividedCityObjectGroupEditor.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
using PLATEAU.RoadNetwork.CityObject; | ||
using PLATEAU.RoadNetwork.CityObject.Drawer; | ||
using PLATEAU.RoadNetwork.Util; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using UnityEditor; | ||
using UnityEngine; | ||
|
||
namespace PLATEAU.Editor.RoadNetwork.CityObject | ||
{ | ||
[CustomEditor(typeof(PLATEAUSubDividedCityObjectGroup))] | ||
public class PLATEAUSubDividedCityObjectGroupEditor : UnityEditor.Editor | ||
{ | ||
private class SubDividedCityObjectInstanceHelper : SubDividedCityObjectDebugEditorWindow.IInstanceHelper | ||
{ | ||
private PLATEAUSubDividedCityObjectGroup target; | ||
|
||
public SubDividedCityObjectInstanceHelper(PLATEAUSubDividedCityObjectGroup target) | ||
{ | ||
this.target = target; | ||
} | ||
|
||
public PLATEAUSubDividedCityObjectGroup GetCityObjects() | ||
{ | ||
return target; | ||
} | ||
|
||
public bool IsTarget(SubDividedCityObject cityObject) | ||
{ | ||
return RnEx.IsEditorSceneSelected(cityObject.CityObjectGroup); | ||
} | ||
|
||
private PLATEAUSubDividedCityObjectDrawerDebug DebugDrawer => | ||
target.GetComponent<PLATEAUSubDividedCityObjectDrawerDebug>(); | ||
|
||
public HashSet<SubDividedCityObject> TargetCityObjects | ||
{ | ||
get | ||
{ | ||
if (DebugDrawer) | ||
return DebugDrawer.TargetCityObjects; | ||
return new HashSet<SubDividedCityObject>(); | ||
} | ||
} | ||
} | ||
|
||
public override void OnInspectorGUI() | ||
{ | ||
var obj = target as PLATEAUSubDividedCityObjectGroup; | ||
if (!obj) | ||
return; | ||
|
||
base.OnInspectorGUI(); | ||
|
||
GUILayout.Label($"ConvertedCityObjectVertexCount : {obj.CityObjects?.Sum(c => c.Meshes.Sum(m => m.Vertices.Count)) ?? 0}"); | ||
|
||
if (GUILayout.Button("Open Editor")) | ||
SubDividedCityObjectDebugEditorWindow.OpenWindow(new SubDividedCityObjectInstanceHelper(obj), true); | ||
} | ||
} | ||
} |
2 changes: 1 addition & 1 deletion
2
...twork/RoadNetworkLineStringDrawer.cs.meta → ...AUSubDividedCityObjectGroupEditor.cs.meta
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
112 changes: 112 additions & 0 deletions
112
Editor/RoadNetwork/CityObject/SubDividedCityObjectDebugEditorWindow.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,112 @@ | ||
using PLATEAU.RoadNetwork.CityObject; | ||
using PLATEAU.RoadNetwork.Graph; | ||
using PLATEAU.RoadNetwork.Util; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using UnityEditor; | ||
|
||
namespace PLATEAU.Editor.RoadNetwork.CityObject | ||
{ | ||
public class SubDividedCityObjectDebugEditorWindow : EditorWindow | ||
{ | ||
public interface IInstanceHelper | ||
{ | ||
// グラフ取得 | ||
PLATEAUSubDividedCityObjectGroup GetCityObjects(); | ||
|
||
bool IsTarget(SubDividedCityObject cityObject); | ||
|
||
HashSet<SubDividedCityObject> TargetCityObjects { get; } | ||
|
||
// モデル作成する | ||
// void CreateRnModel(); | ||
|
||
//void CreateTranMesh(); | ||
} | ||
|
||
private const string WindowName = "SubDividedCityObject Editor"; | ||
|
||
public IInstanceHelper InstanceHelper { get; set; } | ||
|
||
public void EditSubDividedCityObject(SubDividedCityObject e) | ||
{ | ||
if (e == null) | ||
return; | ||
RnEditorUtil.TargetToggle($"{e.Name}", InstanceHelper.TargetCityObjects, e); | ||
using (new EditorGUI.IndentLevelScope()) | ||
{ | ||
EditorGUILayout.EnumFlagsField("SelfRoadType", e.SelfRoadType); | ||
EditorGUILayout.EnumFlagsField("ParentRoadType", e.ParentRoadType); | ||
foreach (var root in e.CityObjects.rootCityObjects) | ||
{ | ||
RnEditorUtil.Separator(); | ||
EditorGUILayout.LabelField(root.GmlID); | ||
EditorGUILayout.EnumFlagsField("Type", root.GetRoadType()); | ||
} | ||
} | ||
|
||
RnEditorUtil.Separator(); | ||
EditorGUILayout.LabelField("Children"); | ||
using (new EditorGUI.IndentLevelScope()) | ||
{ | ||
foreach (var child in e.Children) | ||
{ | ||
RnEditorUtil.Separator(); | ||
using (new EditorGUI.IndentLevelScope()) | ||
{ | ||
EditSubDividedCityObject(child); | ||
} | ||
} | ||
} | ||
|
||
} | ||
|
||
/// <Summary> | ||
/// ウィンドウのパーツを表示します。 | ||
/// </Summary> | ||
private void OnGUI() | ||
{ | ||
if (InstanceHelper == null) | ||
return; | ||
|
||
var cityObjects = InstanceHelper.GetCityObjects(); | ||
if (!cityObjects || !(cityObjects.CityObjects?.Any() ?? false)) | ||
{ | ||
return; | ||
} | ||
|
||
|
||
RnEditorUtil.Separator(); | ||
|
||
using (new EditorGUI.DisabledScope(true)) | ||
{ | ||
EditorGUILayout.IntField("CityObjects", cityObjects.CityObjects.Count); | ||
} | ||
|
||
RnEditorUtil.Separator(); | ||
foreach (var cog in cityObjects.CityObjects) | ||
{ | ||
if (InstanceHelper.IsTarget(cog) || InstanceHelper.TargetCityObjects.Contains(cog)) | ||
{ | ||
RnEditorUtil.Separator(); | ||
EditSubDividedCityObject(cog); | ||
} | ||
} | ||
} | ||
|
||
|
||
/// <summary> | ||
/// ウィンドウを取得する、存在しない場合に生成する | ||
/// </summary> | ||
/// <param name="instance"></param> | ||
/// <param name="focus"></param> | ||
/// <returns></returns> | ||
public static SubDividedCityObjectDebugEditorWindow OpenWindow(IInstanceHelper instance, bool focus) | ||
{ | ||
var ret = GetWindow<SubDividedCityObjectDebugEditorWindow>(WindowName, focus); | ||
ret.InstanceHelper = instance; | ||
return ret; | ||
} | ||
|
||
} | ||
} |
2 changes: 1 addition & 1 deletion
2
...oadNetwork/RoadNetworkBlockDrawer.cs.meta → ...ividedCityObjectDebugEditorWindow.cs.meta
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
2 changes: 1 addition & 1 deletion
2
.../MATestModel/BldgAreaFromArea_MAType.meta → Editor/RoadNetwork/EditingSystemSubMod.meta
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.