diff --git a/Editor/CreateARTrackable.cs b/Editor/CreateARTrackable.cs index 75a6dc44145e65848c3445a341234a22abdfed60..59ccab25bdd0cee1a8f61af2a3e650fc0e355add 100644 --- a/Editor/CreateARTrackable.cs +++ b/Editor/CreateARTrackable.cs @@ -2,100 +2,107 @@ using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEditor; +using UnityEngine.UIElements; public class CreateARTrackable : EditorWindow { - bool groupEnabled; - - string uid = "0"; - string basePath = "http://localhost:8080"; - string type = "?"; - string unit = "?"; - Vector2Int dim; - - [MenuItem("ISG-ARF/AR Trackables and Anchors Editor")] - public static void ShowWindow() - { - EditorWindow.GetWindow(typeof(CreateARTrackable), false, "ETSI ARF - Authoring Editor"); - } - - void OnGUI() - { - Color ori = GUI.backgroundColor; - Color button = new Color(0.5f, 1, 0); - GUILayoutOption[] opt = new GUILayoutOption[] { null }; - - // Title - GUILayout.Label("Augmented Reality Framework", EditorStyles.boldLabel); - GUILayout.Label("BSD 3-Clause License"); - GUILayout.Label("Copyright(c) 2022, ETSI"); - - EditorGUILayout.Space(); - basePath = EditorGUILayout.TextField("Base Path", basePath); - - EditorGUILayout.Space(); - GUILayout.Label("AR Trackable:", EditorStyles.boldLabel); - GUILayout.BeginVertical("", "window"); + bool groupEnabled; + + string uid = "0"; + string basePath = "http://localhost:8080"; + string type = "?"; + string unit = "?"; + Vector2Int dim; + + [MenuItem("ISG-ARF/AR Trackables and Anchors Editor")] + public static void ShowWindow() { - uid = EditorGUILayout.TextField("Creator UID", uid); - GUILayout.Button("Generate UID"); - - EditorGUILayout.Space(); - GUILayout.Label("Metadata:", EditorStyles.boldLabel); - type = EditorGUILayout.TextField("Trackable Type", type); - unit = EditorGUILayout.TextField("Unit System", unit); - - EditorGUILayout.Space(); - dim = EditorGUILayout.Vector2IntField("Dimension", dim); - - EditorGUILayout.Space(); - GUILayout.Button("Payload from File.."); - - EditorGUILayout.Space(); - GUILayout.Label("Optional Parameters:", EditorStyles.boldLabel); - //GUILayout.BeginVertical("Optional Parameters", "window"); - { - groupEnabled = EditorGUILayout.BeginToggleGroup("Key Values", groupEnabled); - EditorGUILayout.IntField("Number of KeyValues", 0); - EditorGUILayout.Space(); - EditorGUILayout.TextField("Key", ""); - EditorGUILayout.TextField("Value", ""); - EditorGUILayout.EndToggleGroup(); - } - //GUILayout.EndVertical(); + EditorWindow wnd = GetWindow(); + wnd.titleContent = new GUIContent("ETSI ARF - Authoring Editor"); } - GUILayout.EndVertical(); - GUI.backgroundColor = button; - if (GUILayout.Button("Create Trackable")) + /*public void CreateGUI() { - RESTRequest.PostAddTrackable(basePath); - Debug.Log("PostAddTrackable"); - } - GUI.backgroundColor = ori; + rootVisualElement.Add(new Label("Hello")); + }*/ - EditorGUILayout.Space(); - GUILayout.Label("AR World Anchor:", EditorStyles.boldLabel); - GUILayout.BeginVertical("", "window"); + void OnGUI() { - uid = EditorGUILayout.TextField("Creator UID", uid); - GUILayout.Button("Generate UID"); + Color ori = GUI.backgroundColor; + Color button = new Color(0.5f, 1, 0); + GUILayoutOption[] opt = new GUILayoutOption[] { null }; - EditorGUILayout.Space(); - GUILayout.Label("Metadata:", EditorStyles.boldLabel); - type = EditorGUILayout.TextField("Anchor Type", type); - unit = EditorGUILayout.TextField("Unit System", unit); - } - GUILayout.EndVertical(); + // Title + GUILayout.Label("Augmented Reality Framework", EditorStyles.boldLabel); + GUILayout.Label("BSD 3-Clause License"); + GUILayout.Label("Copyright(c) 2022, ETSI"); - GUI.backgroundColor = button; - if (GUILayout.Button("Create Anchor")) - { - RESTRequest.PostAddWorldAnchor(basePath); - Debug.Log("PostAddWorldAnchor"); - } - GUI.backgroundColor = ori; - } + EditorGUILayout.Space(); + basePath = EditorGUILayout.TextField("Base Path", basePath); + + EditorGUILayout.Space(); + GUILayout.Label("AR Trackable:", EditorStyles.boldLabel); + GUILayout.BeginVertical("", "window"); + { + uid = EditorGUILayout.TextField("Creator UID", uid); + GUILayout.Button("Generate UID"); + + EditorGUILayout.Space(); + GUILayout.Label("Metadata:", EditorStyles.boldLabel); + type = EditorGUILayout.TextField("Trackable Type", type); + unit = EditorGUILayout.TextField("Unit System", unit); + + EditorGUILayout.Space(); + dim = EditorGUILayout.Vector2IntField("Dimension", dim); + + EditorGUILayout.Space(); + GUILayout.Button("Payload from File.."); + + EditorGUILayout.Space(); + GUILayout.Label("Optional Parameters:", EditorStyles.boldLabel); + //GUILayout.BeginVertical("Optional Parameters", "window"); + { + groupEnabled = EditorGUILayout.BeginToggleGroup("Key Values", groupEnabled); + EditorGUILayout.IntField("Number of KeyValues", 0); + EditorGUILayout.Space(); + EditorGUILayout.TextField("Key", ""); + EditorGUILayout.TextField("Value", ""); + EditorGUILayout.EndToggleGroup(); + } + //GUILayout.EndVertical(); + } + GUILayout.EndVertical(); + + GUI.backgroundColor = button; + if (GUILayout.Button("Create Trackable")) + { + RESTRequest.PostAddTrackable(basePath); + Debug.Log("PostAddTrackable"); + } + GUI.backgroundColor = ori; + EditorGUILayout.Space(); + GUILayout.Label("AR World Anchor:", EditorStyles.boldLabel); + GUILayout.BeginVertical("", "window"); + { + uid = EditorGUILayout.TextField("Creator UID", uid); + GUILayout.Button("Generate UID"); + + EditorGUILayout.Space(); + GUILayout.Label("Metadata:", EditorStyles.boldLabel); + type = EditorGUILayout.TextField("Anchor Type", type); + unit = EditorGUILayout.TextField("Unit System", unit); + } + GUILayout.EndVertical(); + + GUI.backgroundColor = button; + if (GUILayout.Button("Create Anchor")) + { + RESTRequest.PostAddWorldAnchor(basePath); + Debug.Log("PostAddWorldAnchor"); + } + GUI.backgroundColor = ori; + } + } diff --git a/Plugins/JsonSubTypes.dll.meta b/Plugins/JsonSubTypes.dll.meta index 0746bdf7db0e742832997ccd90231adead5f1a53..64dc94c03dbd713eec6c13cbec0d98806046b1dc 100644 --- a/Plugins/JsonSubTypes.dll.meta +++ b/Plugins/JsonSubTypes.dll.meta @@ -7,7 +7,7 @@ PluginImporter: executionOrder: {} defineConstraints: [] isPreloaded: 0 - isOverridable: 0 + isOverridable: 1 isExplicitlyReferenced: 0 validateReferences: 1 platformData: diff --git a/Plugins/Newtonsoft.Json.dll.meta b/Plugins/Newtonsoft.Json.dll.meta index c6bb8f7f518752ecf8911d675fe5bd2ac091af7d..d77fb2a9db67fca9e75de9cf3685d9ec2358b0ed 100644 --- a/Plugins/Newtonsoft.Json.dll.meta +++ b/Plugins/Newtonsoft.Json.dll.meta @@ -7,7 +7,7 @@ PluginImporter: executionOrder: {} defineConstraints: [] isPreloaded: 0 - isOverridable: 0 + isOverridable: 1 isExplicitlyReferenced: 0 validateReferences: 1 platformData: diff --git a/Plugins/Org.OpenAPITools.dll b/Plugins/Org.OpenAPITools.dll index 8e52cd7913fcd4b3cf35cd6f46642bced3278c77..c7d871049a4b55c26cec01772ae43771a72c3f71 100644 Binary files a/Plugins/Org.OpenAPITools.dll and b/Plugins/Org.OpenAPITools.dll differ diff --git a/Plugins/Org.OpenAPITools.dll.meta b/Plugins/Org.OpenAPITools.dll.meta index 4ee42a7b2cbcfb7554c8305ee55e97cf2075f847..fe8fbf08e7a03394f28fe3629645d23571c1341f 100644 --- a/Plugins/Org.OpenAPITools.dll.meta +++ b/Plugins/Org.OpenAPITools.dll.meta @@ -7,7 +7,7 @@ PluginImporter: executionOrder: {} defineConstraints: [] isPreloaded: 0 - isOverridable: 0 + isOverridable: 1 isExplicitlyReferenced: 0 validateReferences: 1 platformData: diff --git a/Plugins/Org.OpenAPITools.xml b/Plugins/Org.OpenAPITools.xml index 26d9f541c41fa74b223118df2601c6d1ea0053e9..83cd91451aebdf378c0f42dc8ec5f316619589d2 100644 --- a/Plugins/Org.OpenAPITools.xml +++ b/Plugins/Org.OpenAPITools.xml @@ -4,7 +4,7 @@ Org.OpenAPITools - + Represents a collection of functions to interact with the API endpoints @@ -31,120 +31,134 @@ Provides a factory method hook for the creation of exceptions. - + - Create a trackable + Get the version of the API Thrown when fails to make API call - A Universally Unique IDentifier identifying the creator of the trackable - Extensible list of trackable types possibly handled by complient World Storage implementation - Identifies targeted framework and version of the format. - The data provided to create the trackable in a specific format handled by the World Storage service. - Unit of length - Bounding box of the Trackable, {width, length, 0} for 2D trackables, {width, length, depth} for 3D trackables - List of additional parameters to be stored with the trackable. (optional) string - + - Create a trackable + Get the version of the API Thrown when fails to make API call - A Universally Unique IDentifier identifying the creator of the trackable - Extensible list of trackable types possibly handled by complient World Storage implementation - Identifies targeted framework and version of the format. - The data provided to create the trackable in a specific format handled by the World Storage service. - Unit of length - Bounding box of the Trackable, {width, length, 0} for 2D trackables, {width, length, depth} for 3D trackables - List of additional parameters to be stored with the trackable. (optional) ApiResponse of string - + - Create a trackable + Test the server availability + + + + + Thrown when fails to make API call + + + + + Test the server availability + + + + + Thrown when fails to make API call + ApiResponse of Object(void) + + + + Get the version of the API Thrown when fails to make API call - A Universally Unique IDentifier identifying the creator of the trackable - Extensible list of trackable types possibly handled by complient World Storage implementation - Identifies targeted framework and version of the format. - The data provided to create the trackable in a specific format handled by the World Storage service. - Unit of length - Bounding box of the Trackable, {width, length, 0} for 2D trackables, {width, length, depth} for 3D trackables - List of additional parameters to be stored with the trackable. (optional) Cancellation Token to cancel request (optional) Task of string - + - Create a trackable + Get the version of the API Thrown when fails to make API call - A Universally Unique IDentifier identifying the creator of the trackable - Extensible list of trackable types possibly handled by complient World Storage implementation - Identifies targeted framework and version of the format. - The data provided to create the trackable in a specific format handled by the World Storage service. - Unit of length - Bounding box of the Trackable, {width, length, 0} for 2D trackables, {width, length, depth} for 3D trackables - List of additional parameters to be stored with the trackable. (optional) Cancellation Token to cancel request (optional) Task of ApiResponse (string) - + + + Test the server availability + + + + + Thrown when fails to make API call + Cancellation Token to cancel request (optional) + Task of void + + + + Test the server availability + + + + + Thrown when fails to make API call + Cancellation Token to cancel request (optional) + Task of ApiResponse + + Represents a collection of functions to interact with the API endpoints - + - Initializes a new instance of the class. + Initializes a new instance of the class. - + - Initializes a new instance of the class + Initializes a new instance of the class - + - Initializes a new instance of the class + Initializes a new instance of the class using Configuration object An instance of Configuration - + Gets the base path of the API client. The base path - + Sets the base path of the API client. The base path - + Gets the default header. Dictionary of HTTP header - + Add default header. @@ -152,178 +166,306 @@ Header field value. - + - Create a trackable + Get the version of the API Thrown when fails to make API call - A Universally Unique IDentifier identifying the creator of the trackable - Extensible list of trackable types possibly handled by complient World Storage implementation - Identifies targeted framework and version of the format. - The data provided to create the trackable in a specific format handled by the World Storage service. - Unit of length - Bounding box of the Trackable, {width, length, 0} for 2D trackables, {width, length, depth} for 3D trackables - List of additional parameters to be stored with the trackable. (optional) string - + - Create a trackable + Get the version of the API Thrown when fails to make API call - A Universally Unique IDentifier identifying the creator of the trackable - Extensible list of trackable types possibly handled by complient World Storage implementation - Identifies targeted framework and version of the format. - The data provided to create the trackable in a specific format handled by the World Storage service. - Unit of length - Bounding box of the Trackable, {width, length, 0} for 2D trackables, {width, length, depth} for 3D trackables - List of additional parameters to be stored with the trackable. (optional) ApiResponse of string - + - Create a trackable + Get the version of the API Thrown when fails to make API call - A Universally Unique IDentifier identifying the creator of the trackable - Extensible list of trackable types possibly handled by complient World Storage implementation - Identifies targeted framework and version of the format. - The data provided to create the trackable in a specific format handled by the World Storage service. - Unit of length - Bounding box of the Trackable, {width, length, 0} for 2D trackables, {width, length, depth} for 3D trackables - List of additional parameters to be stored with the trackable. (optional) Cancellation Token to cancel request (optional) Task of string - + - Create a trackable + Get the version of the API Thrown when fails to make API call - A Universally Unique IDentifier identifying the creator of the trackable - Extensible list of trackable types possibly handled by complient World Storage implementation - Identifies targeted framework and version of the format. - The data provided to create the trackable in a specific format handled by the World Storage service. - Unit of length - Bounding box of the Trackable, {width, length, 0} for 2D trackables, {width, length, depth} for 3D trackables - List of additional parameters to be stored with the trackable. (optional) Cancellation Token to cancel request (optional) Task of ApiResponse (string) - + + + Test the server availability + + Thrown when fails to make API call + + + + + Test the server availability + + Thrown when fails to make API call + ApiResponse of Object(void) + + + + Test the server availability + + Thrown when fails to make API call + Cancellation Token to cancel request (optional) + Task of void + + + + Test the server availability + + Thrown when fails to make API call + Cancellation Token to cancel request (optional) + Task of ApiResponse + + Gets or sets the configuration object An instance of the Configuration - + Provides a factory method hook for the creation of exceptions. - + Represents a collection of functions to interact with the API endpoints - + - Create a world anchor + Create a trackable Thrown when fails to make API call - A Universally Unique IDentifier identifying the creator of the world anchor - Unit of length - List of additional parameters to be stored with the world anchor. (optional) + the trackable to be added to the world storage string - + - Create a world anchor + Create a trackable Thrown when fails to make API call - A Universally Unique IDentifier identifying the creator of the world anchor - Unit of length - List of additional parameters to be stored with the world anchor. (optional) + the trackable to be added to the world storage ApiResponse of string - + + + Deletes a trackable + + + + + Thrown when fails to make API call + trackable id to delete + + + + + Deletes a trackable + + + + + Thrown when fails to make API call + trackable id to delete + ApiResponse of Object(void) + + + + Find a trackable by his ID + + + + + Thrown when fails to make API call + ID of the trackable to retrieve + Trackable + + + + Find a trackable by his ID + + + + + Thrown when fails to make API call + ID of the trackable to retrieve + ApiResponse of Trackable + + + + returns the list of all trackables defined by the world storage. + + + + + Thrown when fails to make API call + List<Trackable> + + + + returns the list of all trackables defined by the world storage. + + + + + Thrown when fails to make API call + ApiResponse of List<Trackable> + + - Create a world anchor + Create a trackable Thrown when fails to make API call - A Universally Unique IDentifier identifying the creator of the world anchor - Unit of length - List of additional parameters to be stored with the world anchor. (optional) + the trackable to be added to the world storage Cancellation Token to cancel request (optional) Task of string - + - Create a world anchor + Create a trackable Thrown when fails to make API call - A Universally Unique IDentifier identifying the creator of the world anchor - Unit of length - List of additional parameters to be stored with the world anchor. (optional) + the trackable to be added to the world storage Cancellation Token to cancel request (optional) Task of ApiResponse (string) - + + + Deletes a trackable + + + + + Thrown when fails to make API call + trackable id to delete + Cancellation Token to cancel request (optional) + Task of void + + + + Deletes a trackable + + + + + Thrown when fails to make API call + trackable id to delete + Cancellation Token to cancel request (optional) + Task of ApiResponse + + + + Find a trackable by his ID + + + + + Thrown when fails to make API call + ID of the trackable to retrieve + Cancellation Token to cancel request (optional) + Task of Trackable + + + + Find a trackable by his ID + + + + + Thrown when fails to make API call + ID of the trackable to retrieve + Cancellation Token to cancel request (optional) + Task of ApiResponse (Trackable) + + + + returns the list of all trackables defined by the world storage. + + + + + Thrown when fails to make API call + Cancellation Token to cancel request (optional) + Task of List<Trackable> + + + + returns the list of all trackables defined by the world storage. + + + + + Thrown when fails to make API call + Cancellation Token to cancel request (optional) + Task of ApiResponse (List<Trackable>) + + Represents a collection of functions to interact with the API endpoints - + - Initializes a new instance of the class. + Initializes a new instance of the class. - + - Initializes a new instance of the class + Initializes a new instance of the class - + - Initializes a new instance of the class + Initializes a new instance of the class using Configuration object An instance of Configuration - + Gets the base path of the API client. The base path - + Sets the base path of the API client. The base path - + Gets the default header. Dictionary of HTTP header - + Add default header. @@ -331,55 +473,145 @@ Header field value. - + - Create a world anchor + Create a trackable Thrown when fails to make API call - A Universally Unique IDentifier identifying the creator of the world anchor - Unit of length - List of additional parameters to be stored with the world anchor. (optional) + the trackable to be added to the world storage string - + - Create a world anchor + Create a trackable Thrown when fails to make API call - A Universally Unique IDentifier identifying the creator of the world anchor - Unit of length - List of additional parameters to be stored with the world anchor. (optional) + the trackable to be added to the world storage ApiResponse of string - + - Create a world anchor + Create a trackable Thrown when fails to make API call - A Universally Unique IDentifier identifying the creator of the world anchor - Unit of length - List of additional parameters to be stored with the world anchor. (optional) + the trackable to be added to the world storage Cancellation Token to cancel request (optional) Task of string - + - Create a world anchor + Create a trackable Thrown when fails to make API call - A Universally Unique IDentifier identifying the creator of the world anchor - Unit of length - List of additional parameters to be stored with the world anchor. (optional) + the trackable to be added to the world storage Cancellation Token to cancel request (optional) Task of ApiResponse (string) - + + + Deletes a trackable + + Thrown when fails to make API call + trackable id to delete + + + + + Deletes a trackable + + Thrown when fails to make API call + trackable id to delete + ApiResponse of Object(void) + + + + Deletes a trackable + + Thrown when fails to make API call + trackable id to delete + Cancellation Token to cancel request (optional) + Task of void + + + + Deletes a trackable + + Thrown when fails to make API call + trackable id to delete + Cancellation Token to cancel request (optional) + Task of ApiResponse + + + + Find a trackable by his ID + + Thrown when fails to make API call + ID of the trackable to retrieve + Trackable + + + + Find a trackable by his ID + + Thrown when fails to make API call + ID of the trackable to retrieve + ApiResponse of Trackable + + + + Find a trackable by his ID + + Thrown when fails to make API call + ID of the trackable to retrieve + Cancellation Token to cancel request (optional) + Task of Trackable + + + + Find a trackable by his ID + + Thrown when fails to make API call + ID of the trackable to retrieve + Cancellation Token to cancel request (optional) + Task of ApiResponse (Trackable) + + + + returns the list of all trackables defined by the world storage. + + Thrown when fails to make API call + List<Trackable> + + + + returns the list of all trackables defined by the world storage. + + Thrown when fails to make API call + ApiResponse of List<Trackable> + + + + returns the list of all trackables defined by the world storage. + + Thrown when fails to make API call + Cancellation Token to cancel request (optional) + Task of List<Trackable> + + + + returns the list of all trackables defined by the world storage. + + Thrown when fails to make API call + Cancellation Token to cancel request (optional) + Task of ApiResponse (List<Trackable>) + + Gets or sets the configuration object An instance of the Configuration - + Provides a factory method hook for the creation of exceptions. @@ -398,7 +630,7 @@ Initializes a new instance of the class - with default base path (http://dummy.org). + with default base path (http://localhost:8080). An instance of Configuration. @@ -946,6 +1178,95 @@ Initializes a new instance of the class. + + + EncodingInformationStructure + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + Identifier of the target framework (required). + The version of the format (required). + + + + Returns the string presentation of the object + + String presentation of the object + + + + Returns the JSON string presentation of the object + + JSON string presentation of the object + + + + Returns true if objects are equal + + Object to be compared + Boolean + + + + Returns true if EncodingInformationStructure instances are equal + + Instance of EncodingInformationStructure to be compared + Boolean + + + + Gets the hash code + + Hash code + + + + To validate all properties of the instance + + Validation context + Validation Result + + + + Identifier of the target framework + + Identifier of the target framework + + + + The version of the format + + The version of the format + + + + Identifier of the target framework + + Identifier of the target framework + + + + Enum HOLOLENS for value: HOLOLENS + + + + + Enum ARKIT for value: ARKIT + + + + + Enum ARCORE for value: ARCORE + + Error @@ -1012,109 +1333,201 @@ Gets or Sets Message - + - TrackableEncodingInformationStructure + Trackable - + - Initializes a new instance of the class. + Initializes a new instance of the class. - + - Initializes a new instance of the class. + Initializes a new instance of the class. - Identifier of the target framework (required). - The version of the format (required). + A Universally Unique IDentifier identifying the creator of the trackable (required). + Extensible list of trackable types possibly handled by complient World Storage implementation (required). + trackableEncodingInformation (required). + The data provided to create the trackable in a specific format handled by the World Storage service. (required). + Coordinate reference system of the trackable, a 4*4 matrix (rowmajor) represented by a float vector. + Unit of length (required). + Bounding box of the Trackable, {width, length, 0} for 2D trackables, {width, length, depth} for 3D trackables (required). + List of additional parameters to be stored with the trackable. (required). - + Returns the string presentation of the object String presentation of the object - + Returns the JSON string presentation of the object JSON string presentation of the object - + Returns true if objects are equal Object to be compared Boolean - + - Returns true if TrackableEncodingInformationStructure instances are equal + Returns true if Trackable instances are equal - Instance of TrackableEncodingInformationStructure to be compared + Instance of Trackable to be compared Boolean - + Gets the hash code Hash code - + To validate all properties of the instance Validation context Validation Result - + - Identifier of the target framework + Extensible list of trackable types possibly handled by complient World Storage implementation - Identifier of the target framework + Extensible list of trackable types possibly handled by complient World Storage implementation - + - The version of the format + Unit of length - The version of the format + Unit of length - + - Identifier of the target framework + A Universally Unique IDentifier identifying the creator of the trackable - Identifier of the target framework + A Universally Unique IDentifier identifying the creator of the trackable - + - Enum HOLOLENS for value: HOLOLENS + Gets or Sets TrackableEncodingInformation - + - Enum ARKIT for value: ARKIT + The data provided to create the trackable in a specific format handled by the World Storage service. + The data provided to create the trackable in a specific format handled by the World Storage service. - + - Enum ARCORE for value: ARCORE + Coordinate reference system of the trackable, a 4*4 matrix (rowmajor) represented by a float vector + + Coordinate reference system of the trackable, a 4*4 matrix (rowmajor) represented by a float vector + + + + Bounding box of the Trackable, {width, length, 0} for 2D trackables, {width, length, depth} for 3D trackables + + Bounding box of the Trackable, {width, length, 0} for 2D trackables, {width, length, depth} for 3D trackables + + + + List of additional parameters to be stored with the trackable. + + List of additional parameters to be stored with the trackable. + + + + Extensible list of trackable types possibly handled by complient World Storage implementation + + Extensible list of trackable types possibly handled by complient World Storage implementation + + + + Enum FIDUCIALMARKER for value: FIDUCIAL_MARKER + + + + + Enum IMAGEMARKER for value: IMAGE_MARKER + + + + + Enum MAP for value: MAP + + + + + Enum OTHER for value: OTHER + + + + + Unit of length + + Unit of length + + + + Enum MM for value: MM + + + + + Enum CM for value: CM + + + + + Enum DM for value: DM + + + + + Enum M for value: M - + - Defines unitSystemEnum + Enum DAM for value: DAM - + - Enum METERS for value: METERS + Enum HM for value: HM - + + + Enum KM for value: KM + + + Enum INCH for value: INCH + + + Enum FOOT for value: FOOT + + + + + Enum YARD for value: YARD + + + + + Enum MILE for value: MILE + + diff --git a/Plugins/RestSharp.dll.meta b/Plugins/RestSharp.dll.meta index bde200bca6a83b192381b2da024a4033da257123..3840a62f722008b3ab495b5b799bb148b4803bde 100644 --- a/Plugins/RestSharp.dll.meta +++ b/Plugins/RestSharp.dll.meta @@ -7,7 +7,7 @@ PluginImporter: executionOrder: {} defineConstraints: [] isPreloaded: 0 - isOverridable: 0 + isOverridable: 1 isExplicitlyReferenced: 0 validateReferences: 1 platformData: diff --git a/Scripts/RESTRequest.cs b/Scripts/RESTRequest.cs index e61129d0783bc09894f02f0a9f50cf7b1eb69c39..d538dffbafec80477571587ee33058ca14200497 100644 --- a/Scripts/RESTRequest.cs +++ b/Scripts/RESTRequest.cs @@ -23,62 +23,51 @@ using IO.Swagger.Model; #if UNITY_EDITOR public class RESTRequest { - static public void PostAddTrackable(string basePath) - { - Debug.Log("Posting Add Trackable to Server"); - TrackablesApi api = new TrackablesApi(basePath); - Debug.Log("created Trackables API"); - - TrackableEncodingInformationStructure trackableEncodingInformation = - new TrackableEncodingInformationStructure(TrackableEncodingInformationStructure.DataFormatEnum.ARCORE, "1.0"); - Debug.Log("created encoding information"); + static public void PostAddTrackable(string basePath) + { + Debug.Log("Posting Add Trackable to Server"); + TrackablesApi api = new TrackablesApi(basePath); + Debug.Log("created Trackables API"); -#if USING_OPENAPI_GENERATOR - List trackableDimension = new List(); -#else - List trackableDimension = new List(); -#endif - trackableDimension.Add(5); - trackableDimension.Add(5); - Debug.Log("created dimension"); + EncodingInformationStructure trackableEncodingInformation = + new EncodingInformationStructure(EncodingInformationStructure.DataFormatEnum.ARCORE, "1.0"); - byte[] bytes = new byte[100]; + List trackableDimension = new List { 5, 5, 5 }; - for (int i = 0; i < bytes.Length; i++) - { - bytes[i] = (byte)i; - } + byte[] bytes = new byte[100]; - string result = api.AddTrackable("testCreatorUID", "FIDUCIAL_MARKER", trackableEncodingInformation, bytes, UnitSystemEnum.METERS, trackableDimension); + for (int i = 0; i < bytes.Length; i++) + { + bytes[i] = (byte)i; + } - Debug.Log(result); - } + Dictionary> keyvalueTagList = new Dictionary>(); - static public void PostAddWorldAnchor(string basePath) - { - Debug.Log("Posting Add World Anchor to Server"); - WorldAnchorsApi api = new WorldAnchorsApi(basePath); - Debug.Log("created World Anchors API"); + keyvalueTagList.Add("key", new List { "value" }); - TrackableEncodingInformationStructure trackableEncodingInformation = - new TrackableEncodingInformationStructure(TrackableEncodingInformationStructure.DataFormatEnum.ARCORE, "1.0"); - Debug.Log("created encoding information"); + Trackable trackable = new Trackable(new System.Guid("67584958-3456-2342-4564-456723332345"), + Trackable.TrackableTypeEnum.FIDUCIALMARKER, + trackableEncodingInformation, + bytes, + new List() { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16 }, + Trackable.UnitSystemEnum.M, + trackableDimension, + keyvalueTagList); - List trackableDimension = new List(); - trackableDimension.Add(5); - trackableDimension.Add(5); - Debug.Log("created dimension"); + string result = api.AddTrackable(trackable); - byte[] bytes = new byte[100]; + Debug.Log(result); + } - for (int i = 0; i < bytes.Length; i++) + static public void PostAddWorldAnchor(string basePath) { - bytes[i] = (byte)i; - } + Debug.Log("Posting Add World Anchor to Server"); + //WorldAnchorsApi api = new WorldAnchorsApi(basePath); + Debug.Log("created World Anchors API"); - string result = api.AddWorldAnchor("testCreatorUID", UnitSystemEnum.METERS); + //string result = api.AddWorldAnchor("testCreatorUID", "METERS"); - Debug.Log(result); - } + //Debug.Log(result); + } } #endif \ No newline at end of file