@@ -362,12 +362,12 @@ public enum SurfaceTypes
362
362
/// before any other DLL function.
363
363
/// </summary>
364
364
/// <returns>Zero if fails, one if success</returns>
365
- [ DllImport ( "SpatialUnderstanding" ) ]
365
+ [ DllImport ( "SpatialUnderstanding" , CallingConvention = CallingConvention . Cdecl ) ]
366
366
public static extern int SpatialUnderstanding_Init ( ) ;
367
367
/// <summary>
368
368
/// Terminate the spatial understanding DLL.
369
369
/// </summary>
370
- [ DllImport ( "SpatialUnderstanding" ) ]
370
+ [ DllImport ( "SpatialUnderstanding" , CallingConvention = CallingConvention . Cdecl ) ]
371
371
public static extern void SpatialUnderstanding_Term ( ) ;
372
372
373
373
/// <summary>
@@ -384,7 +384,7 @@ public enum SurfaceTypes
384
384
/// <param name="camUp_Z">The user's camera/view unit up vector, z value</param>
385
385
/// <param name="searchDst">Suggested search distance for playspace center</param>
386
386
/// <param name="optimalSize">Optimal room size. Used to determined the playspace size</param>
387
- [ DllImport ( "SpatialUnderstanding" ) ]
387
+ [ DllImport ( "SpatialUnderstanding" , CallingConvention = CallingConvention . Cdecl ) ]
388
388
public static extern void GeneratePlayspace_InitScan (
389
389
[ In ] float camPos_X , [ In ] float camPos_Y , [ In ] float camPos_Z ,
390
390
[ In ] float camFwd_X , [ In ] float camFwd_Y , [ In ] float camFwd_Z ,
@@ -407,7 +407,7 @@ public static extern void GeneratePlayspace_InitScan(
407
407
/// <param name="camUp_Z">The user's camera/view unit up vector, z value</param>
408
408
/// <param name="deltaTime">Time since last update</param>
409
409
/// <returns>One if scanning has been finalized, zero if more updates are required.</returns>
410
- [ DllImport ( "SpatialUnderstanding" ) ]
410
+ [ DllImport ( "SpatialUnderstanding" , CallingConvention = CallingConvention . Cdecl ) ]
411
411
public static extern int GeneratePlayspace_UpdateScan (
412
412
[ In ] int meshCount , [ In ] IntPtr meshes ,
413
413
[ In ] float camPos_X , [ In ] float camPos_Y , [ In ] float camPos_Z ,
@@ -420,7 +420,7 @@ public static extern int GeneratePlayspace_UpdateScan(
420
420
/// finalized. This should be called once the user is happy with the currently
421
421
/// scanned in playspace.
422
422
/// </summary>
423
- [ DllImport ( "SpatialUnderstanding" ) ]
423
+ [ DllImport ( "SpatialUnderstanding" , CallingConvention = CallingConvention . Cdecl ) ]
424
424
public static extern void GeneratePlayspace_RequestFinish ( ) ;
425
425
426
426
/// <summary>
@@ -432,7 +432,7 @@ public static extern int GeneratePlayspace_UpdateScan(
432
432
/// <param name="vertexCount">Filled in with the number of vertices to be returned in the subsequent extract call</param>
433
433
/// <param name="indexCount">Filled in with the number of indices to be returned in the subsequent extract call</param>
434
434
/// <returns>Zero if fails, one if success</returns>
435
- [ DllImport ( "SpatialUnderstanding" ) ]
435
+ [ DllImport ( "SpatialUnderstanding" , CallingConvention = CallingConvention . Cdecl ) ]
436
436
public static extern int GeneratePlayspace_ExtractMesh_Setup (
437
437
[ Out ] out int vertexCount ,
438
438
[ Out ] out int indexCount ) ;
@@ -447,7 +447,7 @@ public static extern int GeneratePlayspace_ExtractMesh_Setup(
447
447
/// <param name="bufferIndexCount">Size of indices, in number of elements</param>
448
448
/// <param name="indices">Array to receive the mesh indices</param>
449
449
/// <returns>Zero if fails, one if success</returns>
450
- [ DllImport ( "SpatialUnderstanding" ) ]
450
+ [ DllImport ( "SpatialUnderstanding" , CallingConvention = CallingConvention . Cdecl ) ]
451
451
public static extern int GeneratePlayspace_ExtractMesh_Extract (
452
452
[ In ] int bufferVertexCount ,
453
453
[ In ] IntPtr verticesPos , // (vertexCount) DirectX::XMFLOAT3*
@@ -460,7 +460,7 @@ public static extern int GeneratePlayspace_ExtractMesh_Extract(
460
460
/// </summary>
461
461
/// <param name="playspaceStats">playspace stats structure to receive the statistics data</param>
462
462
/// <returns>Zero if fails, one if success</returns>
463
- [ DllImport ( "SpatialUnderstanding" ) ]
463
+ [ DllImport ( "SpatialUnderstanding" , CallingConvention = CallingConvention . Cdecl ) ]
464
464
public static extern int QueryPlayspaceStats (
465
465
[ In ] IntPtr playspaceStats ) ; // PlayspaceStats
466
466
@@ -469,7 +469,7 @@ public static extern int QueryPlayspaceStats(
469
469
/// </summary>
470
470
/// <param name="playspaceAlignment">playspace alignment structure to receive the alignment data</param>
471
471
/// <returns>Zero if fails, one if success</returns>
472
- [ DllImport ( "SpatialUnderstanding" ) ]
472
+ [ DllImport ( "SpatialUnderstanding" , CallingConvention = CallingConvention . Cdecl ) ]
473
473
public static extern int QueryPlayspaceAlignment (
474
474
[ In ] IntPtr playspaceAlignment ) ; // PlayspaceAlignment
475
475
@@ -485,7 +485,7 @@ public static extern int QueryPlayspaceAlignment(
485
485
/// <param name="rayVec_Z">Ray direction vector, z component. Length of ray indicates the length of the ray cast query.</param>
486
486
/// <param name="result">Structure to receive the results of the raycast</param>
487
487
/// <returns>Zero if fails or no intersection, one if an intersection is detected</returns>
488
- [ DllImport ( "SpatialUnderstanding" ) ]
488
+ [ DllImport ( "SpatialUnderstanding" , CallingConvention = CallingConvention . Cdecl ) ]
489
489
public static extern int PlayspaceRaycast (
490
490
[ In ] float rayPos_X , [ In ] float rayPos_Y , [ In ] float rayPos_Z ,
491
491
[ In ] float rayVec_X , [ In ] float rayVec_Y , [ In ] float rayVec_Z ,
0 commit comments