Skip to content

Commit

Permalink
version 0.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
moelang committed Mar 22, 2020
1 parent 469dd41 commit 74474ef
Show file tree
Hide file tree
Showing 186 changed files with 978 additions and 1,617 deletions.
2 changes: 1 addition & 1 deletion Editor/Autoware/ADASGoCurbEditor.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#region License
/******************************************************************************
* Copyright 2019 The AutoCore Authors. All Rights Reserved.
* Copyright 2018-2020 The AutoCore Authors. All Rights Reserved.
*
* Licensed under the GNU Lesser General Public License, Version 3.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
3 changes: 2 additions & 1 deletion Editor/Autoware/ADASGoLaneEditor.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#region License
/******************************************************************************
* Copyright 2019 The AutoCore Authors. All Rights Reserved.
* Copyright 2018-2020 The AutoCore Authors. All Rights Reserved.
*
* Licensed under the GNU Lesser General Public License, Version 3.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -37,6 +37,7 @@ protected override void OnEnable()
base.OnEnable();
bLane = serializedObject.FindProperty(GetMemberName((ADASGoLane t) => t.bLane));
fLane = serializedObject.FindProperty(GetMemberName((ADASGoLane t) => t.fLane));
Target.OnEditorEnable();
}

protected override void AfterDefaultInspectorDraw()
Expand Down
2 changes: 1 addition & 1 deletion Editor/Autoware/ADASGoLineEditor.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#region License
/******************************************************************************
* Copyright 2019 The AutoCore Authors. All Rights Reserved.
* Copyright 2018-2020 The AutoCore Authors. All Rights Reserved.
*
* Licensed under the GNU Lesser General Public License, Version 3.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion Editor/Autoware/ADASGoRoadEdgeEditor.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#region License
/******************************************************************************
* Copyright 2019 The AutoCore Authors. All Rights Reserved.
* Copyright 2018-2020 The AutoCore Authors. All Rights Reserved.
*
* Licensed under the GNU Lesser General Public License, Version 3.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
8 changes: 7 additions & 1 deletion Editor/Autoware/ADASGoSlicesLaneEditor.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#region License
/******************************************************************************
* Copyright 2019 The AutoCore Authors. All Rights Reserved.
* Copyright 2018-2020 The AutoCore Authors. All Rights Reserved.
*
* Licensed under the GNU Lesser General Public License, Version 3.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -36,6 +36,12 @@ protected override void OnEnable()
base.OnEnable();
bLane = serializedObject.FindProperty(GetMemberName((ADASGoSlicesLane t) => t.bLane));
fLane = serializedObject.FindProperty(GetMemberName((ADASGoSlicesLane t) => t.fLane));
(Target as ADASGoSlicesLane).OnEnableEditor();
}
protected override void BeforeDefaultInspectorDraw()
{
base.BeforeDefaultInspectorDraw();
DrawBFLane();
}
private void DrawBFLane()
{
Expand Down
2 changes: 1 addition & 1 deletion Editor/Autoware/ADASGoSlicesRoadEdgeEditor.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#region License
/******************************************************************************
* Copyright 2019 The AutoCore Authors. All Rights Reserved.
* Copyright 2018-2020 The AutoCore Authors. All Rights Reserved.
*
* Licensed under the GNU Lesser General Public License, Version 3.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion Editor/Autoware/ADASGoSlicesStopLineEditor.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#region License
/******************************************************************************
* Copyright 2019 The AutoCore Authors. All Rights Reserved.
* Copyright 2018-2020 The AutoCore Authors. All Rights Reserved.
*
* Licensed under the GNU Lesser General Public License, Version 3.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
7 changes: 6 additions & 1 deletion Editor/Autoware/ADASGoSlicesWhiteLineEditor.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#region License
/******************************************************************************
* Copyright 2019 The AutoCore Authors. All Rights Reserved.
* Copyright 2018-2020 The AutoCore Authors. All Rights Reserved.
*
* Licensed under the GNU Lesser General Public License, Version 3.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -25,6 +25,11 @@ namespace AutoCore.MapToolbox.Editor.Autoware
[CustomEditor(typeof(ADASGoSlicesWhiteLine))]
class ADASGoSlicesWhiteLineEditor : BrokenLineRendererEditor<ADASGoLine>
{
protected override void OnEnable()
{
base.OnEnable();
(Target as ADASGoSlicesWhiteLine).OnEnableEditor();
}
public override void OnInspectorGUI()
{
(target as ADASGoSlicesWhiteLine).UpdateRenderer();
Expand Down
12 changes: 10 additions & 2 deletions Editor/Autoware/ADASGoStopLineEditor.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#region License
/******************************************************************************
* Copyright 2019 The AutoCore Authors. All Rights Reserved.
* Copyright 2018-2020 The AutoCore Authors. All Rights Reserved.
*
* Licensed under the GNU Lesser General Public License, Version 3.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -19,10 +19,18 @@

using AutoCore.MapToolbox.Autoware;
using UnityEditor;
using UnityEngine;

namespace AutoCore.MapToolbox.Editor.Autoware
{
[CanEditMultipleObjects]
[CustomEditor(typeof(ADASGoStopLine))]
class ADASGoStopLineEditor : ADASGoLineEditor { }
class ADASGoStopLineEditor : ADASGoLineEditor
{
public override void OnInspectorGUI()
{
base.OnInspectorGUI();
ADASGoStopLine.ShowLinkedSignal = GUILayout.Toggle(ADASGoStopLine.ShowLinkedSignal, "Linked Signal");
}
}
}
2 changes: 1 addition & 1 deletion Editor/Autoware/ADASGoWhiteLineEditor.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#region License
/******************************************************************************
* Copyright 2019 The AutoCore Authors. All Rights Reserved.
* Copyright 2018-2020 The AutoCore Authors. All Rights Reserved.
*
* Licensed under the GNU Lesser General Public License, Version 3.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion Editor/Autoware/AutowareADASMapEditor.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#region License
/******************************************************************************
* Copyright 2019 The AutoCore Authors. All Rights Reserved.
* Copyright 2018-2020 The AutoCore Authors. All Rights Reserved.
*
* Licensed under the GNU Lesser General Public License, Version 3.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
7 changes: 6 additions & 1 deletion Editor/Autoware/CollectionADASGoLaneEditor.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#region License
/******************************************************************************
* Copyright 2019 The AutoCore Authors. All Rights Reserved.
* Copyright 2018-2020 The AutoCore Authors. All Rights Reserved.
*
* Licensed under the GNU Lesser General Public License, Version 3.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -34,6 +34,11 @@ public override void OnInspectorGUI()
{
(target as CollectionADASLane).AddLane(SceneView.lastActiveSceneView.pivot);
}
GUI.color = Color.white;
if (GUILayout.Button("Find Ref"))
{
(target as CollectionADASLane).FindRef();
}
}
}
}
2 changes: 1 addition & 1 deletion Editor/Autoware/CollectionADASGoRoadEdgeEditor.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#region License
/******************************************************************************
* Copyright 2019 The AutoCore Authors. All Rights Reserved.
* Copyright 2018-2020 The AutoCore Authors. All Rights Reserved.
*
* Licensed under the GNU Lesser General Public License, Version 3.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion Editor/Autoware/CollectionADASGoSignalEditor.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#region License
/******************************************************************************
* Copyright 2019 The AutoCore Authors. All Rights Reserved.
* Copyright 2018-2020 The AutoCore Authors. All Rights Reserved.
*
* Licensed under the GNU Lesser General Public License, Version 3.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion Editor/Autoware/CollectionADASGoStopLineEditor.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#region License
/******************************************************************************
* Copyright 2019 The AutoCore Authors. All Rights Reserved.
* Copyright 2018-2020 The AutoCore Authors. All Rights Reserved.
*
* Licensed under the GNU Lesser General Public License, Version 3.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion Editor/Autoware/CollectionADASGoWhiteLineEditor.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#region License
/******************************************************************************
* Copyright 2019 The AutoCore Authors. All Rights Reserved.
* Copyright 2018-2020 The AutoCore Authors. All Rights Reserved.
*
* Licensed under the GNU Lesser General Public License, Version 3.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion Editor/Autoware/Const.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#region License
/******************************************************************************
* Copyright 2019 The AutoCore Authors. All Rights Reserved.
* Copyright 2018-2020 The AutoCore Authors. All Rights Reserved.
*
* Licensed under the GNU Lesser General Public License, Version 3.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
22 changes: 17 additions & 5 deletions Editor/BrokenLineRendererEditor.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#region License
/******************************************************************************
* Copyright 2019 The AutoCore Authors. All Rights Reserved.
* Copyright 2018-2020 The AutoCore Authors. All Rights Reserved.
*
* Licensed under the GNU Lesser General Public License, Version 3.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -34,8 +34,8 @@ protected override void OnEnable()
protected override void BeforeDefaultInspectorDraw()
{
base.BeforeDefaultInspectorDraw();
Target.From = EditorGUILayout.Vector3Field(GetMemberName((BrokenLineRenderer<T> t) => t.From), Target.From);
Target.To = EditorGUILayout.Vector3Field(GetMemberName((BrokenLineRenderer<T> t) => t.To), Target.To);
Target.LocalFrom = EditorGUILayout.Vector3Field(GetMemberName((BrokenLineRenderer<T> t) => t.LocalFrom), Target.LocalFrom);
Target.LocalTo = EditorGUILayout.Vector3Field(GetMemberName((BrokenLineRenderer<T> t) => t.LocalTo), Target.LocalTo);
}
protected override void AfterDefaultInspectorDraw()
{
Expand All @@ -50,8 +50,20 @@ protected override void AfterDefaultInspectorDraw()
protected virtual void OnSceneGUI()
{
Tools.current = Tool.None;
Target.From = Handles.PositionHandle(Target.From, Quaternion.identity);
Target.To = Handles.PositionHandle(Target.To, Quaternion.identity);
var oldFrom = Target.From;
var oldTo = Target.To;
var newFrom = Handles.PositionHandle(oldFrom, Quaternion.identity);
var newTo = Handles.PositionHandle(oldTo, Quaternion.identity);
if (newFrom != oldFrom)
{
Target.From = newFrom;
Repaint();
}
else if (newTo != oldTo)
{
Target.To = newTo;
Repaint();
}
}
}
}
2 changes: 1 addition & 1 deletion Editor/Editor.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#region License
/******************************************************************************
* Copyright 2019 The AutoCore Authors. All Rights Reserved.
* Copyright 2018-2020 The AutoCore Authors. All Rights Reserved.
*
* Licensed under the GNU Lesser General Public License, Version 3.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
Loading

0 comments on commit 74474ef

Please sign in to comment.