Skip to content

Latest commit

 

History

History
187 lines (152 loc) · 5.59 KB

HoloToolkit_Diff.md

File metadata and controls

187 lines (152 loc) · 5.59 KB

Altered files in HoloToolkit (v1.2017.1.2):

  • Cursor.cs
  • GazeManager.cs
  • SpatialMappingSource.cs
  • SpatialMappingObserver.cs
  • MeshSaver.cs
  • SpatialUnderstanding.cs
  • SpatialUnderstandingCustomMesh.cs
  • SpatialUnderstandingSourceMesh.cs
  • InteractiveMeshCursor.cs
  • WorldAnchorManager.cs

...\Assets\HoloToolkit\Input\Scripts\Cursor\Cursor.cs

line 393:

+ // #Companion: Do not interpret the clicker device as a visible hand
+ if (eventData.InputSource.GetSupportedInputInfo(eventData.SourceId) != SupportedInputInfo.None)
+ {
    visibleHandsCount++;
    IsHandVisible = true;
+ }

...\Assets\HoloToolkit\Input\Scripts\Gaze\GazeManager.cs

line 215:

// #Companion: Use the Companion input module to obtain the correct pointer event data
CompanionMR.InputModule inputModule = EventSystem.current.gameObject.GetComponent<CompanionMR.InputModule>();
if (inputModule != null) { UnityUIPointerEvent = inputModule.GetLastPointerEventDataPublic(-1); }

line 288:

// #Companion: Release the current pointer event data
if (inputModule != null) { UnityUIPointerEvent = null; }

...\Assets\HoloToolkit\SpatialMapping\Scripts\SpatialMappingSource.cs

line 100:

surfaceObject.Object.tag = CompanionMR.Tags.TAG_SPATIAL_MAPPING; //#Companion

line 129:

- Debug.Log(surfaceObjectsWriteable.Count);
+ //Debug.Log(surfaceObjectsWriteable.Count); //#Companion

...\Assets\HoloToolkit\SpatialMapping\Scripts\SpatialMappingObserver.cs

line 264:

// #Companion: Move the origin along with the user
this.SetObserverOrigin(Camera.main.transform.position);
this.SwitchObservedVolume();

...\Assets\HoloToolkit\SpatialMapping\Scripts\RemoteMapping\MeshSaver.cs

line 35:

- return ApplicationData.Current.RoamingFolder.Path;
+ return ApplicationData.Current.LocalFolder.Path; //#Companion

...\Assets\HoloToolkit\SpatialUnderstanding\Scripts\SpatialUnderstanding.cs

line 19:

- public const float ScanSearchDistance = 8.0f;
+ public const float ScanSearchDistance = 12.0f; //#Companion

line 81:

- SpatialMappingManager.Instance.GetComponent<SpatialMappingObserver>().TimeBetweenUpdates = (scanState == ScanStates.Done) ? UpdatePeriod_AfterScanning : UpdatePeriod_DuringScanning;
+ //SpatialMappingManager.Instance.GetComponent<SpatialMappingObserver>().TimeBetweenUpdates = (scanState == ScanStates.Done) ? UpdatePeriod_AfterScanning : UpdatePeriod_DuringScanning; //#Companion

line 272:

/**
 * #Companion: Clean up unnecessary meshes and components.
 */
public void Cleanup() {

    // Clear ShapeDetection
    if (CompanionMR.ShapeDetection.Instance != null) { CompanionMR.ShapeDetection.Instance.ClearGeometry(); }
    if (CompanionMR.ShapeDefinition.IsInitialized) { CompanionMR.ShapeDefinition.Instance.Clear(); }

    // Clear PlacementSolver
    SpatialUnderstandingDllObjectPlacement.Solver_RemoveAllObjects();
    if (CompanionMR.PlacementSolver.Instance != null) { CompanionMR.PlacementSolver.Instance.Clear(); }

    // Clear Meshes
    if (SpatialMappingManager.IsInitialized) { SpatialMappingManager.Instance.CleanupObserver(); }
    this.UnderstandingSourceMesh.Cleanup();     // cleanup mapping mesh copies
    this.UnderstandingDLL.UnpinAllObjects();    // cleanup intern meshes
    this.UnderstandingCustomMesh.Cleanup();     // cleanup understanding meshes

    // Clear DLL
    SpatialUnderstandingDll.Imports.SpatialUnderstanding_Term();
    SpatialUnderstandingDll.Imports.SpatialUnderstanding_Init();

    // Reset SpatialUnderstanding
    this.ScanState = ScanStates.None;
}

/**
 * #Companion: Destroy the mapping components and meshes.
 */
public void CleanupMeshes() {
    if (CompanionMR.ShapeDetection.Instance != null) { CompanionMR.ShapeDetection.Instance.ClearGeometry(); }
    if (CompanionMR.PlacementSolver.Instance != null) { CompanionMR.PlacementSolver.Instance.ClearGeometry(true); }
    if (SpatialMappingManager.IsInitialized) { SpatialMappingManager.Instance.CleanupObserver(); }
    Destroy(this.UnderstandingSourceMesh); // destroy mapping mesh copies
    Destroy(this.UnderstandingCustomMesh); // destroy understanding meshes
}

/**
 * #Companion: Destroy all SpatialUnderstanding components.
 */
public void CleanupUnderstanding() {
    this.CleanupMeshes();
    if (CompanionMR.PlacementSolver.Instance != null) { Destroy(CompanionMR.PlacementSolver.Instance); }
    if (CompanionMR.ShapeDetection.Instance != null) { Destroy(CompanionMR.ShapeDetection.Instance); }
    if (CompanionMR.ShapeDefinition.IsInitialized) { Destroy(CompanionMR.ShapeDefinition.Instance); }
    Destroy(this);
}

/**
 * #Companion: Destroy this GameObject.
 */
public void DestroyGameObject() {
    Destroy(this.gameObject);
}

...\Assets\HoloToolkit\SpatialUnderstanding\Scripts\SpatialUnderstandingCustomMesh.cs

line 446:

/**
 * #Companion: Clean up the mesh.
 */
public void Cleanup() {
    this.meshSectors.Clear();
    base.Cleanup();
}

...\Assets\HoloToolkit\SpatialUnderstanding\Scripts\SpatialUnderstandingSourceMesh.cs

line 168:

/**
 * #Companion: Clean up the mesh list.
 */
public void Cleanup() {
    this.inputMeshList.Clear();
}

...\Assets\HoloToolkit\Utilities\Scripts\Gaze\WorldAnchorManager.cs

line 27:

- public TextMesh AnchorDebugText;
+ public UnityEngine.UI.Text AnchorDebugText; //#Companion

line 410:

AnchorGameObjectReferenceList.Remove(anchorId); //#Companion

line 433:

Destroy(anchoredGameObject); //#Companion