C# Class HoloToolkit.Unity.SpatialUnderstandingSourceMesh

Provides the input meshes to the spatial understanding dll. The component relies on the spatial mapping module. It maintains a mesh list in the required dll format which is updated from the spatial mapping's SurfaceObject list.
Inheritance: UnityEngine.MonoBehaviour
显示文件 Open project: Microsoft/HoloToolkit-Unity

Public Methods

Method Description
GetInputMeshList ( int &meshCount, IntPtr &meshList ) : bool

Update the internal mesh list and provides an array pointer in the form the dll will accept.

Private Methods

Method Description
AddOrUpdateMeshInList ( SurfaceData bakedData ) : void

Updates an element of the behavior's mesh list from an element of the the spatial mapping's surface object list. Element will be either added or updated to match up to the surfaceObject list.

FindMeshIndexInInputMeshList ( int meshID ) : int
MappingObserver_DataReady ( SurfaceData bakedData, bool outputWritten, float elapsedBakeTimeSeconds ) : void

Called by the surface observer when a mesh has had its data changed.

MappingObserver_SurfaceChanged ( SurfaceId surfaceId, SurfaceChange changeType, Bounds bounds, System.DateTime updateTime ) : void

Called when a surface is going to be added, removed, or updated. We only care about removal so we can remove our internal copy of the surface mesh.

Start ( ) : void

Method Details

GetInputMeshList() public method

Update the internal mesh list and provides an array pointer in the form the dll will accept.
public GetInputMeshList ( int &meshCount, IntPtr &meshList ) : bool
meshCount int Number of meshes contains in the return mesh list
meshList System.IntPtr Marshalled mesh list pointer. Valid only with the caller's function context
return bool