예제 #1
0
        public unsafe IEnumerable <string> LookupObjects(string path, float latitude, float longitude)
        {
            var lookupObjectPaths = new List <string>();

            unsafe void Enumerator(string inFilePath, void *inRef)
            {
                lookupObjectPaths.Add(inFilePath);
            }

            var en = new XPLMLibraryEnumerator_f(Enumerator);

            int numObjects = PluginBridge.ApiFunctions.XPLMLookupObjects(path, latitude, longitude, en, null);

            return(lookupObjectPaths);
        }
    }
예제 #2
0
        public unsafe IEnumerable <string> LookupObjects(string path, float latitude, float longitude)
        {
            var lookupObjectPaths = new List <string>();

            unsafe void Enumerator(string inFilePath, void *inRef)
            {
                // PluginBridge.Log.Log($"Enumerator called with path {inFilePath}");
                lookupObjectPaths.Add(inFilePath);
            }

            var en = new XPLMLibraryEnumerator_f(Enumerator);

            // PluginBridge.Log.Log($"Now calling API function with path {path}");
            int numObjects = PluginBridge.ApiFunctions.XPLMLookupObjects(path, latitude, longitude, en, null);

            // PluginBridge.Log.Log($"API function called, {numObjects} objects were found");
            return(lookupObjectPaths);
        }
    }