Skip to content
This repository has been archived by the owner on Aug 11, 2024. It is now read-only.

Refactor of boundary system #624

Merged
merged 23 commits into from
Jun 12, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
32a0c1e
initial refactor of boundary system
StephenHodgson Jun 2, 2020
b4b3b43
sorted some properties
StephenHodgson Jun 2, 2020
a431681
updated examples checkout
StephenHodgson Jun 2, 2020
f1ae1f3
Merge branch 'development' into feature/boundary-system-data-providers
StephenHodgson Jun 2, 2020
243b106
changed wmr checkout back to development
StephenHodgson Jun 2, 2020
7c8dc44
Merge branch 'development' into feature/boundary-system-data-providers
StephenHodgson Jun 2, 2020
d534544
updated examples
StephenHodgson Jun 2, 2020
b1b25b7
Merge branch 'development' into feature/boundary-system-data-providers
StephenHodgson Jun 2, 2020
ec88502
fixed examples checkout
StephenHodgson Jun 2, 2020
71a935c
Merge branch 'development' into feature/boundary-system-data-providers
StephenHodgson Jun 2, 2020
197e42f
test wmr build
StephenHodgson Jun 4, 2020
7e64f9a
revert
StephenHodgson Jun 4, 2020
26f36fe
Added warning when geometry fails to be generated
StephenHodgson Jun 4, 2020
478f99d
Merge branch 'development' into feature/boundary-system-data-providers
StephenHodgson Jun 8, 2020
41a84db
Merge branch 'development' into feature/boundary-system-data-providers
StephenHodgson Jun 8, 2020
6d2bac0
Merge branch 'development' into feature/boundary-system-data-providers
StephenHodgson Jun 8, 2020
9edbc5f
Merge branch 'development' into feature/boundary-system-data-providers
StephenHodgson Jun 10, 2020
0057695
try setting the timeout to 2 hours
StephenHodgson Jun 10, 2020
30dbb55
updated wmr checkout with functional boundary data provider
StephenHodgson Jun 11, 2020
778725c
updated boundary tracked object logic
StephenHodgson Jun 11, 2020
b85b6af
fix wait for log to be created
StephenHodgson Jun 11, 2020
7f23a30
updated examples checkout
StephenHodgson Jun 12, 2020
7f7fea9
Merge branch 'development' into feature/boundary-system-data-providers
StephenHodgson Jun 12, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Submodules/WindowsMixedReality
Original file line number Diff line number Diff line change
Expand Up @@ -9,66 +9,46 @@
namespace XRTK.Editor.Profiles
{
[CustomEditor(typeof(MixedRealityBoundaryVisualizationProfile))]
public class MixedRealityBoundaryVisualizationProfileInspector : BaseMixedRealityProfileInspector
public class MixedRealityBoundaryVisualizationProfileInspector : MixedRealityServiceProfileInspector
{
private SerializedProperty showBoundary;
private SerializedProperty boundaryHeight;
private SerializedProperty physicsLayer;
private SerializedProperty boundaryMaterial;

private SerializedProperty showFloor;
private SerializedProperty floorMaterial;
private SerializedProperty floorScale;
private SerializedProperty floorPhysicsLayer;

private SerializedProperty showPlayArea;
private SerializedProperty playAreaMaterial;
private SerializedProperty playAreaPhysicsLayer;

private SerializedProperty showTrackedArea;
private SerializedProperty trackedAreaMaterial;
private SerializedProperty trackedAreaPhysicsLayer;
private SerializedProperty showWalls;
private SerializedProperty wallMaterial;

private SerializedProperty showBoundaryWalls;
private SerializedProperty boundaryWallMaterial;
private SerializedProperty boundaryWallsPhysicsLayer;
private SerializedProperty showCeiling;
private SerializedProperty ceilingMaterial;

private SerializedProperty showBoundaryCeiling;
private SerializedProperty boundaryCeilingMaterial;
private SerializedProperty ceilingPhysicsLayer;

private readonly GUIContent showContent = new GUIContent("Show");
private readonly GUIContent scaleContent = new GUIContent("Scale");
private readonly GUIContent materialContent = new GUIContent("Material");
private readonly GUIContent generalSettingsFoldoutHeader = new GUIContent("General Settings");
private readonly GUIContent floorSettingsFoldoutHeader = new GUIContent("Floor Settings");
private readonly GUIContent playAreaSettingsFoldoutHeader = new GUIContent("Play Area Settings");
private readonly GUIContent trackedAreaSettingsFoldoutHeader = new GUIContent("Tracked Area Settings");
private readonly GUIContent boundaryWallSettingsFoldoutHeader = new GUIContent("Boundary Wall Settings");
private readonly GUIContent boundaryCeilingSettingsFoldoutHeader = new GUIContent("Boundary Ceiling Settings");
private readonly GUIContent wallSettingsFoldoutHeader = new GUIContent("Wall Settings");
private readonly GUIContent ceilingSettingsFoldoutHeader = new GUIContent("Ceiling Settings");
private readonly GUIContent materialContent = new GUIContent("Material Override", "Use a different material than the global boundary material?");
private readonly GUIContent showContent = new GUIContent("Force Show", "Force the boundary component to be displayed.\n\nNote: This can be toggled on/off at runtime.");

protected override void OnEnable()
{
base.OnEnable();

showBoundary = serializedObject.FindProperty(nameof(showBoundary));
boundaryHeight = serializedObject.FindProperty(nameof(boundaryHeight));
boundaryMaterial = serializedObject.FindProperty(nameof(boundaryMaterial));
physicsLayer = serializedObject.FindProperty(nameof(physicsLayer));

showFloor = serializedObject.FindProperty(nameof(showFloor));
floorMaterial = serializedObject.FindProperty(nameof(floorMaterial));
floorScale = serializedObject.FindProperty(nameof(floorScale));
floorPhysicsLayer = serializedObject.FindProperty(nameof(floorPhysicsLayer));

showPlayArea = serializedObject.FindProperty(nameof(showPlayArea));
playAreaMaterial = serializedObject.FindProperty(nameof(playAreaMaterial));
playAreaPhysicsLayer = serializedObject.FindProperty(nameof(playAreaPhysicsLayer));

showTrackedArea = serializedObject.FindProperty(nameof(showTrackedArea));
trackedAreaMaterial = serializedObject.FindProperty(nameof(trackedAreaMaterial));
trackedAreaPhysicsLayer = serializedObject.FindProperty(nameof(trackedAreaPhysicsLayer));
showWalls = serializedObject.FindProperty(nameof(showWalls));
wallMaterial = serializedObject.FindProperty(nameof(wallMaterial));

showBoundaryWalls = serializedObject.FindProperty(nameof(showBoundaryWalls));
boundaryWallMaterial = serializedObject.FindProperty(nameof(boundaryWallMaterial));
boundaryWallsPhysicsLayer = serializedObject.FindProperty(nameof(boundaryWallsPhysicsLayer));

showBoundaryCeiling = serializedObject.FindProperty(nameof(showBoundaryCeiling));
boundaryCeilingMaterial = serializedObject.FindProperty(nameof(boundaryCeilingMaterial));
ceilingPhysicsLayer = serializedObject.FindProperty(nameof(ceilingPhysicsLayer));
showCeiling = serializedObject.FindProperty(nameof(showCeiling));
ceilingMaterial = serializedObject.FindProperty(nameof(ceilingMaterial));
}

public override void OnInspectorGUI()
Expand All @@ -77,65 +57,50 @@ public override void OnInspectorGUI()

serializedObject.Update();

boundaryHeight.FoldoutWithBoldLabelPropertyField(generalSettingsFoldoutHeader);

EditorGUILayout.Space();

if (showFloor.FoldoutWithBoldLabelPropertyField(floorSettingsFoldoutHeader, showContent))
if (showBoundary.FoldoutWithBoldLabelPropertyField(generalSettingsFoldoutHeader, showContent))
{
EditorGUI.indentLevel++;
EditorGUILayout.PropertyField(floorMaterial, materialContent);
var prevWideMode = EditorGUIUtility.wideMode;
EditorGUIUtility.wideMode = true;
EditorGUILayout.PropertyField(floorScale, scaleContent, GUILayout.ExpandWidth(true));
EditorGUIUtility.wideMode = prevWideMode;
EditorGUILayout.PropertyField(floorPhysicsLayer);
EditorGUI.indentLevel--;
}
EditorGUILayout.PropertyField(boundaryHeight);
EditorGUILayout.PropertyField(boundaryMaterial, materialContent);
EditorGUILayout.PropertyField(physicsLayer);

EditorGUILayout.Space();
EditorGUILayout.Space();

if (showPlayArea.FoldoutWithBoldLabelPropertyField(playAreaSettingsFoldoutHeader, showContent))
{
EditorGUI.indentLevel++;
EditorGUILayout.PropertyField(playAreaMaterial, materialContent);
EditorGUILayout.PropertyField(playAreaPhysicsLayer);
EditorGUI.indentLevel--;
}
if (showFloor.FoldoutWithBoldLabelPropertyField(floorSettingsFoldoutHeader, showContent))
{
EditorGUI.indentLevel++;
EditorGUILayout.PropertyField(floorMaterial, materialContent);
EditorGUI.indentLevel--;
}

EditorGUILayout.Space();
EditorGUILayout.Space();

if (showTrackedArea.FoldoutWithBoldLabelPropertyField(trackedAreaSettingsFoldoutHeader, showContent))
{
EditorGUI.indentLevel++;
EditorGUILayout.PropertyField(trackedAreaMaterial, materialContent);
EditorGUILayout.PropertyField(trackedAreaPhysicsLayer);
EditorGUI.indentLevel--;
}
EditorGUILayout.Space();

EditorGUILayout.Space();
if (showWalls.FoldoutWithBoldLabelPropertyField(wallSettingsFoldoutHeader, showContent))
{
EditorGUI.indentLevel++;
EditorGUILayout.PropertyField(wallMaterial, materialContent);
EditorGUI.indentLevel--;
}

if (showBoundaryWalls.FoldoutWithBoldLabelPropertyField(boundaryWallSettingsFoldoutHeader, showContent))
{
EditorGUI.indentLevel++;
EditorGUILayout.PropertyField(boundaryWallMaterial, materialContent);
EditorGUILayout.PropertyField(boundaryWallsPhysicsLayer);
EditorGUI.indentLevel--;
}
EditorGUILayout.Space();

EditorGUILayout.Space();
if (showCeiling.FoldoutWithBoldLabelPropertyField(ceilingSettingsFoldoutHeader, showContent))
{
EditorGUI.indentLevel++;
EditorGUILayout.PropertyField(ceilingMaterial, materialContent);
EditorGUI.indentLevel--;
}

if (showBoundaryCeiling.FoldoutWithBoldLabelPropertyField(boundaryCeilingSettingsFoldoutHeader, showContent))
{
EditorGUI.indentLevel++;
EditorGUILayout.PropertyField(boundaryCeilingMaterial, materialContent);
EditorGUILayout.PropertyField(ceilingPhysicsLayer);
EditorGUI.indentLevel--;
}

EditorGUILayout.Space();

serializedObject.ApplyModifiedProperties();

base.OnInspectorGUI();
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ public Edge(Vector2 pointA, Vector2 pointB)
public Edge(Vector3 pointA, Vector3 pointB) :
// Use the X and Z parameters as our edges are height agnostic.
this(new Vector2(pointA.x, pointA.z), new Vector2(pointB.x, pointB.z))
{ }
{
}
}
}
Loading