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

Encapsulates the primary DLL functions, including marshalling helper functions. The DLL functions are organized into four parts - in this behavior, SpatialUnderstandingDllTopology, SpatialUnderstandingDllShapes, and SpatialUnderstandingDllObjectPlacement. The scan flow, raycast, and alignment functions are included in this class. More...

Classes

class  Imports
 
struct  MeshData
 Representation of the mesh data to be passed to the understanding DLL. Used by SpatialUnderstandingSourceMesh to store local copies of the mesh data. More...
 

Public Member Functions

IntPtr PinObject (System.Object obj)
 Pins the specified object so that the backing memory can not be relocated, adds the pinned memory handle to the tracking list, and then returns that address of the pinned memory so that it can be passed into the DLL to be access directly from native code. More...
 
IntPtr PinString (string str)
 Pins the string, converting to the format expected by the DLL. See PinObject for additional details. More...
 
void UnpinAllObjects ()
 Unpins all of the memory previously pinned by calls to PinObject(). More...
 
IntPtr PinMeshDataForMarshalling (List< MeshData > meshes)
 Copies the supplied mesh data into the reusedMeshesForMarhsalling array. All managed arrays are pinned so that the marshalling only needs to pass a pointer and the native code can reference the memory in place without needing the marshaller to create a complete copy of the data. More...
 
IntPtr GetStaticRaycastResultPtr ()
 Reusable raycast result object pointer. Can be used for inline raycast calls. More...
 
Imports.RaycastResult GetStaticRaycastResult ()
 Reusable raycast result object. Can be used for inline raycast calls. More...
 
IntPtr GetStaticPlayspaceStatsPtr ()
 Reusable playspace statistics pointer. Can be used for inline playspace statistics calls. More...
 
Imports.PlayspaceStats GetStaticPlayspaceStats ()
 Reusable playspace statistics. Can be used for inline playspace statistics calls. More...
 
IntPtr GetStaticPlayspaceAlignmentPtr ()
 Reusable playspace alignment pointer. Can be used for inline playspace alignment query calls. More...
 
Imports.PlayspaceAlignment GetStaticPlayspaceAlignment ()
 Reusable playspace alignment. Can be used for inline playspace alignment query calls. More...
 
IntPtr GetStaticObjectPlacementResultPtr ()
 Reusable object placement results pointer. Can be used for inline object placement queries. More...
 
SpatialUnderstandingDllObjectPlacement.ObjectPlacementResult GetStaticObjectPlacementResult ()
 Reusable object placement results. Can be used for inline object placement queries. More...
 
T [] MarshalArrayFromIntPtr< T > (IntPtr outArray, int count)
 Marshals BoundedPlane data returned from a DLL API call into a managed BoundedPlane array and then frees the memory that was allocated within the DLL. More...
 

Detailed Description

Encapsulates the primary DLL functions, including marshalling helper functions. The DLL functions are organized into four parts - in this behavior, SpatialUnderstandingDllTopology, SpatialUnderstandingDllShapes, and SpatialUnderstandingDllObjectPlacement. The scan flow, raycast, and alignment functions are included in this class.

Definition at line 18 of file SpatialUnderstandingDll.cs.

Member Function Documentation

§ GetStaticObjectPlacementResult()

SpatialUnderstandingDllObjectPlacement.ObjectPlacementResult HoloToolkit.Unity.SpatialUnderstandingDll.GetStaticObjectPlacementResult ( )

Reusable object placement results. Can be used for inline object placement queries.

Returns
Object placement result structure

Definition at line 232 of file SpatialUnderstandingDll.cs.

§ GetStaticObjectPlacementResultPtr()

IntPtr HoloToolkit.Unity.SpatialUnderstandingDll.GetStaticObjectPlacementResultPtr ( )

Reusable object placement results pointer. Can be used for inline object placement queries.

Returns
Object placement result pointer

Definition at line 219 of file SpatialUnderstandingDll.cs.

