AR Design
UBC EML collab with UBC SALA - visualizing IoT data in AR
HoloToolkit.Unity.SpatialUnderstanding Class Reference

The SpatialUnderstanding class controls the state and flow of the scanning process used in the understanding module. More...

Inheritance diagram for HoloToolkit.Unity.SpatialUnderstanding:
HoloToolkit.Unity.Singleton< SpatialUnderstanding >

Public Types

enum  ScanStates {
  ScanStates.None, ScanStates.ReadyToScan, ScanStates.Scanning, ScanStates.Finishing,
  ScanStates.Done
}
 

Public Member Functions

delegate void OnScanDoneDelegate ()
 
void RequestBeginScanning ()
 Call to request that scanning should begin. If AutoBeginScanning is false, this function should be used to initiate the scanning process. More...
 
void RequestFinishScan ()
 Call to request that the scanning progress be finishing. The application must do this to finalize the playspace. The scan state will not progress pass Scanning until this is called. The spatial understanding queries will not function until the playspace is finalized. More...
 

Public Attributes

const float ScanSearchDistance = 8.0f
 
bool AutoBeginScanning = true
 
float UpdatePeriod_DuringScanning = 1.0f
 
float UpdatePeriod_AfterScanning = 4.0f
 

Protected Member Functions

override void Awake ()
 Base Awake method that sets the Singleton's unique instance. Called by Unity when initializing a MonoBehaviour. Scripts that extend Singleton should be sure to call base.Awake() to ensure the static Instance reference is properly created. More...
 
override void OnDestroy ()
 Base OnDestroy method that destroys the Singleton's unique instance. Called by Unity when destroying a MonoBehaviour. Scripts that extend Singleton should be sure to call base.OnDestroy() to ensure the underlying static Instance reference is properly cleaned up. More...
 

Properties

bool AllowSpatialUnderstanding [get]
 Switch used by the entire SpatialUnderstanding module to activate processing. More...
 
SpatialUnderstandingDll UnderstandingDLL [get]
 Reference to the SpatialUnderstandingDLL class (wraps the understanding DLL functions). More...
 
SpatialUnderstandingSourceMesh UnderstandingSourceMesh [get]
 Reference to the SpatialUnderstandingSourceMesh behavior (input mesh data for the understanding module). More...
 
SpatialUnderstandingCustomMesh UnderstandingCustomMesh [get]
 Reference to the UnderstandingCustomMesh behavior (output mesh data from the understanding module). More...
 
ScanStates ScanState [get]
 Indicates the current state of the scan process More...
 
bool ScanStatsReportStillWorking [get]
 Indicates the scanning statistics are still being processed. Request finish should not be called when this is true. More...
 
- Properties inherited from HoloToolkit.Unity.Singleton< SpatialUnderstanding >
static T Instance [get]
 Returns the Singleton instance of the classes type. If no instance is found, then we search for an instance in the scene. If more than one instance is found, we throw an error and no instance is returned. More...
 
static bool IsInitialized [get]
 Returns whether the instance has been initialized or not. More...
 

Events

OnScanDoneDelegate OnScanDone
 Event indicating that the scan is done More...
 
Action ScanStateChanged
 Event indicating that the scan state has changed More...
 

Additional Inherited Members

- Static Public Member Functions inherited from HoloToolkit.Unity.Singleton< SpatialUnderstanding >
static void AssertIsInitialized ()
 
static bool ConfirmInitialized ()
 Awake and OnEnable safe way to check if a Singleton is initialized. More...
 

Detailed Description

The SpatialUnderstanding class controls the state and flow of the scanning process used in the understanding module.

Definition at line 16 of file SpatialUnderstanding.cs.

Member Enumeration Documentation

§ ScanStates

Enumerator
None 
ReadyToScan 
Scanning 
Finishing 
Done 

Definition at line 22 of file SpatialUnderstanding.cs.

Member Function Documentation

§ Awake()

override void HoloToolkit.Unity.SpatialUnderstanding.Awake ( )
protectedvirtual

Base Awake method that sets the Singleton's unique instance. Called by Unity when initializing a MonoBehaviour. Scripts that extend Singleton should be sure to call base.Awake() to ensure the static Instance reference is properly created.

Reimplemented from HoloToolkit.Unity.Singleton< SpatialUnderstanding >.

Definition at line 120 of file SpatialUnderstanding.cs.

§ OnDestroy()

