Loading Runtime/Scripts/WorldAnalysisARFoundationModule.cs +4 −3 Original line number Diff line number Diff line Loading @@ -30,13 +30,14 @@ public interface WorldAnalysisARFoundationModule public bool AddTrackable(ETSI.ARF.OpenAPI.WorldStorage.Trackable trackable); /// <summary> /// /// Get the pose of the trackable from its uuid /// </summary> /// <param name="uuid"></param> /// <param name="uuid">id of the trackable</param> /// <returns>null or trackableInfo with last updated values</returns> public TrackableInfo GetPoseTrackable(Guid uuid); /// <summary> /// Initialize capability object with the features of the /// Initialize capability object with the features of the module /// </summary> public ETSI.ARF.OpenAPI.WorldAnalysis.Capability GetSupportedCapability(); Loading Runtime/Scripts/WorldAnalysisARFoundationModuleARCoreAnchor.cs +6 −6 Original line number Diff line number Diff line Loading @@ -74,9 +74,9 @@ public class WorldAnalysisARFoundationModuleARCoreAnchor : WorldAnalysisARFounda } /// <summary> /// /// Initialize capability object with the features of the arcore cloud anchor module /// </summary> /// <returns></returns> /// <returns>a Capability object</returns> public ETSI.ARF.OpenAPI.WorldAnalysis.Capability GetSupportedCapability() { ETSI.ARF.OpenAPI.WorldAnalysis.Capability capabilityARCoreAnchor = new ETSI.ARF.OpenAPI.WorldAnalysis.Capability(); Loading @@ -92,7 +92,7 @@ public class WorldAnalysisARFoundationModuleARCoreAnchor : WorldAnalysisARFounda } /// <summary> /// /// Update arcore cloud anchors informations /// </summary> /// <param name="eventArgs"></param> private void OnTrackedCloudAnchorChanged(ARAnchorsChangedEventArgs eventArgs) Loading Loading @@ -140,7 +140,7 @@ public class WorldAnalysisARFoundationModuleARCoreAnchor : WorldAnalysisARFounda } /// <summary> /// /// Create a new ARCore Cloud anchor using ARCore API id /// </summary> /// <param name="trackable"></param> private async void AddNewARCoreCloudAnchor(ETSI.ARF.OpenAPI.WorldStorage.Trackable trackable) Loading Loading @@ -172,7 +172,7 @@ public class WorldAnalysisARFoundationModuleARCoreAnchor : WorldAnalysisARFounda } /// <summary> /// /// Resolves cloud anchor promise /// </summary> /// <param name="promise"></param> /// <returns></returns> Loading Runtime/Scripts/WorldAnalysisARFoundationModuleGeospatial.cs +42 −32 Original line number Diff line number Diff line Loading @@ -15,16 +15,26 @@ public class WorldAnalysisARFoundationModuleGeospatial : WorldAnalysisARFoundati /// </summary> private ARAnchorManager m_anchorManager; /// <summary> /// Earth manager /// </summary> private AREarthManager m_arEarthManager; /// <summary> /// List of geospatial anchors with tracking infos /// </summary> private Dictionary<string, TrackableInfo> m_trackedGeospatialAnchors = new Dictionary<string, TrackableInfo>(); private bool geospatialSupported = true; /// <summary> /// Correspondance between local trackable and etsi uuid /// </summary> private Dictionary<string, string> m_localIdToEtsiId = new Dictionary<string, string>(); /// <summary> /// Check if ARCore Geospatial is supported on the device /// </summary> private bool geospatialSupported = true; /// <summary> /// Initialize ARCore geospatial anchors tracking module /// </summary> Loading @@ -43,10 +53,10 @@ public class WorldAnalysisARFoundationModuleGeospatial : WorldAnalysisARFoundati } /// <summary> /// /// Get the pose of the trackable from its uuid /// </summary> /// <param name="uuid"></param> /// <returns></returns> /// <param name="uuid">id of the trackable</param> /// <returns>null or trackableInfo with last updated values</returns> public TrackableInfo GetPoseTrackable(Guid uuid) { if (m_trackedGeospatialAnchors.ContainsKey(uuid.ToString())) Loading @@ -60,10 +70,10 @@ public class WorldAnalysisARFoundationModuleGeospatial : WorldAnalysisARFoundati } /// <summary> /// /// Need to be a geopose /// </summary> /// <param name="trackable"></param> /// <returns></returns> /// <returns>geopose or not (does not check is solved)</returns> public bool AddTrackable(ETSI.ARF.OpenAPI.WorldStorage.Trackable trackable) { if (!geospatialSupported) return false; Loading @@ -77,7 +87,30 @@ public class WorldAnalysisARFoundationModuleGeospatial : WorldAnalysisARFoundati return true; } /// <summary> /// Initialize capability object with the features of the geospatial module /// </summary> /// <returns>null if ARCore Geospatial is not supported on the device, or a Capability object</returns> public ETSI.ARF.OpenAPI.WorldAnalysis.Capability GetSupportedCapability() { if (!geospatialSupported) return null; ETSI.ARF.OpenAPI.WorldAnalysis.Capability capabilityGeospatialAnchor = new ETSI.ARF.OpenAPI.WorldAnalysis.Capability(); capabilityGeospatialAnchor.TrackableType = ETSI.ARF.OpenAPI.WorldAnalysis.TrackableType.GEOPOSE; ETSI.ARF.OpenAPI.WorldAnalysis.EncodingInformationStructure encodingInformation = new ETSI.ARF.OpenAPI.WorldAnalysis.EncodingInformationStructure(); encodingInformation.DataFormat = ETSI.ARF.OpenAPI.WorldAnalysis.EncodingInformationStructureDataFormat.ARCORE; encodingInformation.Version = "1.01"; capabilityGeospatialAnchor.EncodingInformation = encodingInformation; capabilityGeospatialAnchor.Framerate = 30; // Not particularly specified on ARKit and ARCore capabilityGeospatialAnchor.Latency = 0; // Not particularly specified on ARKit and ARCore capabilityGeospatialAnchor.Accuracy = 1; // Not particularly specified on ARKit and ARCore return capabilityGeospatialAnchor; } /// <summary> /// Creates a new ARCore Geospatial anchor using informations from a geopose trackable object /// </summary> /// <param name="trackable"></param> public async void CreateGeosptialAnchor(ETSI.ARF.OpenAPI.WorldStorage.Trackable trackable) { if (geospatialSupported) Loading @@ -88,7 +121,6 @@ public class WorldAnalysisARFoundationModuleGeospatial : WorldAnalysisARFoundati } if (m_arEarthManager.IsGeospatialModeSupported(GeospatialMode.Enabled) != FeatureSupported.Supported) { Debug.Log("Support : " + m_arEarthManager.IsGeospatialModeSupported(GeospatialMode.Enabled)); geospatialSupported = false; } else Loading @@ -111,31 +143,10 @@ public class WorldAnalysisARFoundationModuleGeospatial : WorldAnalysisARFoundati } } /// <summary> /// /// </summary> /// <returns></returns> public ETSI.ARF.OpenAPI.WorldAnalysis.Capability GetSupportedCapability() //s'occuper de a (fonction doc) { if (!geospatialSupported) return null; ETSI.ARF.OpenAPI.WorldAnalysis.Capability capabilityGeospatialAnchor = new ETSI.ARF.OpenAPI.WorldAnalysis.Capability(); capabilityGeospatialAnchor.TrackableType = ETSI.ARF.OpenAPI.WorldAnalysis.TrackableType.GEOPOSE; ETSI.ARF.OpenAPI.WorldAnalysis.EncodingInformationStructure encodingInformation = new ETSI.ARF.OpenAPI.WorldAnalysis.EncodingInformationStructure(); encodingInformation.DataFormat = ETSI.ARF.OpenAPI.WorldAnalysis.EncodingInformationStructureDataFormat.ARCORE; encodingInformation.Version = "1.01"; capabilityGeospatialAnchor.EncodingInformation = encodingInformation; capabilityGeospatialAnchor.Framerate = 30; // Not particularly specified on ARKit and ARCore capabilityGeospatialAnchor.Latency = 0; // Not particularly specified on ARKit and ARCore capabilityGeospatialAnchor.Accuracy = 1; // Not particularly specified on ARKit and ARCore return capabilityGeospatialAnchor; } /// <summary> /// /// Update geospatial anchors informations /// </summary> /// <param name="eventArgs"></param> /// <param name="eventArgs">Event arguments for the <see cref="ARAnchorManager.anchorsChanged"/> event</param> private void OnTrackedGeospatialAnchorChanged(ARAnchorsChangedEventArgs eventArgs) { foreach (var trackedGeospatialAnchor in eventArgs.updated) Loading Loading @@ -181,5 +192,4 @@ public class WorldAnalysisARFoundationModuleGeospatial : WorldAnalysisARFoundati } } } #endif No newline at end of file Loading
Runtime/Scripts/WorldAnalysisARFoundationModule.cs +4 −3 Original line number Diff line number Diff line Loading @@ -30,13 +30,14 @@ public interface WorldAnalysisARFoundationModule public bool AddTrackable(ETSI.ARF.OpenAPI.WorldStorage.Trackable trackable); /// <summary> /// /// Get the pose of the trackable from its uuid /// </summary> /// <param name="uuid"></param> /// <param name="uuid">id of the trackable</param> /// <returns>null or trackableInfo with last updated values</returns> public TrackableInfo GetPoseTrackable(Guid uuid); /// <summary> /// Initialize capability object with the features of the /// Initialize capability object with the features of the module /// </summary> public ETSI.ARF.OpenAPI.WorldAnalysis.Capability GetSupportedCapability(); Loading
Runtime/Scripts/WorldAnalysisARFoundationModuleARCoreAnchor.cs +6 −6 Original line number Diff line number Diff line Loading @@ -74,9 +74,9 @@ public class WorldAnalysisARFoundationModuleARCoreAnchor : WorldAnalysisARFounda } /// <summary> /// /// Initialize capability object with the features of the arcore cloud anchor module /// </summary> /// <returns></returns> /// <returns>a Capability object</returns> public ETSI.ARF.OpenAPI.WorldAnalysis.Capability GetSupportedCapability() { ETSI.ARF.OpenAPI.WorldAnalysis.Capability capabilityARCoreAnchor = new ETSI.ARF.OpenAPI.WorldAnalysis.Capability(); Loading @@ -92,7 +92,7 @@ public class WorldAnalysisARFoundationModuleARCoreAnchor : WorldAnalysisARFounda } /// <summary> /// /// Update arcore cloud anchors informations /// </summary> /// <param name="eventArgs"></param> private void OnTrackedCloudAnchorChanged(ARAnchorsChangedEventArgs eventArgs) Loading Loading @@ -140,7 +140,7 @@ public class WorldAnalysisARFoundationModuleARCoreAnchor : WorldAnalysisARFounda } /// <summary> /// /// Create a new ARCore Cloud anchor using ARCore API id /// </summary> /// <param name="trackable"></param> private async void AddNewARCoreCloudAnchor(ETSI.ARF.OpenAPI.WorldStorage.Trackable trackable) Loading Loading @@ -172,7 +172,7 @@ public class WorldAnalysisARFoundationModuleARCoreAnchor : WorldAnalysisARFounda } /// <summary> /// /// Resolves cloud anchor promise /// </summary> /// <param name="promise"></param> /// <returns></returns> Loading
Runtime/Scripts/WorldAnalysisARFoundationModuleGeospatial.cs +42 −32 Original line number Diff line number Diff line Loading @@ -15,16 +15,26 @@ public class WorldAnalysisARFoundationModuleGeospatial : WorldAnalysisARFoundati /// </summary> private ARAnchorManager m_anchorManager; /// <summary> /// Earth manager /// </summary> private AREarthManager m_arEarthManager; /// <summary> /// List of geospatial anchors with tracking infos /// </summary> private Dictionary<string, TrackableInfo> m_trackedGeospatialAnchors = new Dictionary<string, TrackableInfo>(); private bool geospatialSupported = true; /// <summary> /// Correspondance between local trackable and etsi uuid /// </summary> private Dictionary<string, string> m_localIdToEtsiId = new Dictionary<string, string>(); /// <summary> /// Check if ARCore Geospatial is supported on the device /// </summary> private bool geospatialSupported = true; /// <summary> /// Initialize ARCore geospatial anchors tracking module /// </summary> Loading @@ -43,10 +53,10 @@ public class WorldAnalysisARFoundationModuleGeospatial : WorldAnalysisARFoundati } /// <summary> /// /// Get the pose of the trackable from its uuid /// </summary> /// <param name="uuid"></param> /// <returns></returns> /// <param name="uuid">id of the trackable</param> /// <returns>null or trackableInfo with last updated values</returns> public TrackableInfo GetPoseTrackable(Guid uuid) { if (m_trackedGeospatialAnchors.ContainsKey(uuid.ToString())) Loading @@ -60,10 +70,10 @@ public class WorldAnalysisARFoundationModuleGeospatial : WorldAnalysisARFoundati } /// <summary> /// /// Need to be a geopose /// </summary> /// <param name="trackable"></param> /// <returns></returns> /// <returns>geopose or not (does not check is solved)</returns> public bool AddTrackable(ETSI.ARF.OpenAPI.WorldStorage.Trackable trackable) { if (!geospatialSupported) return false; Loading @@ -77,7 +87,30 @@ public class WorldAnalysisARFoundationModuleGeospatial : WorldAnalysisARFoundati return true; } /// <summary> /// Initialize capability object with the features of the geospatial module /// </summary> /// <returns>null if ARCore Geospatial is not supported on the device, or a Capability object</returns> public ETSI.ARF.OpenAPI.WorldAnalysis.Capability GetSupportedCapability() { if (!geospatialSupported) return null; ETSI.ARF.OpenAPI.WorldAnalysis.Capability capabilityGeospatialAnchor = new ETSI.ARF.OpenAPI.WorldAnalysis.Capability(); capabilityGeospatialAnchor.TrackableType = ETSI.ARF.OpenAPI.WorldAnalysis.TrackableType.GEOPOSE; ETSI.ARF.OpenAPI.WorldAnalysis.EncodingInformationStructure encodingInformation = new ETSI.ARF.OpenAPI.WorldAnalysis.EncodingInformationStructure(); encodingInformation.DataFormat = ETSI.ARF.OpenAPI.WorldAnalysis.EncodingInformationStructureDataFormat.ARCORE; encodingInformation.Version = "1.01"; capabilityGeospatialAnchor.EncodingInformation = encodingInformation; capabilityGeospatialAnchor.Framerate = 30; // Not particularly specified on ARKit and ARCore capabilityGeospatialAnchor.Latency = 0; // Not particularly specified on ARKit and ARCore capabilityGeospatialAnchor.Accuracy = 1; // Not particularly specified on ARKit and ARCore return capabilityGeospatialAnchor; } /// <summary> /// Creates a new ARCore Geospatial anchor using informations from a geopose trackable object /// </summary> /// <param name="trackable"></param> public async void CreateGeosptialAnchor(ETSI.ARF.OpenAPI.WorldStorage.Trackable trackable) { if (geospatialSupported) Loading @@ -88,7 +121,6 @@ public class WorldAnalysisARFoundationModuleGeospatial : WorldAnalysisARFoundati } if (m_arEarthManager.IsGeospatialModeSupported(GeospatialMode.Enabled) != FeatureSupported.Supported) { Debug.Log("Support : " + m_arEarthManager.IsGeospatialModeSupported(GeospatialMode.Enabled)); geospatialSupported = false; } else Loading @@ -111,31 +143,10 @@ public class WorldAnalysisARFoundationModuleGeospatial : WorldAnalysisARFoundati } } /// <summary> /// /// </summary> /// <returns></returns> public ETSI.ARF.OpenAPI.WorldAnalysis.Capability GetSupportedCapability() //s'occuper de a (fonction doc) { if (!geospatialSupported) return null; ETSI.ARF.OpenAPI.WorldAnalysis.Capability capabilityGeospatialAnchor = new ETSI.ARF.OpenAPI.WorldAnalysis.Capability(); capabilityGeospatialAnchor.TrackableType = ETSI.ARF.OpenAPI.WorldAnalysis.TrackableType.GEOPOSE; ETSI.ARF.OpenAPI.WorldAnalysis.EncodingInformationStructure encodingInformation = new ETSI.ARF.OpenAPI.WorldAnalysis.EncodingInformationStructure(); encodingInformation.DataFormat = ETSI.ARF.OpenAPI.WorldAnalysis.EncodingInformationStructureDataFormat.ARCORE; encodingInformation.Version = "1.01"; capabilityGeospatialAnchor.EncodingInformation = encodingInformation; capabilityGeospatialAnchor.Framerate = 30; // Not particularly specified on ARKit and ARCore capabilityGeospatialAnchor.Latency = 0; // Not particularly specified on ARKit and ARCore capabilityGeospatialAnchor.Accuracy = 1; // Not particularly specified on ARKit and ARCore return capabilityGeospatialAnchor; } /// <summary> /// /// Update geospatial anchors informations /// </summary> /// <param name="eventArgs"></param> /// <param name="eventArgs">Event arguments for the <see cref="ARAnchorManager.anchorsChanged"/> event</param> private void OnTrackedGeospatialAnchorChanged(ARAnchorsChangedEventArgs eventArgs) { foreach (var trackedGeospatialAnchor in eventArgs.updated) Loading Loading @@ -181,5 +192,4 @@ public class WorldAnalysisARFoundationModuleGeospatial : WorldAnalysisARFoundati } } } #endif No newline at end of file