Skip to content

Commit 26ac05a

Browse files
author
David Kline (ANALOG)
committed
update boundary demo info panel, add boundary profile
1 parent 990e699 commit 26ac05a

File tree

6 files changed

+320
-74
lines changed

6 files changed

+320
-74
lines changed

Assets/MixedRealityToolkit-Examples/Demos/Boundary/Scenes/BoundaryVisualization.unity

Lines changed: 161 additions & 74 deletions
Original file line numberDiff line numberDiff line change
@@ -263,49 +263,50 @@ Prefab:
263263
- target: {fileID: 114995780653097258, guid: cf1e39a641f010e42a8168c9737d1803,
264264
type: 2}
265265
propertyPath: m_Text
266-
value: 'This scene demonstrates visualizing the boundary geometry and a rectangular
267-
playspace inscribed within those bounds.
268-
269-
270-
271-
272-
273-
274-
The area outside of the boundary geometry.
275-
276-
277-
278-
279-
280-
281-
The area within the boundary geometry (aka TrackedArea).
282-
283-
284-
285-
286-
287-
288-
The area within the inscribed rectangle (aka PlayArea).'
266+
value: "This scene demonstrates visualizing the boundary geometry and a rectangular
267+
playspace inscribed within those bounds.\n\n\nDisplays speheres that indicate
268+
areas within and outside of the boundary geometry.\n\n\n The area within
269+
the boundary geometry (aka TrackedArea).\n\n\n The area within the inscribed
270+
rectangle (aka PlayArea).\n\n\n The area outside of the boundary geometry.\n\n\nVisualizes
271+
the inscribed rectangular play area. This visualization can be toggled on
272+
and off in the inspector and from script."
289273
objectReference: {fileID: 0}
290274
- target: {fileID: 114713125240876806, guid: cf1e39a641f010e42a8168c9737d1803,
291275
type: 2}
292276
propertyPath: m_Text
293-
value: Immersive headset
277+
value: 'Windows Mixed Reality Immersive
278+
279+
OpenVR'
294280
objectReference: {fileID: 0}
295281
- target: {fileID: 114125765304321574, guid: cf1e39a641f010e42a8168c9737d1803,
296282
type: 2}
297283
propertyPath: m_Text
298-
value: White Spheres
284+
value: BoundaryVisualizationDemo.cs
299285
objectReference: {fileID: 0}
300286
- target: {fileID: 114121190672569774, guid: cf1e39a641f010e42a8168c9737d1803,
301287
type: 2}
302288
propertyPath: m_Text
303-
value: Cyan Spheres
289+
value: ' Cyan'
304290
objectReference: {fileID: 0}
305291
- target: {fileID: 114186135864427680, guid: cf1e39a641f010e42a8168c9737d1803,
306292
type: 2}
307293
propertyPath: m_Text
308-
value: Purple Rectangle and Spheres
294+
value: ' Purple'
295+
objectReference: {fileID: 0}
296+
- target: {fileID: 224849082003076088, guid: cf1e39a641f010e42a8168c9737d1803,
297+
type: 2}
298+
propertyPath: m_AnchoredPosition.y
299+
value: 0.218
300+
objectReference: {fileID: 0}
301+
- target: {fileID: 224745427211728820, guid: cf1e39a641f010e42a8168c9737d1803,
302+
type: 2}
303+
propertyPath: m_AnchoredPosition.y
304+
value: 0.134
305+
objectReference: {fileID: 0}
306+
- target: {fileID: 224963507392718102, guid: cf1e39a641f010e42a8168c9737d1803,
307+
type: 2}
308+
propertyPath: m_AnchoredPosition.y
309+
value: 0.076
309310
objectReference: {fileID: 0}
310311
m_RemovedComponents: []
311312
m_ParentPrefab: {fileID: 100100000, guid: cf1e39a641f010e42a8168c9737d1803, type: 2}
@@ -315,6 +316,11 @@ Transform:
315316
m_PrefabParentObject: {fileID: 4753320988497866, guid: cf1e39a641f010e42a8168c9737d1803,
316317
type: 2}
317318
m_PrefabInternal: {fileID: 310729792}
319+
--- !u!224 &310729794 stripped
320+
RectTransform:
321+
m_PrefabParentObject: {fileID: 224158120979208096, guid: cf1e39a641f010e42a8168c9737d1803,
322+
type: 2}
323+
m_PrefabInternal: {fileID: 310729792}
318324
--- !u!1 &353698134
319325
GameObject:
320326
m_ObjectHideFlags: 0
@@ -324,7 +330,6 @@ GameObject:
324330
m_Component:
325331
- component: {fileID: 353698135}
326332
- component: {fileID: 353698136}
327-
- component: {fileID: 353698137}
328333
m_Layer: 0
329334
m_Name: BoundaryVisualizer
330335
m_TagString: Untagged
@@ -360,6 +365,84 @@ MonoBehaviour:
360365
outOfBoundsMaterial: {fileID: 2100000, guid: 360c90aa3bc85c9438a05d511deb80ae, type: 2}
361366
inscribedRectangleMaterial: {fileID: 2100000, guid: 693646fbd4009244e9cc6a4cd5b72585,
362367
type: 2}
368+
--- !u!1 &1067248828
369+
GameObject:
370+
m_ObjectHideFlags: 0
371+
m_PrefabParentObject: {fileID: 1054075472835142, guid: cf1e39a641f010e42a8168c9737d1803,
372+
type: 2}
373+
m_PrefabInternal: {fileID: 0}
374+
serializedVersion: 5
375+
m_Component:
376+
- component: {fileID: 1067248829}
377+
- component: {fileID: 1067248831}
378+
- component: {fileID: 1067248830}
379+
m_Layer: 5
380+
m_Name: Subtitle5
381+
m_TagString: Untagged
382+
m_Icon: {fileID: 0}
383+
m_NavMeshLayer: 0
384+
m_StaticEditorFlags: 0
385+
m_IsActive: 1
386+
--- !u!224 &1067248829
387+
RectTransform:
388+
m_ObjectHideFlags: 0
389+
m_PrefabParentObject: {fileID: 224963507392718102, guid: cf1e39a641f010e42a8168c9737d1803,
390+
type: 2}
391+
m_PrefabInternal: {fileID: 0}
392+
m_GameObject: {fileID: 1067248828}
393+
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
394+
m_LocalPosition: {x: 0, y: 0, z: -0.019088054}
395+
m_LocalScale: {x: 0.00049999997, y: 0.00049999997, z: 0.00049999997}
396+
m_Children: []
397+
m_Father: {fileID: 310729794}
398+
m_RootOrder: 10
399+
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
400+
m_AnchorMin: {x: 0.5, y: 0.5}
401+
m_AnchorMax: {x: 0.5, y: 0.5}
402+
m_AnchoredPosition: {x: -0.0001001358, y: -0.049}
403+
m_SizeDelta: {x: 1107.8, y: 89.1924}
404+
m_Pivot: {x: 0.5, y: 0.5}
405+
--- !u!114 &1067248830
406+
MonoBehaviour:
407+
m_ObjectHideFlags: 0
408+
m_PrefabParentObject: {fileID: 114186135864427680, guid: cf1e39a641f010e42a8168c9737d1803,
409+
type: 2}
410+
m_PrefabInternal: {fileID: 0}
411+
m_GameObject: {fileID: 1067248828}
412+
m_Enabled: 1
413+
m_EditorHideFlags: 0
414+
m_Script: {fileID: 708705254, guid: f70555f144d8491a825f0804e09c671c, type: 3}
415+
m_Name:
416+
m_EditorClassIdentifier:
417+
m_Material: {fileID: 0}
418+
m_Color: {r: 1, g: 1, b: 1, a: 1}
419+
m_RaycastTarget: 1
420+
m_OnCullStateChanged:
421+
m_PersistentCalls:
422+
m_Calls: []
423+
m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI,
424+
Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
425+
m_FontData:
426+
m_Font: {fileID: 12800000, guid: e3d8348b7d66bae4aa4b1f3ada3ef5fd, type: 3}
427+
m_FontSize: 40
428+
m_FontStyle: 0
429+
m_BestFit: 0
430+
m_MinSize: 4
431+
m_MaxSize: 101
432+
m_Alignment: 0
433+
m_AlignByGeometry: 0
434+
m_RichText: 1
435+
m_HorizontalOverflow: 0
436+
m_VerticalOverflow: 0
437+
m_LineSpacing: 1
438+
m_Text: PlayAreaVisualizer.cs
439+
--- !u!222 &1067248831
440+
CanvasRenderer:
441+
m_ObjectHideFlags: 0
442+
m_PrefabParentObject: {fileID: 222823303811744904, guid: cf1e39a641f010e42a8168c9737d1803,
443+
type: 2}
444+
m_PrefabInternal: {fileID: 0}
445+
m_GameObject: {fileID: 1067248828}
363446
--- !u!1 &1229001241
364447
GameObject:
365448
m_ObjectHideFlags: 0
@@ -391,47 +474,79 @@ Transform:
391474
m_Father: {fileID: 0}
392475
m_RootOrder: 3
393476
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
394-
--- !u!1 &1260035423
477+
--- !u!1 &1289414259
395478
GameObject:
396479
m_ObjectHideFlags: 0
397480
m_PrefabParentObject: {fileID: 0}
398481
m_PrefabInternal: {fileID: 0}
399482
serializedVersion: 5
400483
m_Component:
401-
- component: {fileID: 1260035424}
402-
- component: {fileID: 1260035426}
403-
- component: {fileID: 1260035425}
484+
- component: {fileID: 1289414260}
485+
m_Layer: 0
486+
m_Name: Body
487+
m_TagString: Untagged
488+
m_Icon: {fileID: 0}
489+
m_NavMeshLayer: 0
490+
m_StaticEditorFlags: 0
491+
m_IsActive: 1
492+
--- !u!4 &1289414260
493+
Transform:
494+
m_ObjectHideFlags: 0
495+
m_PrefabParentObject: {fileID: 0}
496+
m_PrefabInternal: {fileID: 0}
497+
m_GameObject: {fileID: 1289414259}
498+
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
499+
m_LocalPosition: {x: 0, y: 0, z: 0}
500+
m_LocalScale: {x: 1, y: 1, z: 1}
501+
m_Children:
502+
- {fileID: 1491404204}
503+
m_Father: {fileID: 0}
504+
m_RootOrder: 2
505+
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
506+
--- !u!1 &1300126552
507+
GameObject:
508+
m_ObjectHideFlags: 0
509+
m_PrefabParentObject: {fileID: 1054075472835142, guid: cf1e39a641f010e42a8168c9737d1803,
510+
type: 2}
511+
m_PrefabInternal: {fileID: 0}
512+
serializedVersion: 5
513+
m_Component:
514+
- component: {fileID: 1300126553}
515+
- component: {fileID: 1300126555}
516+
- component: {fileID: 1300126554}
404517
m_Layer: 5
405-
m_Name: Subtitle (3)
518+
m_Name: Subtitle4
406519
m_TagString: Untagged
407520
m_Icon: {fileID: 0}
408521
m_NavMeshLayer: 0
409522
m_StaticEditorFlags: 0
410523
m_IsActive: 1
411-
--- !u!224 &1260035424
524+
--- !u!224 &1300126553
412525
RectTransform:
413526
m_ObjectHideFlags: 0
414-
m_PrefabParentObject: {fileID: 0}
527+
m_PrefabParentObject: {fileID: 224963507392718102, guid: cf1e39a641f010e42a8168c9737d1803,
528+
type: 2}
415529
m_PrefabInternal: {fileID: 0}
416-
m_GameObject: {fileID: 1260035423}
530+
m_GameObject: {fileID: 1300126552}
417531
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
418-
m_LocalPosition: {x: 0, y: 0, z: 1.3334941}
532+
m_LocalPosition: {x: 0, y: 0, z: -0.019088056}
419533
m_LocalScale: {x: 0.00049999997, y: 0.00049999997, z: 0.00049999997}
420534
m_Children: []
421-
m_Father: {fileID: 424705611}
535+
m_Father: {fileID: 310729794}
422536
m_RootOrder: 9
423537
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
424538
m_AnchorMin: {x: 0.5, y: 0.5}
425539
m_AnchorMax: {x: 0.5, y: 0.5}
426-
m_AnchoredPosition: {x: -512.5875, y: -323.02515}
540+
m_AnchoredPosition: {x: -0.0001001358, y: 0.015}
427541
m_SizeDelta: {x: 1107.8, y: 89.1924}
428542
m_Pivot: {x: 0.5, y: 0.5}
429-
--- !u!114 &1260035425
543+
--- !u!114 &1300126554
430544
MonoBehaviour:
431545
m_ObjectHideFlags: 0
432-
m_PrefabParentObject: {fileID: 0}
546+
m_PrefabParentObject: {fileID: 114186135864427680, guid: cf1e39a641f010e42a8168c9737d1803,
547+
type: 2}
433548
m_PrefabInternal: {fileID: 0}
434-
m_GameObject: {fileID: 1260035423}
549+
m_GameObject: {fileID: 1300126552}
435550
m_Enabled: 1
436551
m_EditorHideFlags: 0
437552
m_Script: {fileID: 708705254, guid: f70555f144d8491a825f0804e09c671c, type: 3}
@@ -459,41 +574,13 @@ MonoBehaviour:
459574
m_VerticalOverflow: 0
460575
m_LineSpacing: 1
461576
m_Text: ' White'
462-
--- !u!222 &1260035426
577+
--- !u!222 &1300126555
463578
CanvasRenderer:
464579
m_ObjectHideFlags: 0
465-
m_PrefabParentObject: {fileID: 0}
466-
m_PrefabInternal: {fileID: 0}
467-
m_GameObject: {fileID: 1260035423}
468-
--- !u!1 &1289414259
469-
GameObject:
470-
m_ObjectHideFlags: 0
471-
m_PrefabParentObject: {fileID: 0}
472-
m_PrefabInternal: {fileID: 0}
473-
serializedVersion: 5
474-
m_Component:
475-
- component: {fileID: 1289414260}
476-
m_Layer: 0
477-
m_Name: Body
478-
m_TagString: Untagged
479-
m_Icon: {fileID: 0}
480-
m_NavMeshLayer: 0
481-
m_StaticEditorFlags: 0
482-
m_IsActive: 1
483-
--- !u!4 &1289414260
484-
Transform:
485-
m_ObjectHideFlags: 0
486-
m_PrefabParentObject: {fileID: 0}
580+
m_PrefabParentObject: {fileID: 222823303811744904, guid: cf1e39a641f010e42a8168c9737d1803,
581+
type: 2}
487582
m_PrefabInternal: {fileID: 0}
488-
m_GameObject: {fileID: 1289414259}
489-
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
490-
m_LocalPosition: {x: 0, y: 0, z: 0}
491-
m_LocalScale: {x: 1, y: 1, z: 1}
492-
m_Children:
493-
- {fileID: 1491404204}
494-
m_Father: {fileID: 0}
495-
m_RootOrder: 2
496-
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
583+
m_GameObject: {fileID: 1300126552}
497584
--- !u!1 &1428268607
498585
GameObject:
499586
m_ObjectHideFlags: 0