override void HoloToolkit.Unity.SpatialUnderstanding.OnDestroy ( )
protectedvirtual

Base OnDestroy method that destroys the Singleton's unique instance. Called by Unity when destroying a MonoBehaviour. Scripts that extend Singleton should be sure to call base.OnDestroy() to ensure the underlying static Instance reference is properly cleaned up.

Reimplemented from HoloToolkit.Unity.Singleton< SpatialUnderstanding >.

Definition at line 158 of file SpatialUnderstanding.cs.

§ OnScanDoneDelegate()

delegate void HoloToolkit.Unity.SpatialUnderstanding.OnScanDoneDelegate ( )

§ RequestBeginScanning()

void HoloToolkit.Unity.SpatialUnderstanding.RequestBeginScanning ( )

Call to request that scanning should begin. If AutoBeginScanning is false, this function should be used to initiate the scanning process.

Definition at line 173 of file SpatialUnderstanding.cs.

§ RequestFinishScan()

void HoloToolkit.Unity.SpatialUnderstanding.RequestFinishScan ( )

Call to request that the scanning progress be finishing. The application must do this to finalize the playspace. The scan state will not progress pass Scanning until this is called. The spatial understanding queries will not function until the playspace is finalized.

Definition at line 187 of file SpatialUnderstanding.cs.

Member Data Documentation

§ AutoBeginScanning

bool HoloToolkit.Unity.SpatialUnderstanding.AutoBeginScanning = true

Definition at line 33 of file SpatialUnderstanding.cs.

§ ScanSearchDistance

const float HoloToolkit.Unity.SpatialUnderstanding.ScanSearchDistance = 8.0f

Definition at line 19 of file SpatialUnderstanding.cs.

§ UpdatePeriod_AfterScanning

float HoloToolkit.Unity.SpatialUnderstanding.UpdatePeriod_AfterScanning = 4.0f

Definition at line 37 of file SpatialUnderstanding.cs.

§ UpdatePeriod_DuringScanning

float HoloToolkit.Unity.SpatialUnderstanding.UpdatePeriod_DuringScanning = 1.0f

Definition at line 35 of file SpatialUnderstanding.cs.

Property Documentation

§ AllowSpatialUnderstanding

bool HoloToolkit.Unity.SpatialUnderstanding.AllowSpatialUnderstanding
get

Switch used by the entire SpatialUnderstanding module to activate processing.

Definition at line 44 of file SpatialUnderstanding.cs.

§ ScanState

ScanStates HoloToolkit.Unity.SpatialUnderstanding.ScanState
get

Indicates the current state of the scan process

Definition at line 67 of file SpatialUnderstanding.cs.

§ ScanStatsReportStillWorking

bool HoloToolkit.Unity.SpatialUnderstanding.ScanStatsReportStillWorking
get

Indicates the scanning statistics are still being processed. Request finish should not be called when this is true.

Definition at line 89 of file SpatialUnderstanding.cs.

§ UnderstandingCustomMesh

SpatialUnderstandingCustomMesh HoloToolkit.Unity.SpatialUnderstanding.UnderstandingCustomMesh
get

Reference to the UnderstandingCustomMesh behavior (output mesh data from the understanding module).

Definition at line 62 of file SpatialUnderstanding.cs.

§ UnderstandingDLL

SpatialUnderstandingDll HoloToolkit.Unity.SpatialUnderstanding.UnderstandingDLL
get

Reference to the SpatialUnderstandingDLL class (wraps the understanding DLL functions).

Definition at line 54 of file SpatialUnderstanding.cs.

§ UnderstandingSourceMesh

SpatialUnderstandingSourceMesh HoloToolkit.Unity.SpatialUnderstanding.UnderstandingSourceMesh
get

Reference to the SpatialUnderstandingSourceMesh behavior (input mesh data for the understanding module).

Definition at line 58 of file SpatialUnderstanding.cs.

Event Documentation

§ OnScanDone

OnScanDoneDelegate HoloToolkit.Unity.SpatialUnderstanding.OnScanDone

Event indicating that the scan is done

Definition at line 107 of file SpatialUnderstanding.cs.

§ ScanStateChanged

Action HoloToolkit.Unity.SpatialUnderstanding.ScanStateChanged

Event indicating that the scan state has changed

Definition at line 112 of file SpatialUnderstanding.cs.


The documentation for this class was generated from the following file: