Skip to content

Commit 8118459

Browse files
committed
Updating and reverting some changes.
1 parent 462e4eb commit 8118459

File tree

3 files changed

+47
-47
lines changed
  • Assets
    • HoloToolkit-Examples/SpatialUnderstanding/SpatialUnderstanding-FeatureOverview/Scripts
    • HoloToolkit

3 files changed

+47
-47
lines changed

Assets/HoloToolkit-Examples/SpatialUnderstanding/SpatialUnderstanding-FeatureOverview/Scripts/UI.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ private void Start()
6060

6161
// Events
6262
SpatialUnderstanding.Instance.ScanStateChanged += OnScanStateChanged;
63-
InteractionManager.SourcePressed += OnAirTap;
63+
InteractionManager.SourcePressed += OnAirTap;
6464
}
6565

6666
protected override void OnDestroy()
@@ -98,7 +98,7 @@ private IEnumerator SetupMenu()
9898
IntPtr resultsTopologyPtr = SpatialUnderstanding.Instance.UnderstandingDLL.PinObject(resultsTopology);
9999

100100
// Place on a wall (do it in a thread, as it can take a little while)
101-
SpatialUnderstandingDllObjectPlacement.ObjectPlacementDefinition placeOnWallDef =
101+
SpatialUnderstandingDllObjectPlacement.ObjectPlacementDefinition placeOnWallDef =
102102
SpatialUnderstandingDllObjectPlacement.ObjectPlacementDefinition.Create_OnWall(new Vector3(MenuWidth * 0.5f, MenuHeight * 0.5f, MenuMinDepth * 0.5f), 0.5f, 3.0f);
103103
SpatialUnderstandingDllObjectPlacement.ObjectPlacementResult placementResult = SpatialUnderstanding.Instance.UnderstandingDLL.GetStaticObjectPlacementResult();
104104

Assets/HoloToolkit/Input/Scripts/InputSources/GesturesInput.cs

Lines changed: 44 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -39,57 +39,57 @@ private struct SourceCapability<TReading>
3939

4040
private struct AxisButton2D
4141
{
42-
public bool isPressed;
43-
public double x;
44-
public double y;
42+
public bool Pressed;
43+
public double X;
44+
public double Y;
4545

4646
public static AxisButton2D GetThumbstick(InteractionSourceState interactionSource)
4747
{
4848
return new AxisButton2D
4949
{
50-
isPressed = interactionSource.controllerProperties.thumbstickPressed,
51-
x = interactionSource.controllerProperties.thumbstickX,
52-
y = interactionSource.controllerProperties.thumbstickY,
50+
Pressed = interactionSource.controllerProperties.thumbstickPressed,
51+
X = interactionSource.controllerProperties.thumbstickX,
52+
Y = interactionSource.controllerProperties.thumbstickY,
5353
};
5454
}
5555

5656
public static AxisButton2D GetTouchpad(InteractionSourceState interactionSource)
5757
{
5858
return new AxisButton2D
5959
{
60-
isPressed = interactionSource.controllerProperties.touchpadPressed,
61-
x = interactionSource.controllerProperties.touchpadX,
62-
y = interactionSource.controllerProperties.touchpadY,
60+
Pressed = interactionSource.controllerProperties.touchpadPressed,
61+
X = interactionSource.controllerProperties.touchpadX,
62+
Y = interactionSource.controllerProperties.touchpadY,
6363
};
6464
}
6565
}
6666

6767
private struct TouchpadData
6868
{
6969
public AxisButton2D AxisButton;
70-
public bool IsTouched;
70+
public bool Touched;
7171

7272
public static TouchpadData GetTouchpad(InteractionSourceState interactionSource)
7373
{
7474
return new TouchpadData
7575
{
7676
AxisButton = AxisButton2D.GetTouchpad(interactionSource),
77-
IsTouched = interactionSource.controllerProperties.touchpadTouched,
77+
Touched = interactionSource.controllerProperties.touchpadTouched,
7878
};
7979
}
8080
}
8181

8282
private struct AxisButton1D
8383
{
84-
public bool isPressed;
85-
public double pressedValue;
84+
public bool Pressed;
85+
public double PressedValue;
8686

8787
public static AxisButton1D GetTrigger(InteractionSourceState interactionSource)
8888
{
8989
return new AxisButton1D
9090
{
91-
isPressed = interactionSource.isSelectPressed,
92-
pressedValue = interactionSource.selectPressedValue,
91+
Pressed = interactionSource.selectPressed,
92+
PressedValue = interactionSource.selectPressedValue,
9393
};
9494
}
9595
}
@@ -343,90 +343,90 @@ public override bool TryGetPointingRay(uint sourceId, out Ray pointingRay)
343343
}
344344
}
345345

