Tanoda
IInternalInteractionManager.cs
Go to the documentation of this file.
1/******************************************************************************
2 * Copyright (C) Ultraleap, Inc. 2011-2020. *
3 * *
4 * Use subject to the terms of the Apache License 2.0 available at *
5 * http://www.apache.org/licenses/LICENSE-2.0, or another agreement *
6 * between Ultraleap and you, your company or other organization. *
7 ******************************************************************************/
8
10
11namespace Leap.Unity.Interaction {
12
13 public interface IInternalInteractionManager {
14
15 // Layers
16
17 void NotifyIntObjAddedInteractionLayer(IInteractionBehaviour intObj, int layer, bool refreshImmediately = true);
18 void NotifyIntObjRemovedInteractionLayer(IInteractionBehaviour intObj, int layer, bool refreshImmediately = true);
19
20 void NotifyIntObjAddedNoContactLayer(IInteractionBehaviour intObj, int layer, bool refreshImmediately = true);
21 void NotifyIntObjRemovedNoContactLayer(IInteractionBehaviour intObj, int layer, bool refreshImmediately = true);
22
24
25 }
26
27 public static class IInternalInteractionManagerExtensions {
28
29 public static void NotifyIntObjHasNewInteractionLayer(this IInternalInteractionManager manager,
31 int oldInteractionLayer,
32 int newInteractionLayer) {
33 manager.NotifyIntObjRemovedInteractionLayer(intObj, oldInteractionLayer, false);
34 manager.NotifyIntObjAddedInteractionLayer(intObj, newInteractionLayer, false);
35 manager.RefreshLayersNow();
36 }
37
38 public static void NotifyIntObjHasNewNoContactLayer(this IInternalInteractionManager manager,
40 int oldNoContactLayer,
41 int newNoContactLayer) {
42 manager.NotifyIntObjRemovedNoContactLayer(intObj, oldNoContactLayer, false);
43 manager.NotifyIntObjAddedNoContactLayer(intObj, newNoContactLayer, false);
44 manager.RefreshLayersNow();
45 }
46
47 }
48
49}
IInteractionBehaviour is the interface that defines all Interaction objects, specifying the minimum s...
void NotifyIntObjRemovedNoContactLayer(IInteractionBehaviour intObj, int layer, bool refreshImmediately=true)
void NotifyIntObjRemovedInteractionLayer(IInteractionBehaviour intObj, int layer, bool refreshImmediately=true)
void NotifyIntObjAddedNoContactLayer(IInteractionBehaviour intObj, int layer, bool refreshImmediately=true)
void NotifyIntObjAddedInteractionLayer(IInteractionBehaviour intObj, int layer, bool refreshImmediately=true)