C# Class HoloToolkit.Unity.SpatialMappingObserver

The SpatialMappingObserver class encapsulates the SurfaceObserver into an easy to use object that handles managing the observed surfaces and the rendering of surface geometry.
Inheritance: SpatialMappingSource
Mostrar archivo Open project: Microsoft/HoloToolkit-Unity Class Usage Examples

Public Methods

Method Description
SetObserverOrigin ( Vector3 origin ) : void

Can be called to override the default origin for the observed volume

StartObserving ( ) : void

Starts the Surface Observer.

StopObserving ( ) : void

Stops the Surface Observer.

Sets the Surface Observer state to ObserverStates.Stopped.

Protected Methods

Method Description
Awake ( ) : void

Private Methods

Method Description
CleanupMeshes ( Mesh visualMesh, Mesh colliderMesh ) : void
CleanupSurface ( GameObject surface ) : void
GetSurfaceObject ( int surfaceID, Transform parentObject ) : GameObject
OnDestroy ( ) : void

Called when the GameObject is unloaded.

QueueSurfaceDataRequest ( SurfaceId id, GameObject surface ) : void

Calls GetMeshAsync to update the SurfaceData and re-activate the surface object when ready.

SurfaceObserver_OnDataReady ( SurfaceData cookedData, bool outputWritten, float elapsedCookTimeSeconds ) : void

Handles the SurfaceObserver's OnDataReady event.

SurfaceObserver_OnSurfaceChanged ( SurfaceId id, SurfaceChange changeType, Bounds bounds, System updateTime ) : void

Handles the SurfaceObserver's OnSurfaceChanged event.

Update ( ) : void

Called once per frame.

Method Details

Awake() protected method

protected Awake ( ) : void
return void

SetObserverOrigin() public method

Can be called to override the default origin for the observed volume
public SetObserverOrigin ( Vector3 origin ) : void
origin UnityEngine.Vector3
return void

StartObserving() public method

Starts the Surface Observer.
public StartObserving ( ) : void
return void

StopObserving() public method

Stops the Surface Observer.
Sets the Surface Observer state to ObserverStates.Stopped.
public StopObserving ( ) : void
return void