Skip to content

Commit 3436647

Browse files
committed
Remove shadowing from scene groupe type
1 parent bb62aeb commit 3436647

File tree

4 files changed

+21
-21
lines changed

4 files changed

+21
-21
lines changed

Assets/Editor/MapzenMapEditor.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ public override void OnInspectorGUI()
5151
SavePreferences();
5252
}
5353

54-
private void SceneGroupToggle(MapzenMap mapzenMap, SceneGroup.Type type)
54+
private void SceneGroupToggle(MapzenMap mapzenMap, SceneGroup.GroupType type)
5555
{
5656
bool isSet = SceneGroup.Test(type, mapzenMap.GroupOptions);
5757
isSet = EditorGUILayout.Toggle(type.ToString(), isSet);
@@ -74,13 +74,13 @@ private void TileDataFoldout()
7474
EditorGUI.indentLevel++;
7575

7676
EditorGUILayout.BeginHorizontal();
77-
SceneGroupToggle(mapzenMap, SceneGroup.Type.Feature);
78-
SceneGroupToggle(mapzenMap, SceneGroup.Type.Filter);
77+
SceneGroupToggle(mapzenMap, SceneGroup.GroupType.Feature);
78+
SceneGroupToggle(mapzenMap, SceneGroup.GroupType.Filter);
7979
EditorGUILayout.EndHorizontal();
8080

8181
EditorGUILayout.BeginHorizontal();
82-
SceneGroupToggle(mapzenMap, SceneGroup.Type.Layer);
83-
SceneGroupToggle(mapzenMap, SceneGroup.Type.Tile);
82+
SceneGroupToggle(mapzenMap, SceneGroup.GroupType.Layer);
83+
SceneGroupToggle(mapzenMap, SceneGroup.GroupType.Tile);
8484
EditorGUILayout.EndHorizontal();
8585

8686
EditorGUI.indentLevel--;

Assets/Mapzen/SceneGroup.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ namespace Mapzen
77
public class SceneGroup
88
{
99
[Flags]
10-
public enum Type
10+
public enum GroupType
1111
{
1212
None = 0,
1313
Tile = 1 << 0,
@@ -24,9 +24,9 @@ public enum Type
2424
// The mesh data, may be empty
2525
public MeshData meshData;
2626

27-
public Type type;
27+
public GroupType type;
2828

29-
public SceneGroup(Type type, string name)
29+
public SceneGroup(GroupType type, string name)
3030
{
3131
this.childs = new Dictionary<string, SceneGroup>();
3232
this.type = type;
@@ -39,7 +39,7 @@ public SceneGroup(Type type, string name)
3939
/// </summary>
4040
/// <param name="type">The type to check.</param>
4141
/// <param name="options">The group type options.</param>
42-
public static bool Test(Type type, Type options)
42+
public static bool Test(GroupType type, GroupType options)
4343
{
4444
return ((int)type & (int)options) == (int)type;
4545
}
@@ -49,14 +49,14 @@ public static bool Test(Type type, Type options)
4949
/// </summary>
5050
/// <param name="type">The type to check.</param>
5151
/// <param name="options">The group type options.</param>
52-
public static bool IsLeaf(Type type, Type options)
52+
public static bool IsLeaf(GroupType type, GroupType options)
5353
{
5454
return ((int)type ^ (int)options) < (int)type;
5555
}
5656

5757
public override string ToString()
5858
{
59-
if (type == Type.None || type == Type.All)
59+
if (type == GroupType.None || type == GroupType.All)
6060
{
6161
return name;
6262
}

Assets/Mapzen/Unity/TileTask.cs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,11 @@ public class TileTask
1313
private TileAddress address;
1414
private byte[] response;
1515
private bool ready;
16-
private SceneGroup.Type groupOptions;
16+
private SceneGroup.GroupType groupOptions;
1717
private float inverseTileScale;
1818
private Matrix4x4 transform;
1919

20-
public TileTask(TileAddress address, SceneGroup.Type groupOptions, byte[] response, float offsetX, float offsetY, float regionScaleRatio)
20+
public TileTask(TileAddress address, SceneGroup.GroupType groupOptions, byte[] response, float offsetX, float offsetY, float regionScaleRatio)
2121
{
2222
this.address = address;
2323
this.response = response;
@@ -40,7 +40,7 @@ public void Start(List<FeatureStyle> featureStyling, SceneGroup root)
4040
// The leaf currently used (will hold the mesh data for the currently matched group)
4141
SceneGroup leaf = root;
4242

43-
var tileGroup = OnSceneGroupData(SceneGroup.Type.Tile, address.ToString(), root, ref leaf);
43+
var tileGroup = OnSceneGroupData(SceneGroup.GroupType.Tile, address.ToString(), root, ref leaf);
4444

4545
foreach (var style in featureStyling)
4646
{
@@ -51,11 +51,11 @@ public void Start(List<FeatureStyle> featureStyling, SceneGroup root)
5151

5252
foreach (var filterStyle in style.FilterStyles)
5353
{
54-
var filterGroup = OnSceneGroupData(SceneGroup.Type.Filter, filterStyle.Name, tileGroup, ref leaf);
54+
var filterGroup = OnSceneGroupData(SceneGroup.GroupType.Filter, filterStyle.Name, tileGroup, ref leaf);
5555

5656
foreach (var layer in tileData.FeatureCollections)
5757
{
58-
var layerGroup = OnSceneGroupData(SceneGroup.Type.Layer, layer.Name, filterGroup, ref leaf);
58+
var layerGroup = OnSceneGroupData(SceneGroup.GroupType.Layer, layer.Name, filterGroup, ref leaf);
5959

6060
foreach (var feature in filterStyle.GetFilter().Filter(layer))
6161
{
@@ -69,7 +69,7 @@ public void Start(List<FeatureStyle> featureStyling, SceneGroup root)
6969
featureName += identifier.ToString();
7070
}
7171

72-
OnSceneGroupData(SceneGroup.Type.Feature, featureName, layerGroup, ref leaf);
72+
OnSceneGroupData(SceneGroup.GroupType.Feature, featureName, layerGroup, ref leaf);
7373

7474
if (feature.Type == GeometryType.Polygon || feature.Type == GeometryType.MultiPolygon)
7575
{
@@ -100,7 +100,7 @@ public void Start(List<FeatureStyle> featureStyling, SceneGroup root)
100100
ready = true;
101101
}
102102

103-
private SceneGroup OnSceneGroupData(SceneGroup.Type type, string name, SceneGroup parent, ref SceneGroup leaf)
103+
private SceneGroup OnSceneGroupData(SceneGroup.GroupType type, string name, SceneGroup parent, ref SceneGroup leaf)
104104
{
105105
SceneGroup group = null;
106106

Assets/MapzenMap.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ public class MapzenMap : MonoBehaviour
3333

3434
[HideInInspector]
3535
[SerializeField]
36-
private SceneGroup.Type groupOptions;
36+
private SceneGroup.GroupType groupOptions;
3737

3838
[HideInInspector]
3939
[SerializeField]
@@ -52,7 +52,7 @@ public void DownloadTiles()
5252
tasks.Clear();
5353
nTasksForArea = 0;
5454

55-
regionMap = new SceneGroup(SceneGroup.Type.None, RegionName);
55+
regionMap = new SceneGroup(SceneGroup.GroupType.None, RegionName);
5656

5757
foreach (var tileAddress in bounds.TileAddressRange)
5858
{
@@ -142,7 +142,7 @@ public float RegionScaleRatio {
142142
set { regionScaleRatio = value; }
143143
}
144144

145-
public SceneGroup.Type GroupOptions
145+
public SceneGroup.GroupType GroupOptions
146146
{
147147
get { return groupOptions; }
148148
set { groupOptions = value; }

0 commit comments

Comments
 (0)