3 using System.Runtime.InteropServices;
33 public delegate
void SendPoseDelegate(
float r1,
float r2,
float r3,
double t1,
double t2,
double t3);
49 [DllImport (
"__Internal")]
52 [DllImport (
"__Internal")]
53 private static extern IntPtr
_SetNewFrame (IntPtr pointer,
int width,
int height);
55 [DllImport (
"__Internal")]
58 [DllImport (
"__Internal")]
63 [DllImport (
"slamflex")]
66 [DllImport (
"slamflex")]
67 private static extern IntPtr
_SetNewFrame (IntPtr pointer,
int width,
int height);
69 [DllImport (
"slamflex")]
72 [DllImport (
"slamflex")]
121 string state = Marshal.PtrToStringAnsi(
_SetNewFrame(pointer, width, height));
180 return (Application.platform == RuntimePlatform.Android || Application.platform == RuntimePlatform.IPhonePlayer);
delegate void SendLogDelegate(string text)
Definition of delegate used from plugin to send log to Unity3D
delegate void SendPoseDelegate(float r1, float r2, float r3, double t1, double t2, double t3)
Definition of delegate used from plugin to send pose to Unity3D
static bool ViablePlatform()
Check if is viable platform for running plugin
delegate void SendStringDelegate(string s)
Definition of delegate used from plugin to send string to Unity3D
DetectionState
Enum for state of SLAM detection process
void _StopSlam()
Stops slam plane detection.
void _StartPlaneDetection()
Initiate plane detection.
SlamFlexWrapper implements interface to native implementation and public interface for use inside C# ...
void _StartSlam(void *pointerString, void *pointerPose, void *pointerStringLog, void *pointerArrayOfPoints)
Exported functions from libSlamflex library.
static void StartSlam(SendStringDelegate ssd, SendPoseDelegate spd, SendLogDelegate sLogd, SendArrayPointsDelegate arrayPoints)
Starts SLAM detection
delegate void SendArrayPointsDelegate(IntPtr pointer, int size)
Definition of delegate used from plugin to send array of points to Unity3D
const char * _SetNewFrame(void *pointer, int width, int height)
Function called each frame with pointer to image and width, height of image.
static DetectionState SetNewFrame(IntPtr pointer, int width, int height)
Send image data to plugin for SLAM detection
static void StopSlam()
Stops SLAM detection
static void StartPlaneDetection()
Initiate SLAM detection