Assets/MixedRealityToolkit/_Core/Definitions/BoundarySystem.meta

Lines changed: 8 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
// Copyright (c) Microsoft Corporation. All rights reserved.
2+
// Licensed under the MIT License. See LICENSE in the project root for license information.
3+
4+
using UnityEngine;
5+
6+
namespace Microsoft.MixedReality.Toolkit.Internal.Definitions.BoundarySystem
7+
{
8+
/// <summary>
9+
/// Configuration profile settings for setting up boundary visualizations.
10+
/// </summary>
11+
[CreateAssetMenu(menuName = "Mixed Reality Toolkit/Mixed Reality Boundary Profile", fileName = "MixedRealityEnvironmentBoundaryProfile", order = 6)]
12+
public class MixedRealityBoundaryProfile : ScriptableObject
13+
{
14+
[SerializeField]
15+
private bool showPlayArea = true;
16+
17+
/// <summary>
18+
/// Indicates whether or not the play area is to be displayed.
19+
/// </summary>
20+
/// <remarks>
21+
/// The size of the play area is determined by the boundary system.
22+
/// </remarks>
23+
public bool ShowPlayArea => showPlayArea;
24+
25+
[SerializeField]
26+
private Material playAreaMaterial = null;
27+
28+
/// <summary>
29+
/// The material to use for the rectangular play area <see cref="GameObject"/>.
30+
/// </summary>
31+
public Material PlayAreaMaterial => playAreaMaterial;
32+
33+
[SerializeField]
34+
private bool showFloorPlane = true;
35+
36+
/// <summary>
37+
/// Indicates whether or not the floor plane is to be displayed.
38+
/// </summary>
39+
public bool ShowFloorPlane => showFloorPlane;
40+
41+
[SerializeField]
42+
private Material floorPlaneMaterial = null;
43+
44+
/// <summary>
45+
/// The material to use for the rectangular floor plane <see cref="GameObject"/>.
46+
/// </summary>
47+
public Material FloorPlaneMaterial => floorPlaneMaterial;
48+
49+
[SerializeField]
50+
private Vector3 floorPlaneScale = new Vector3(3f, 3f, 1f);
51+
52+
/// <summary>
53+
/// The the size at which to display the rectangular floor plane <see cref="GameObject"/>.
54+
/// </summary>
55+
public Vector3 FloorPlaneScale => floorPlaneScale;
56+
}
57+
}

0 commit comments

Comments
 (0)