346-
public override bool TryGetThumbstick(uint sourceId, out bool isPressed, out double x, out double y)
346+
public override bool TryGetThumbstick(uint sourceId, out bool thumbstickPressed, out double thumbstickX, out double thumbstickY)
347347
{
348348
SourceData sourceData;
349349
AxisButton2D thumbstick;
350350
if (sourceIdToData.TryGetValue(sourceId, out sourceData) && TryGetReading(sourceData.Thumbstick, out thumbstick))
351351
{
352-
isPressed = thumbstick.isPressed;
353-
x = thumbstick.x;
354-
y = thumbstick.y;
352+
thumbstickPressed = thumbstick.Pressed;
353+
thumbstickX = thumbstick.X;
354+
thumbstickY = thumbstick.Y;
355355
return true;
356356
}
357357
else
358358
{
359-
isPressed = false;
360-
x = 0;
361-
y = 0;
359+
thumbstickPressed = false;
360+
thumbstickX = 0;
361+
thumbstickY = 0;
362362
return false;
363363
}
364364
}
365365

366-
public override bool TryGetTouchpad(uint sourceId, out bool isPressed, out bool isTouched, out double x, out double y)
366+
public override bool TryGetTouchpad(uint sourceId, out bool touchpadPressed, out bool touchpadTouched, out double touchpadX, out double touchpadY)
367367
{
368368
SourceData sourceData;
369369
TouchpadData touchpad;
370370
if (sourceIdToData.TryGetValue(sourceId, out sourceData) && TryGetReading(sourceData.Touchpad, out touchpad))
371371
{
372-
isPressed = touchpad.AxisButton.isPressed;
373-
isTouched = touchpad.IsTouched;
374-
x = touchpad.AxisButton.x;
375-
y = touchpad.AxisButton.y;
372+
touchpadPressed = touchpad.AxisButton.Pressed;
373+
touchpadTouched = touchpad.Touched;
374+
touchpadX = touchpad.AxisButton.X;
375+
touchpadY = touchpad.AxisButton.Y;
376376
return true;
377377
}
378378
else
379379
{
380-
isPressed = false;
381-
isTouched = false;
382-
x = 0;
383-
y = 0;
380+
touchpadPressed = false;
381+
touchpadTouched = false;
382+
touchpadX = 0;
383+
touchpadY = 0;
384384
return false;
385385
}
386386
}
387387

388-
public override bool TryGetTrigger(uint sourceId, out bool isPressed, out double pressedValue)
388+
public override bool TryGetTrigger(uint sourceId, out bool triggerPressed, out double triggerPressedValue)
389389
{
390390
SourceData sourceData;
391391
AxisButton1D trigger;
392392
if (sourceIdToData.TryGetValue(sourceId, out sourceData) && TryGetReading(sourceData.Trigger, out trigger))
393393
{
394-
isPressed = trigger.isPressed;
395-
pressedValue = trigger.pressedValue;
394+
triggerPressed = trigger.Pressed;
395+
triggerPressedValue = trigger.PressedValue;
396396
return true;
397397
}
398398
else
399399
{
400-
isPressed = false;
401-
pressedValue = 0;
400+
triggerPressed = false;
401+
triggerPressedValue = 0;
402402
return false;
403403
}
404404
}
405405

406-
public override bool TryGetGrasp(uint sourceId, out bool isPressed)
406+
public override bool TryGetGrasp(uint sourceId, out bool graspPressed)
407407
{
408408
SourceData sourceData;
409-
if (sourceIdToData.TryGetValue(sourceId, out sourceData) && TryGetReading(sourceData.Grasp, out isPressed))
409+
if (sourceIdToData.TryGetValue(sourceId, out sourceData) && TryGetReading(sourceData.Grasp, out graspPressed))
410410
{
411411
return true;
412412
}
413413
else
414414
{
415-
isPressed = false;
415+
graspPressed = false;
416416
return false;
417417
}
418418
}
419419

420-
public override bool TryGetMenu(uint sourceId, out bool isPressed)
420+
public override bool TryGetMenu(uint sourceId, out bool menuPressed)
421421
{
422422
SourceData sourceData;
423-
if (sourceIdToData.TryGetValue(sourceId, out sourceData) && TryGetReading(sourceData.Menu, out isPressed))
423+
if (sourceIdToData.TryGetValue(sourceId, out sourceData) && TryGetReading(sourceData.Menu, out menuPressed))
424424
{
425425
return true;
426426
}
427427
else
428428
{
429-
isPressed = false;
429+
menuPressed = false;
430430
return false;
431431
}
432432
}
@@ -547,11 +547,11 @@ private void UpdateSourceState(InteractionSourceState interactionSource, SourceD
547547

548548
sourceData.Grasp.IsSupported = interactionSource.source.supportsGrasp;
549549
sourceData.Grasp.IsAvailable = sourceData.Grasp.IsSupported;
550-
sourceData.Grasp.CurrentReading = (sourceData.Grasp.IsAvailable ? interactionSource.isGrasped : false);
550+
sourceData.Grasp.CurrentReading = (sourceData.Grasp.IsAvailable ? interactionSource.grasped : false);
551551

552552
sourceData.Menu.IsSupported = interactionSource.source.supportsMenu;
553553
sourceData.Menu.IsAvailable = sourceData.Menu.IsSupported;
554-
sourceData.Menu.CurrentReading = (sourceData.Menu.IsAvailable ? interactionSource.isMenuPressed : false);
554+
sourceData.Menu.CurrentReading = (sourceData.Menu.IsAvailable ? interactionSource.menuPressed : false);
555555
}
556556

557557
#endregion

Assets/HoloToolkit/SpatialMapping/Tests/Meshes/SRMesh.obj.meta

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)