§ GetStaticPlayspaceAlignment()

Imports.PlayspaceAlignment HoloToolkit.Unity.SpatialUnderstandingDll.GetStaticPlayspaceAlignment ( )

Reusable playspace alignment. Can be used for inline playspace alignment query calls.

Returns
playspace alignment structure

Definition at line 210 of file SpatialUnderstandingDll.cs.

§ GetStaticPlayspaceAlignmentPtr()

IntPtr HoloToolkit.Unity.SpatialUnderstandingDll.GetStaticPlayspaceAlignmentPtr ( )

Reusable playspace alignment pointer. Can be used for inline playspace alignment query calls.

Returns
playspace alignment pointer

Definition at line 197 of file SpatialUnderstandingDll.cs.

§ GetStaticPlayspaceStats()

Imports.PlayspaceStats HoloToolkit.Unity.SpatialUnderstandingDll.GetStaticPlayspaceStats ( )

Reusable playspace statistics. Can be used for inline playspace statistics calls.

Returns
playspace statistics structure

Definition at line 188 of file SpatialUnderstandingDll.cs.

§ GetStaticPlayspaceStatsPtr()

IntPtr HoloToolkit.Unity.SpatialUnderstandingDll.GetStaticPlayspaceStatsPtr ( )

Reusable playspace statistics pointer. Can be used for inline playspace statistics calls.

Returns
playspace statistics pointer

Definition at line 175 of file SpatialUnderstandingDll.cs.

§ GetStaticRaycastResult()

Imports.RaycastResult HoloToolkit.Unity.SpatialUnderstandingDll.GetStaticRaycastResult ( )

Reusable raycast result object. Can be used for inline raycast calls.

Returns
Raycast result structure

Definition at line 166 of file SpatialUnderstandingDll.cs.

§ GetStaticRaycastResultPtr()

IntPtr HoloToolkit.Unity.SpatialUnderstandingDll.GetStaticRaycastResultPtr ( )

Reusable raycast result object pointer. Can be used for inline raycast calls.

Returns
Raycast result pointer

Definition at line 153 of file SpatialUnderstandingDll.cs.

§ MarshalArrayFromIntPtr< T >()

T [] HoloToolkit.Unity.SpatialUnderstandingDll.MarshalArrayFromIntPtr< T > ( IntPtr  outArray,
int  count 
)

Marshals BoundedPlane data returned from a DLL API call into a managed BoundedPlane array and then frees the memory that was allocated within the DLL.

Definition at line 241 of file SpatialUnderstandingDll.cs.

§ PinMeshDataForMarshalling()

IntPtr HoloToolkit.Unity.SpatialUnderstandingDll.PinMeshDataForMarshalling ( List< MeshData meshes)

Copies the supplied mesh data into the reusedMeshesForMarhsalling array. All managed arrays are pinned so that the marshalling only needs to pass a pointer and the native code can reference the memory in place without needing the marshaller to create a complete copy of the data.

Definition at line 120 of file SpatialUnderstandingDll.cs.

§ PinObject()

IntPtr HoloToolkit.Unity.SpatialUnderstandingDll.PinObject ( System.Object  obj)

Pins the specified object so that the backing memory can not be relocated, adds the pinned memory handle to the tracking list, and then returns that address of the pinned memory so that it can be passed into the DLL to be access directly from native code.

Definition at line 83 of file SpatialUnderstandingDll.cs.

§ PinString()

IntPtr HoloToolkit.Unity.SpatialUnderstandingDll.PinString ( string  str)

Pins the string, converting to the format expected by the DLL. See PinObject for additional details.

Definition at line 94 of file SpatialUnderstandingDll.cs.

§ UnpinAllObjects()

void HoloToolkit.Unity.SpatialUnderstandingDll.UnpinAllObjects ( )

Unpins all of the memory previously pinned by calls to PinObject().

Definition at line 105 of file SpatialUnderstandingDll.cs.


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