use crate::{open, LoadError};
use std::{mem::ManuallyDrop, path::Path};
#[repr(C)]
#[derive(Debug, Clone, Copy, Default)]
pub struct GeoKernelGlobeOptions {
pub struct_size: u32,
pub abi_version: u32,
pub network_enabled: i32,
pub basemap: i32,
pub terrain_enabled: i32,
pub atmosphere_enabled: i32,
pub sunlight_enabled: i32,
pub space_background_enabled: i32,
pub terrain_max_zoom: i32,
pub terrain_lerc: i32,
pub terrain_exaggeration: f64,
}
#[repr(C)]
#[derive(Debug, Clone, Copy, Default)]
pub struct GeoKernelGlobeCamera {
pub struct_size: u32,
pub abi_version: u32,
pub longitude: f64,
pub latitude: f64,
pub target_height_metres: f64,
pub distance_metres: f64,
pub pitch_degrees: f64,
pub heading_degrees: f64,
}
pub struct GlobeApi {
_library: ManuallyDrop<libloading::Library>,
GeoKernelGlobe_GetApiVersion: unsafe extern "C" fn() -> u32,
GeoKernelGlobe_DefaultOptions: unsafe extern "C" fn(*mut GeoKernelGlobeOptions) -> i32,
GeoKernelGlobe_DefaultCamera: unsafe extern "C" fn(*mut GeoKernelGlobeCamera) -> i32,
GeoKernelGlobe_Initialize: unsafe extern "C" fn() -> i32,
GeoKernelGlobe_ProcessEvents: unsafe extern "C" fn() -> i32,
GeoKernelGlobe_GetCapabilities: unsafe extern "C" fn(*mut u64) -> i32,
GeoKernelGlobe_Create: unsafe extern "C" fn(
usize,
*const GeoKernelGlobeOptions,
*const GeoKernelGlobeCamera,
*mut u64,
) -> i32,
GeoKernelGlobe_Destroy: unsafe extern "C" fn(u64) -> i32,
GeoKernelGlobe_Resize: unsafe extern "C" fn(u64, i32, i32) -> i32,
GeoKernelGlobe_SetVisible: unsafe extern "C" fn(u64, i32) -> i32,
GeoKernelGlobe_GetNativeHandle: unsafe extern "C" fn(u64, *mut usize) -> i32,
GeoKernelGlobe_GetOptions: unsafe extern "C" fn(u64, *mut GeoKernelGlobeOptions) -> i32,
GeoKernelGlobe_SetOptions: unsafe extern "C" fn(u64, *const GeoKernelGlobeOptions) -> i32,
GeoKernelGlobe_SetBasemap: unsafe extern "C" fn(u64, i32) -> i32,
GeoKernelGlobe_ConfigureTerrain:
unsafe extern "C" fn(u64, *const std::ffi::c_char, i32, f64, i32) -> i32,
GeoKernelGlobe_GetCamera: unsafe extern "C" fn(u64, *mut GeoKernelGlobeCamera) -> i32,
GeoKernelGlobe_SetCamera: unsafe extern "C" fn(u64, *const GeoKernelGlobeCamera) -> i32,
GeoKernelGlobe_SetHomeCamera: unsafe extern "C" fn(u64, *const GeoKernelGlobeCamera) -> i32,
GeoKernelGlobe_ResetCamera: unsafe extern "C" fn(u64) -> i32,
GeoKernelGlobe_Navigate: unsafe extern "C" fn(u64, i32) -> i32,
GeoKernelGlobe_SetInteractionMode: unsafe extern "C" fn(u64, i32) -> i32,
GeoKernelGlobe_ClearInteraction: unsafe extern "C" fn(u64) -> i32,
GeoKernelGlobe_GetLastError: unsafe extern "C" fn(*mut std::ffi::c_char, u32, *mut u32) -> i32,
GeoKernelGlobe_GetBasemaps: unsafe extern "C" fn(*mut std::ffi::c_char, u32, *mut u32) -> i32,
GeoKernelGlobe_GetAttribution:
unsafe extern "C" fn(u64, *mut std::ffi::c_char, u32, *mut u32) -> i32,
GeoKernelGlobe_GetState: unsafe extern "C" fn(u64, *mut std::ffi::c_char, u32, *mut u32) -> i32,
GeoKernelGlobe_PollEvent:
unsafe extern "C" fn(u64, *mut std::ffi::c_char, u32, *mut u32) -> i32,
GeoKernelGlobe_LoadVector: unsafe extern "C" fn(u64, *const std::ffi::c_char, *mut u64) -> i32,
GeoKernelGlobe_SetVectorStyle:
unsafe extern "C" fn(u64, *const std::ffi::c_char, *mut u64) -> i32,
GeoKernelGlobe_ConfigureBuildings:
unsafe extern "C" fn(u64, *const std::ffi::c_char, *mut u64) -> i32,
GeoKernelGlobe_LoadModel: unsafe extern "C" fn(u64, *const std::ffi::c_char, *mut u64) -> i32,
GeoKernelGlobe_SetModelPlacement:
unsafe extern "C" fn(u64, *const std::ffi::c_char, *mut u64) -> i32,
GeoKernelGlobe_LoadRaster: unsafe extern "C" fn(u64, *const std::ffi::c_char, *mut u64) -> i32,
GeoKernelGlobe_LoadDem: unsafe extern "C" fn(u64, *const std::ffi::c_char, *mut u64) -> i32,
GeoKernelGlobe_GetLayers:
unsafe extern "C" fn(u64, *mut std::ffi::c_char, u32, *mut u32) -> i32,
GeoKernelGlobe_GetLayerState: unsafe extern "C" fn(
u64,
*const std::ffi::c_char,
*mut std::ffi::c_char,
u32,
*mut u32,
) -> i32,
GeoKernelGlobe_GetJobState:
unsafe extern "C" fn(u64, u64, *mut std::ffi::c_char, u32, *mut u32) -> i32,
GeoKernelGlobe_CancelJob: unsafe extern "C" fn(u64, u64) -> i32,
GeoKernelGlobe_ForgetJob: unsafe extern "C" fn(u64, u64) -> i32,
GeoKernelGlobe_FocusLayer: unsafe extern "C" fn(u64, *const std::ffi::c_char) -> i32,
GeoKernelGlobe_RemoveLayer: unsafe extern "C" fn(u64, *const std::ffi::c_char) -> i32,
GeoKernelGlobe_SetLayerVisible: unsafe extern "C" fn(u64, *const std::ffi::c_char, i32) -> i32,
GeoKernelGlobe_SetLayerOpacity: unsafe extern "C" fn(u64, *const std::ffi::c_char, f64) -> i32,
GeoKernelGlobe_GetFeatureInfo: unsafe extern "C" fn(
u64,
*const std::ffi::c_char,
*const std::ffi::c_char,
*mut std::ffi::c_char,
u32,
*mut u32,
) -> i32,
GeoKernelGlobe_SetDemStyle: unsafe extern "C" fn(u64, i32, f64, f64) -> i32,
GeoKernelGlobe_SampleElevation:
unsafe extern "C" fn(u64, f64, f64, *mut std::ffi::c_char, u32, *mut u32) -> i32,
GeoKernelGlobe_GroundAt:
unsafe extern "C" fn(u64, f64, f64, *mut std::ffi::c_char, u32, *mut u32) -> i32,
GeoKernelGlobe_IdentifyAt:
unsafe extern "C" fn(u64, f64, f64, *mut std::ffi::c_char, u32, *mut u32) -> i32,
GeoKernelGlobe_SetMeasurementPoints: unsafe extern "C" fn(u64, *const std::ffi::c_char) -> i32,
GeoKernelGlobe_StartTerrainAnalysis:
unsafe extern "C" fn(u64, *const std::ffi::c_char, *mut u64) -> i32,
GeoKernelGlobe_GetMeasurement:
unsafe extern "C" fn(u64, *mut std::ffi::c_char, u32, *mut u32) -> i32,
GeoKernelGlobe_GetTerrainAnalysis:
unsafe extern "C" fn(u64, *mut std::ffi::c_char, u32, *mut u32) -> i32,
GeoKernelGlobe_ClearMeasurement: unsafe extern "C" fn(u64) -> i32,
GeoKernelGlobe_CancelTerrainAnalysis: unsafe extern "C" fn(u64) -> i32,
GeoKernelGlobe_ClearTerrainAnalysis: unsafe extern "C" fn(u64) -> i32,
GeoKernelGlobe_SetAnalysisOverlayVisible: unsafe extern "C" fn(u64, i32) -> i32,
}
impl GlobeApi {
pub const SYMBOLS: &'static [&'static str] = &[
"GeoKernelGlobe_GetApiVersion",
"GeoKernelGlobe_DefaultOptions",
"GeoKernelGlobe_DefaultCamera",
"GeoKernelGlobe_Initialize",
"GeoKernelGlobe_ProcessEvents",
"GeoKernelGlobe_GetCapabilities",
"GeoKernelGlobe_Create",
"GeoKernelGlobe_Destroy",
"GeoKernelGlobe_Resize",
"GeoKernelGlobe_SetVisible",
"GeoKernelGlobe_GetNativeHandle",
"GeoKernelGlobe_GetOptions",
"GeoKernelGlobe_SetOptions",
"GeoKernelGlobe_SetBasemap",
"GeoKernelGlobe_ConfigureTerrain",
"GeoKernelGlobe_GetCamera",
"GeoKernelGlobe_SetCamera",
"GeoKernelGlobe_SetHomeCamera",
"GeoKernelGlobe_ResetCamera",
"GeoKernelGlobe_Navigate",
"GeoKernelGlobe_SetInteractionMode",
"GeoKernelGlobe_ClearInteraction",
"GeoKernelGlobe_GetLastError",
"GeoKernelGlobe_GetBasemaps",
"GeoKernelGlobe_GetAttribution",
"GeoKernelGlobe_GetState",
"GeoKernelGlobe_PollEvent",
"GeoKernelGlobe_LoadVector",
"GeoKernelGlobe_SetVectorStyle",
"GeoKernelGlobe_ConfigureBuildings",
"GeoKernelGlobe_LoadModel",
"GeoKernelGlobe_SetModelPlacement",
"GeoKernelGlobe_LoadRaster",
"GeoKernelGlobe_LoadDem",
"GeoKernelGlobe_GetLayers",
"GeoKernelGlobe_GetLayerState",
"GeoKernelGlobe_GetJobState",
"GeoKernelGlobe_CancelJob",
"GeoKernelGlobe_ForgetJob",
"GeoKernelGlobe_FocusLayer",
"GeoKernelGlobe_RemoveLayer",
"GeoKernelGlobe_SetLayerVisible",
"GeoKernelGlobe_SetLayerOpacity",
"GeoKernelGlobe_GetFeatureInfo",
"GeoKernelGlobe_SetDemStyle",
"GeoKernelGlobe_SampleElevation",
"GeoKernelGlobe_GroundAt",
"GeoKernelGlobe_IdentifyAt",
"GeoKernelGlobe_SetMeasurementPoints",
"GeoKernelGlobe_StartTerrainAnalysis",
"GeoKernelGlobe_GetMeasurement",
"GeoKernelGlobe_GetTerrainAnalysis",
"GeoKernelGlobe_ClearMeasurement",
"GeoKernelGlobe_CancelTerrainAnalysis",
"GeoKernelGlobe_ClearTerrainAnalysis",
"GeoKernelGlobe_SetAnalysisOverlayVisible",
];
pub unsafe fn load(path: &Path) -> Result<Self, LoadError> {
let library = open(path)?;
Ok(Self {
GeoKernelGlobe_GetApiVersion: *library.get(b"GeoKernelGlobe_GetApiVersion\0")?,
GeoKernelGlobe_DefaultOptions: *library.get(b"GeoKernelGlobe_DefaultOptions\0")?,
GeoKernelGlobe_DefaultCamera: *library.get(b"GeoKernelGlobe_DefaultCamera\0")?,
GeoKernelGlobe_Initialize: *library.get(b"GeoKernelGlobe_Initialize\0")?,
GeoKernelGlobe_ProcessEvents: *library.get(b"GeoKernelGlobe_ProcessEvents\0")?,
GeoKernelGlobe_GetCapabilities: *library.get(b"GeoKernelGlobe_GetCapabilities\0")?,
GeoKernelGlobe_Create: *library.get(b"GeoKernelGlobe_Create\0")?,
GeoKernelGlobe_Destroy: *library.get(b"GeoKernelGlobe_Destroy\0")?,
GeoKernelGlobe_Resize: *library.get(b"GeoKernelGlobe_Resize\0")?,
GeoKernelGlobe_SetVisible: *library.get(b"GeoKernelGlobe_SetVisible\0")?,
GeoKernelGlobe_GetNativeHandle: *library.get(b"GeoKernelGlobe_GetNativeHandle\0")?,
GeoKernelGlobe_GetOptions: *library.get(b"GeoKernelGlobe_GetOptions\0")?,
GeoKernelGlobe_SetOptions: *library.get(b"GeoKernelGlobe_SetOptions\0")?,
GeoKernelGlobe_SetBasemap: *library.get(b"GeoKernelGlobe_SetBasemap\0")?,
GeoKernelGlobe_ConfigureTerrain: *library.get(b"GeoKernelGlobe_ConfigureTerrain\0")?,
GeoKernelGlobe_GetCamera: *library.get(b"GeoKernelGlobe_GetCamera\0")?,
GeoKernelGlobe_SetCamera: *library.get(b"GeoKernelGlobe_SetCamera\0")?,
GeoKernelGlobe_SetHomeCamera: *library.get(b"GeoKernelGlobe_SetHomeCamera\0")?,
GeoKernelGlobe_ResetCamera: *library.get(b"GeoKernelGlobe_ResetCamera\0")?,
GeoKernelGlobe_Navigate: *library.get(b"GeoKernelGlobe_Navigate\0")?,
GeoKernelGlobe_SetInteractionMode: *library
.get(b"GeoKernelGlobe_SetInteractionMode\0")?,
GeoKernelGlobe_ClearInteraction: *library.get(b"GeoKernelGlobe_ClearInteraction\0")?,
GeoKernelGlobe_GetLastError: *library.get(b"GeoKernelGlobe_GetLastError\0")?,
GeoKernelGlobe_GetBasemaps: *library.get(b"GeoKernelGlobe_GetBasemaps\0")?,
GeoKernelGlobe_GetAttribution: *library.get(b"GeoKernelGlobe_GetAttribution\0")?,
GeoKernelGlobe_GetState: *library.get(b"GeoKernelGlobe_GetState\0")?,
GeoKernelGlobe_PollEvent: *library.get(b"GeoKernelGlobe_PollEvent\0")?,
GeoKernelGlobe_LoadVector: *library.get(b"GeoKernelGlobe_LoadVector\0")?,
GeoKernelGlobe_SetVectorStyle: *library.get(b"GeoKernelGlobe_SetVectorStyle\0")?,
GeoKernelGlobe_ConfigureBuildings: *library
.get(b"GeoKernelGlobe_ConfigureBuildings\0")?,
GeoKernelGlobe_LoadModel: *library.get(b"GeoKernelGlobe_LoadModel\0")?,
GeoKernelGlobe_SetModelPlacement: *library
.get(b"GeoKernelGlobe_SetModelPlacement\0")?,
GeoKernelGlobe_LoadRaster: *library.get(b"GeoKernelGlobe_LoadRaster\0")?,
GeoKernelGlobe_LoadDem: *library.get(b"GeoKernelGlobe_LoadDem\0")?,
GeoKernelGlobe_GetLayers: *library.get(b"GeoKernelGlobe_GetLayers\0")?,
GeoKernelGlobe_GetLayerState: *library.get(b"GeoKernelGlobe_GetLayerState\0")?,
GeoKernelGlobe_GetJobState: *library.get(b"GeoKernelGlobe_GetJobState\0")?,
GeoKernelGlobe_CancelJob: *library.get(b"GeoKernelGlobe_CancelJob\0")?,
GeoKernelGlobe_ForgetJob: *library.get(b"GeoKernelGlobe_ForgetJob\0")?,
GeoKernelGlobe_FocusLayer: *library.get(b"GeoKernelGlobe_FocusLayer\0")?,
GeoKernelGlobe_RemoveLayer: *library.get(b"GeoKernelGlobe_RemoveLayer\0")?,
GeoKernelGlobe_SetLayerVisible: *library.get(b"GeoKernelGlobe_SetLayerVisible\0")?,
GeoKernelGlobe_SetLayerOpacity: *library.get(b"GeoKernelGlobe_SetLayerOpacity\0")?,
GeoKernelGlobe_GetFeatureInfo: *library.get(b"GeoKernelGlobe_GetFeatureInfo\0")?,
GeoKernelGlobe_SetDemStyle: *library.get(b"GeoKernelGlobe_SetDemStyle\0")?,
GeoKernelGlobe_SampleElevation: *library.get(b"GeoKernelGlobe_SampleElevation\0")?,
GeoKernelGlobe_GroundAt: *library.get(b"GeoKernelGlobe_GroundAt\0")?,
GeoKernelGlobe_IdentifyAt: *library.get(b"GeoKernelGlobe_IdentifyAt\0")?,
GeoKernelGlobe_SetMeasurementPoints: *library
.get(b"GeoKernelGlobe_SetMeasurementPoints\0")?,
GeoKernelGlobe_StartTerrainAnalysis: *library
.get(b"GeoKernelGlobe_StartTerrainAnalysis\0")?,
GeoKernelGlobe_GetMeasurement: *library.get(b"GeoKernelGlobe_GetMeasurement\0")?,
GeoKernelGlobe_GetTerrainAnalysis: *library
.get(b"GeoKernelGlobe_GetTerrainAnalysis\0")?,
GeoKernelGlobe_ClearMeasurement: *library.get(b"GeoKernelGlobe_ClearMeasurement\0")?,
GeoKernelGlobe_CancelTerrainAnalysis: *library
.get(b"GeoKernelGlobe_CancelTerrainAnalysis\0")?,
GeoKernelGlobe_ClearTerrainAnalysis: *library
.get(b"GeoKernelGlobe_ClearTerrainAnalysis\0")?,
GeoKernelGlobe_SetAnalysisOverlayVisible: *library
.get(b"GeoKernelGlobe_SetAnalysisOverlayVisible\0")?,
_library: library,
})
}
pub unsafe fn GeoKernelGlobe_GetApiVersion(&self) -> u32 {
(self.GeoKernelGlobe_GetApiVersion)()
}
pub unsafe fn GeoKernelGlobe_DefaultOptions(&self, options: *mut GeoKernelGlobeOptions) -> i32 {
(self.GeoKernelGlobe_DefaultOptions)(options)
}
pub unsafe fn GeoKernelGlobe_DefaultCamera(&self, camera: *mut GeoKernelGlobeCamera) -> i32 {
(self.GeoKernelGlobe_DefaultCamera)(camera)
}
pub unsafe fn GeoKernelGlobe_Initialize(&self) -> i32 {
(self.GeoKernelGlobe_Initialize)()
}
pub unsafe fn GeoKernelGlobe_ProcessEvents(&self) -> i32 {
(self.GeoKernelGlobe_ProcessEvents)()
}
pub unsafe fn GeoKernelGlobe_GetCapabilities(&self, capabilities: *mut u64) -> i32 {
(self.GeoKernelGlobe_GetCapabilities)(capabilities)
}
pub unsafe fn GeoKernelGlobe_Create(
&self,
parent_window: usize,
options: *const GeoKernelGlobeOptions,
camera: *const GeoKernelGlobeCamera,
handle: *mut u64,
) -> i32 {
(self.GeoKernelGlobe_Create)(parent_window, options, camera, handle)
}
pub unsafe fn GeoKernelGlobe_Destroy(&self, handle: u64) -> i32 {
(self.GeoKernelGlobe_Destroy)(handle)
}
pub unsafe fn GeoKernelGlobe_Resize(&self, handle: u64, width: i32, height: i32) -> i32 {
(self.GeoKernelGlobe_Resize)(handle, width, height)
}
pub unsafe fn GeoKernelGlobe_SetVisible(&self, handle: u64, visible: i32) -> i32 {
(self.GeoKernelGlobe_SetVisible)(handle, visible)
}
pub unsafe fn GeoKernelGlobe_GetNativeHandle(
&self,
handle: u64,
native_window: *mut usize,
) -> i32 {
(self.GeoKernelGlobe_GetNativeHandle)(handle, native_window)
}
pub unsafe fn GeoKernelGlobe_GetOptions(
&self,
handle: u64,
options: *mut GeoKernelGlobeOptions,
) -> i32 {
(self.GeoKernelGlobe_GetOptions)(handle, options)
}
pub unsafe fn GeoKernelGlobe_SetOptions(
&self,
handle: u64,
options: *const GeoKernelGlobeOptions,
) -> i32 {
(self.GeoKernelGlobe_SetOptions)(handle, options)
}
pub unsafe fn GeoKernelGlobe_SetBasemap(&self, handle: u64, index: i32) -> i32 {
(self.GeoKernelGlobe_SetBasemap)(handle, index)
}
pub unsafe fn GeoKernelGlobe_ConfigureTerrain(
&self,
handle: u64,
url_utf8: *const std::ffi::c_char,
max_zoom: i32,
exaggeration: f64,
lerc: i32,
) -> i32 {
(self.GeoKernelGlobe_ConfigureTerrain)(handle, url_utf8, max_zoom, exaggeration, lerc)
}
pub unsafe fn GeoKernelGlobe_GetCamera(
&self,
handle: u64,
camera: *mut GeoKernelGlobeCamera,
) -> i32 {
(self.GeoKernelGlobe_GetCamera)(handle, camera)
}
pub unsafe fn GeoKernelGlobe_SetCamera(
&self,
handle: u64,
camera: *const GeoKernelGlobeCamera,
) -> i32 {
(self.GeoKernelGlobe_SetCamera)(handle, camera)
}
pub unsafe fn GeoKernelGlobe_SetHomeCamera(
&self,
handle: u64,
camera: *const GeoKernelGlobeCamera,
) -> i32 {
(self.GeoKernelGlobe_SetHomeCamera)(handle, camera)
}
pub unsafe fn GeoKernelGlobe_ResetCamera(&self, handle: u64) -> i32 {
(self.GeoKernelGlobe_ResetCamera)(handle)
}
pub unsafe fn GeoKernelGlobe_Navigate(&self, handle: u64, action: i32) -> i32 {
(self.GeoKernelGlobe_Navigate)(handle, action)
}
pub unsafe fn GeoKernelGlobe_SetInteractionMode(&self, handle: u64, mode: i32) -> i32 {
(self.GeoKernelGlobe_SetInteractionMode)(handle, mode)
}
pub unsafe fn GeoKernelGlobe_ClearInteraction(&self, handle: u64) -> i32 {
(self.GeoKernelGlobe_ClearInteraction)(handle)
}
pub unsafe fn GeoKernelGlobe_GetLastError(
&self,
buffer: *mut std::ffi::c_char,
capacity: u32,
required_bytes: *mut u32,
) -> i32 {
(self.GeoKernelGlobe_GetLastError)(buffer, capacity, required_bytes)
}
pub unsafe fn GeoKernelGlobe_GetBasemaps(
&self,
buffer: *mut std::ffi::c_char,
capacity: u32,
required_bytes: *mut u32,
) -> i32 {
(self.GeoKernelGlobe_GetBasemaps)(buffer, capacity, required_bytes)
}
pub unsafe fn GeoKernelGlobe_GetAttribution(
&self,
handle: u64,
buffer: *mut std::ffi::c_char,
capacity: u32,
required_bytes: *mut u32,
) -> i32 {
(self.GeoKernelGlobe_GetAttribution)(handle, buffer, capacity, required_bytes)
}
pub unsafe fn GeoKernelGlobe_GetState(
&self,
handle: u64,
buffer: *mut std::ffi::c_char,
capacity: u32,
required_bytes: *mut u32,
) -> i32 {
(self.GeoKernelGlobe_GetState)(handle, buffer, capacity, required_bytes)
}
pub unsafe fn GeoKernelGlobe_PollEvent(
&self,
handle: u64,
buffer: *mut std::ffi::c_char,
capacity: u32,
required_bytes: *mut u32,
) -> i32 {
(self.GeoKernelGlobe_PollEvent)(handle, buffer, capacity, required_bytes)
}
pub unsafe fn GeoKernelGlobe_LoadVector(
&self,
handle: u64,
request_json: *const std::ffi::c_char,
job_id: *mut u64,
) -> i32 {
(self.GeoKernelGlobe_LoadVector)(handle, request_json, job_id)
}
pub unsafe fn GeoKernelGlobe_SetVectorStyle(
&self,
handle: u64,
request_json: *const std::ffi::c_char,
job_id: *mut u64,
) -> i32 {
(self.GeoKernelGlobe_SetVectorStyle)(handle, request_json, job_id)
}
pub unsafe fn GeoKernelGlobe_ConfigureBuildings(
&self,
handle: u64,
request_json: *const std::ffi::c_char,
job_id: *mut u64,
) -> i32 {
(self.GeoKernelGlobe_ConfigureBuildings)(handle, request_json, job_id)
}
pub unsafe fn GeoKernelGlobe_LoadModel(
&self,
handle: u64,
request_json: *const std::ffi::c_char,
job_id: *mut u64,
) -> i32 {
(self.GeoKernelGlobe_LoadModel)(handle, request_json, job_id)
}
pub unsafe fn GeoKernelGlobe_SetModelPlacement(
&self,
handle: u64,
request_json: *const std::ffi::c_char,
job_id: *mut u64,
) -> i32 {
(self.GeoKernelGlobe_SetModelPlacement)(handle, request_json, job_id)
}
pub unsafe fn GeoKernelGlobe_LoadRaster(
&self,
handle: u64,
request_json: *const std::ffi::c_char,
job_id: *mut u64,
) -> i32 {
(self.GeoKernelGlobe_LoadRaster)(handle, request_json, job_id)
}
pub unsafe fn GeoKernelGlobe_LoadDem(
&self,
handle: u64,
request_json: *const std::ffi::c_char,
job_id: *mut u64,
) -> i32 {
(self.GeoKernelGlobe_LoadDem)(handle, request_json, job_id)
}
pub unsafe fn GeoKernelGlobe_GetLayers(
&self,
handle: u64,
buffer: *mut std::ffi::c_char,
capacity: u32,
required_bytes: *mut u32,
) -> i32 {
(self.GeoKernelGlobe_GetLayers)(handle, buffer, capacity, required_bytes)
}
pub unsafe fn GeoKernelGlobe_GetLayerState(
&self,
handle: u64,
layer_id: *const std::ffi::c_char,
buffer: *mut std::ffi::c_char,
capacity: u32,
required_bytes: *mut u32,
) -> i32 {
(self.GeoKernelGlobe_GetLayerState)(handle, layer_id, buffer, capacity, required_bytes)
}
pub unsafe fn GeoKernelGlobe_GetJobState(
&self,
handle: u64,
job_id: u64,
buffer: *mut std::ffi::c_char,
capacity: u32,
required_bytes: *mut u32,
) -> i32 {
(self.GeoKernelGlobe_GetJobState)(handle, job_id, buffer, capacity, required_bytes)
}
pub unsafe fn GeoKernelGlobe_CancelJob(&self, handle: u64, job_id: u64) -> i32 {
(self.GeoKernelGlobe_CancelJob)(handle, job_id)
}
pub unsafe fn GeoKernelGlobe_ForgetJob(&self, handle: u64, job_id: u64) -> i32 {
(self.GeoKernelGlobe_ForgetJob)(handle, job_id)
}
pub unsafe fn GeoKernelGlobe_FocusLayer(
&self,
handle: u64,
layer_id: *const std::ffi::c_char,
) -> i32 {
(self.GeoKernelGlobe_FocusLayer)(handle, layer_id)
}
pub unsafe fn GeoKernelGlobe_RemoveLayer(
&self,
handle: u64,
layer_id: *const std::ffi::c_char,
) -> i32 {
(self.GeoKernelGlobe_RemoveLayer)(handle, layer_id)
}
pub unsafe fn GeoKernelGlobe_SetLayerVisible(
&self,
handle: u64,
layer_id: *const std::ffi::c_char,
visible: i32,
) -> i32 {
(self.GeoKernelGlobe_SetLayerVisible)(handle, layer_id, visible)
}
pub unsafe fn GeoKernelGlobe_SetLayerOpacity(
&self,
handle: u64,
layer_id: *const std::ffi::c_char,
opacity: f64,
) -> i32 {
(self.GeoKernelGlobe_SetLayerOpacity)(handle, layer_id, opacity)
}
pub unsafe fn GeoKernelGlobe_GetFeatureInfo(
&self,
handle: u64,
layer_id: *const std::ffi::c_char,
feature_id: *const std::ffi::c_char,
buffer: *mut std::ffi::c_char,
capacity: u32,
required_bytes: *mut u32,
) -> i32 {
(self.GeoKernelGlobe_GetFeatureInfo)(
handle,
layer_id,
feature_id,
buffer,
capacity,
required_bytes,
)
}
pub unsafe fn GeoKernelGlobe_SetDemStyle(
&self,
handle: u64,
color_enabled: i32,
minimum: f64,
maximum: f64,
) -> i32 {
(self.GeoKernelGlobe_SetDemStyle)(handle, color_enabled, minimum, maximum)
}
pub unsafe fn GeoKernelGlobe_SampleElevation(
&self,
handle: u64,
x: f64,
y: f64,
buffer: *mut std::ffi::c_char,
capacity: u32,
required_bytes: *mut u32,
) -> i32 {
(self.GeoKernelGlobe_SampleElevation)(handle, x, y, buffer, capacity, required_bytes)
}
pub unsafe fn GeoKernelGlobe_GroundAt(
&self,
handle: u64,
x: f64,
y: f64,
buffer: *mut std::ffi::c_char,
capacity: u32,
required_bytes: *mut u32,
) -> i32 {
(self.GeoKernelGlobe_GroundAt)(handle, x, y, buffer, capacity, required_bytes)
}
pub unsafe fn GeoKernelGlobe_IdentifyAt(
&self,
handle: u64,
x: f64,
y: f64,
buffer: *mut std::ffi::c_char,
capacity: u32,
required_bytes: *mut u32,
) -> i32 {
(self.GeoKernelGlobe_IdentifyAt)(handle, x, y, buffer, capacity, required_bytes)
}
pub unsafe fn GeoKernelGlobe_SetMeasurementPoints(
&self,
handle: u64,
request_json: *const std::ffi::c_char,
) -> i32 {
(self.GeoKernelGlobe_SetMeasurementPoints)(handle, request_json)
}
pub unsafe fn GeoKernelGlobe_StartTerrainAnalysis(
&self,
handle: u64,
request_json: *const std::ffi::c_char,
analysis_id: *mut u64,
) -> i32 {
(self.GeoKernelGlobe_StartTerrainAnalysis)(handle, request_json, analysis_id)
}
pub unsafe fn GeoKernelGlobe_GetMeasurement(
&self,
handle: u64,
buffer: *mut std::ffi::c_char,
capacity: u32,
required_bytes: *mut u32,
) -> i32 {
(self.GeoKernelGlobe_GetMeasurement)(handle, buffer, capacity, required_bytes)
}
pub unsafe fn GeoKernelGlobe_GetTerrainAnalysis(
&self,
handle: u64,
buffer: *mut std::ffi::c_char,
capacity: u32,
required_bytes: *mut u32,
) -> i32 {
(self.GeoKernelGlobe_GetTerrainAnalysis)(handle, buffer, capacity, required_bytes)
}
pub unsafe fn GeoKernelGlobe_ClearMeasurement(&self, handle: u64) -> i32 {
(self.GeoKernelGlobe_ClearMeasurement)(handle)
}
pub unsafe fn GeoKernelGlobe_CancelTerrainAnalysis(&self, handle: u64) -> i32 {
(self.GeoKernelGlobe_CancelTerrainAnalysis)(handle)
}
pub unsafe fn GeoKernelGlobe_ClearTerrainAnalysis(&self, handle: u64) -> i32 {
(self.GeoKernelGlobe_ClearTerrainAnalysis)(handle)
}
pub unsafe fn GeoKernelGlobe_SetAnalysisOverlayVisible(
&self,
handle: u64,
visible: i32,
) -> i32 {
(self.GeoKernelGlobe_SetAnalysisOverlayVisible)(handle, visible)
}
}