diff --git a/lib/generated_bindings_web.dart b/lib/generated_bindings_web.dart new file mode 100644 index 00000000..e5441801 --- /dev/null +++ b/lib/generated_bindings_web.dart @@ -0,0 +1,1573 @@ +// AUTO GENERATED FILE, DO NOT EDIT. +// +// Generated by `package:ffigen`. +// ignore_for_file: type=lint +import 'dart:ffi' as ffi; + +class NativeLibrary { + /// Holds the symbol lookup function. + final ffi.Pointer Function(String symbolName) + _lookup; + + /// The symbols are looked up in [dynamicLibrary]. + NativeLibrary(ffi.DynamicLibrary dynamicLibrary) + : _lookup = dynamicLibrary.lookup; + + /// The symbols are looked up with [lookup]. + NativeLibrary.fromLookup( + ffi.Pointer Function(String symbolName) + lookup) + : _lookup = lookup; + + ffi.Pointer create_filament_viewer( + ffi.Pointer context, + ffi.Pointer loader, + ) { + return _create_filament_viewer( + context, + loader, + ); + } + + late final _create_filament_viewerPtr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer)>>('create_filament_viewer'); + late final _create_filament_viewer = _create_filament_viewerPtr.asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); + + ffi.Pointer make_resource_loader( + LoadResourceFromOwner loadFn, + FreeResourceFromOwner freeFn, + ffi.Pointer owner, + ) { + return _make_resource_loader( + loadFn, + freeFn, + owner, + ); + } + + late final _make_resource_loaderPtr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + LoadResourceFromOwner, + FreeResourceFromOwner, + ffi.Pointer)>>('make_resource_loader'); + late final _make_resource_loader = _make_resource_loaderPtr.asFunction< + ffi.Pointer Function(LoadResourceFromOwner, + FreeResourceFromOwner, ffi.Pointer)>(); + + void delete_filament_viewer( + ffi.Pointer viewer, + ) { + return _delete_filament_viewer( + viewer, + ); + } + + late final _delete_filament_viewerPtr = + _lookup)>>( + 'delete_filament_viewer'); + late final _delete_filament_viewer = _delete_filament_viewerPtr + .asFunction)>(); + + ffi.Pointer get_asset_manager( + ffi.Pointer viewer, + ) { + return _get_asset_manager( + viewer, + ); + } + + late final _get_asset_managerPtr = _lookup< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer)>>('get_asset_manager'); + late final _get_asset_manager = _get_asset_managerPtr + .asFunction Function(ffi.Pointer)>(); + + void create_render_target( + ffi.Pointer viewer, + int textureId, + int width, + int height, + ) { + return _create_render_target( + viewer, + textureId, + width, + height, + ); + } + + late final _create_render_targetPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Uint32, ffi.Uint32, + ffi.Uint32)>>('create_render_target'); + late final _create_render_target = _create_render_targetPtr + .asFunction, int, int, int)>(); + + void clear_background_image( + ffi.Pointer viewer, + ) { + return _clear_background_image( + viewer, + ); + } + + late final _clear_background_imagePtr = + _lookup)>>( + 'clear_background_image'); + late final _clear_background_image = _clear_background_imagePtr + .asFunction)>(); + + void set_background_image( + ffi.Pointer viewer, + ffi.Pointer path, + int fillHeight, + ) { + return _set_background_image( + viewer, + path, + fillHeight, + ); + } + + late final _set_background_imagePtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Int)>>('set_background_image'); + late final _set_background_image = _set_background_imagePtr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, int)>(); + + void set_background_image_position( + ffi.Pointer viewer, + double x, + double y, + int clamp, + ) { + return _set_background_image_position( + viewer, + x, + y, + clamp, + ); + } + + late final _set_background_image_positionPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Float, ffi.Float, + ffi.Int)>>('set_background_image_position'); + late final _set_background_image_position = _set_background_image_positionPtr + .asFunction, double, double, int)>(); + + void set_background_color( + ffi.Pointer viewer, + double r, + double g, + double b, + double a, + ) { + return _set_background_color( + viewer, + r, + g, + b, + a, + ); + } + + late final _set_background_colorPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Float, ffi.Float, + ffi.Float, ffi.Float)>>('set_background_color'); + late final _set_background_color = _set_background_colorPtr.asFunction< + void Function(ffi.Pointer, double, double, double, double)>(); + + void set_tone_mapping( + ffi.Pointer viewer, + int toneMapping, + ) { + return _set_tone_mapping( + viewer, + toneMapping, + ); + } + + late final _set_tone_mappingPtr = _lookup< + ffi + .NativeFunction, ffi.Int)>>( + 'set_tone_mapping'); + late final _set_tone_mapping = _set_tone_mappingPtr + .asFunction, int)>(); + + void set_bloom( + ffi.Pointer viewer, + double strength, + ) { + return _set_bloom( + viewer, + strength, + ); + } + + late final _set_bloomPtr = _lookup< + ffi + .NativeFunction, ffi.Float)>>( + 'set_bloom'); + late final _set_bloom = + _set_bloomPtr.asFunction, double)>(); + + void load_skybox( + ffi.Pointer viewer, + ffi.Pointer skyboxPath, + ) { + return _load_skybox( + viewer, + skyboxPath, + ); + } + + late final _load_skyboxPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, ffi.Pointer)>>('load_skybox'); + late final _load_skybox = _load_skyboxPtr.asFunction< + void Function(ffi.Pointer, ffi.Pointer)>(); + + void load_ibl( + ffi.Pointer viewer, + ffi.Pointer iblPath, + double intensity, + ) { + return _load_ibl( + viewer, + iblPath, + intensity, + ); + } + + late final _load_iblPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Float)>>('load_ibl'); + late final _load_ibl = _load_iblPtr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, double)>(); + + void remove_skybox( + ffi.Pointer viewer, + ) { + return _remove_skybox( + viewer, + ); + } + + late final _remove_skyboxPtr = + _lookup)>>( + 'remove_skybox'); + late final _remove_skybox = + _remove_skyboxPtr.asFunction)>(); + + void remove_ibl( + ffi.Pointer viewer, + ) { + return _remove_ibl( + viewer, + ); + } + + late final _remove_iblPtr = + _lookup)>>( + 'remove_ibl'); + late final _remove_ibl = + _remove_iblPtr.asFunction)>(); + + int add_light( + ffi.Pointer viewer, + int type, + double colour, + double intensity, + double posX, + double posY, + double posZ, + double dirX, + double dirY, + double dirZ, + int shadows, + ) { + return _add_light( + viewer, + type, + colour, + intensity, + posX, + posY, + posZ, + dirX, + dirY, + dirZ, + shadows, + ); + } + + late final _add_lightPtr = _lookup< + ffi.NativeFunction< + EntityId Function( + ffi.Pointer, + ffi.Uint8, + ffi.Float, + ffi.Float, + ffi.Float, + ffi.Float, + ffi.Float, + ffi.Float, + ffi.Float, + ffi.Float, + ffi.Int)>>('add_light'); + late final _add_light = _add_lightPtr.asFunction< + int Function(ffi.Pointer, int, double, double, double, double, + double, double, double, double, int)>(); + + void remove_light( + ffi.Pointer viewer, + int entityId, + ) { + return _remove_light( + viewer, + entityId, + ); + } + + late final _remove_lightPtr = _lookup< + ffi + .NativeFunction, EntityId)>>( + 'remove_light'); + late final _remove_light = + _remove_lightPtr.asFunction, int)>(); + + void clear_lights( + ffi.Pointer viewer, + ) { + return _clear_lights( + viewer, + ); + } + + late final _clear_lightsPtr = + _lookup)>>( + 'clear_lights'); + late final _clear_lights = + _clear_lightsPtr.asFunction)>(); + + int load_glb( + ffi.Pointer assetManager, + ffi.Pointer assetPath, + int unlit, + ) { + return _load_glb( + assetManager, + assetPath, + unlit, + ); + } + + late final _load_glbPtr = _lookup< + ffi.NativeFunction< + EntityId Function(ffi.Pointer, ffi.Pointer, + ffi.Int)>>('load_glb'); + late final _load_glb = _load_glbPtr.asFunction< + int Function(ffi.Pointer, ffi.Pointer, int)>(); + + int load_gltf( + ffi.Pointer assetManager, + ffi.Pointer assetPath, + ffi.Pointer relativePath, + ) { + return _load_gltf( + assetManager, + assetPath, + relativePath, + ); + } + + late final _load_gltfPtr = _lookup< + ffi.NativeFunction< + EntityId Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>('load_gltf'); + late final _load_gltf = _load_gltfPtr.asFunction< + int Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer)>(); + + int set_camera( + ffi.Pointer viewer, + int asset, + ffi.Pointer nodeName, + ) { + return _set_camera( + viewer, + asset, + nodeName, + ); + } + + late final _set_cameraPtr = _lookup< + ffi.NativeFunction< + ffi.Int Function(ffi.Pointer, EntityId, + ffi.Pointer)>>('set_camera'); + late final _set_camera = _set_cameraPtr.asFunction< + int Function(ffi.Pointer, int, ffi.Pointer)>(); + + void render( + ffi.Pointer viewer, + int frameTimeInNanos, + ) { + return _render( + viewer, + frameTimeInNanos, + ); + } + + late final _renderPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Uint64)>>('render'); + late final _render = + _renderPtr.asFunction, int)>(); + + void create_swap_chain( + ffi.Pointer viewer, + ffi.Pointer surface, + int width, + int height, + ) { + return _create_swap_chain( + viewer, + surface, + width, + height, + ); + } + + late final _create_swap_chainPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.Uint32, ffi.Uint32)>>('create_swap_chain'); + late final _create_swap_chain = _create_swap_chainPtr.asFunction< + void Function(ffi.Pointer, ffi.Pointer, int, int)>(); + + void destroy_swap_chain( + ffi.Pointer viewer, + ) { + return _destroy_swap_chain( + viewer, + ); + } + + late final _destroy_swap_chainPtr = + _lookup)>>( + 'destroy_swap_chain'); + late final _destroy_swap_chain = + _destroy_swap_chainPtr.asFunction)>(); + + void set_frame_interval( + ffi.Pointer viewer, + double interval, + ) { + return _set_frame_interval( + viewer, + interval, + ); + } + + late final _set_frame_intervalPtr = _lookup< + ffi + .NativeFunction, ffi.Float)>>( + 'set_frame_interval'); + late final _set_frame_interval = _set_frame_intervalPtr + .asFunction, double)>(); + + void update_viewport_and_camera_projection( + ffi.Pointer viewer, + int width, + int height, + double scaleFactor, + ) { + return _update_viewport_and_camera_projection( + viewer, + width, + height, + scaleFactor, + ); + } + + late final _update_viewport_and_camera_projectionPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Uint32, ffi.Uint32, + ffi.Float)>>('update_viewport_and_camera_projection'); + late final _update_viewport_and_camera_projection = + _update_viewport_and_camera_projectionPtr + .asFunction, int, int, double)>(); + + void scroll_begin( + ffi.Pointer viewer, + ) { + return _scroll_begin( + viewer, + ); + } + + late final _scroll_beginPtr = + _lookup)>>( + 'scroll_begin'); + late final _scroll_begin = + _scroll_beginPtr.asFunction)>(); + + void scroll_update( + ffi.Pointer viewer, + double x, + double y, + double z, + ) { + return _scroll_update( + viewer, + x, + y, + z, + ); + } + + late final _scroll_updatePtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Float, ffi.Float, + ffi.Float)>>('scroll_update'); + late final _scroll_update = _scroll_updatePtr.asFunction< + void Function(ffi.Pointer, double, double, double)>(); + + void scroll_end( + ffi.Pointer viewer, + ) { + return _scroll_end( + viewer, + ); + } + + late final _scroll_endPtr = + _lookup)>>( + 'scroll_end'); + late final _scroll_end = + _scroll_endPtr.asFunction)>(); + + void grab_begin( + ffi.Pointer viewer, + double x, + double y, + int pan, + ) { + return _grab_begin( + viewer, + x, + y, + pan, + ); + } + + late final _grab_beginPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Float, ffi.Float, + ffi.Int)>>('grab_begin'); + late final _grab_begin = _grab_beginPtr + .asFunction, double, double, int)>(); + + void grab_update( + ffi.Pointer viewer, + double x, + double y, + ) { + return _grab_update( + viewer, + x, + y, + ); + } + + late final _grab_updatePtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, ffi.Float, ffi.Float)>>('grab_update'); + late final _grab_update = _grab_updatePtr + .asFunction, double, double)>(); + + void grab_end( + ffi.Pointer viewer, + ) { + return _grab_end( + viewer, + ); + } + + late final _grab_endPtr = + _lookup)>>( + 'grab_end'); + late final _grab_end = + _grab_endPtr.asFunction)>(); + + void apply_weights( + ffi.Pointer assetManager, + int asset, + ffi.Pointer entityName, + ffi.Pointer weights, + int count, + ) { + return _apply_weights( + assetManager, + asset, + entityName, + weights, + count, + ); + } + + late final _apply_weightsPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + EntityId, + ffi.Pointer, + ffi.Pointer, + ffi.Int)>>('apply_weights'); + late final _apply_weights = _apply_weightsPtr.asFunction< + void Function(ffi.Pointer, int, ffi.Pointer, + ffi.Pointer, int)>(); + + void set_morph_target_weights( + ffi.Pointer assetManager, + int asset, + ffi.Pointer entityName, + ffi.Pointer morphData, + int numWeights, + ) { + return _set_morph_target_weights( + assetManager, + asset, + entityName, + morphData, + numWeights, + ); + } + + late final _set_morph_target_weightsPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + EntityId, + ffi.Pointer, + ffi.Pointer, + ffi.Int)>>('set_morph_target_weights'); + late final _set_morph_target_weights = + _set_morph_target_weightsPtr.asFunction< + void Function(ffi.Pointer, int, ffi.Pointer, + ffi.Pointer, int)>(); + + int set_morph_animation( + ffi.Pointer assetManager, + int asset, + ffi.Pointer entityName, + ffi.Pointer morphData, + ffi.Pointer morphIndices, + int numMorphTargets, + int numFrames, + double frameLengthInMs, + ) { + return _set_morph_animation( + assetManager, + asset, + entityName, + morphData, + morphIndices, + numMorphTargets, + numFrames, + frameLengthInMs, + ); + } + + late final _set_morph_animationPtr = _lookup< + ffi.NativeFunction< + ffi.Int Function( + ffi.Pointer, + EntityId, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int, + ffi.Int, + ffi.Float)>>('set_morph_animation'); + late final _set_morph_animation = _set_morph_animationPtr.asFunction< + int Function(ffi.Pointer, int, ffi.Pointer, + ffi.Pointer, ffi.Pointer, int, int, double)>(); + + void set_bone_animation( + ffi.Pointer assetManager, + int asset, + ffi.Pointer frameData, + int numFrames, + int numBones, + ffi.Pointer> boneNames, + ffi.Pointer> meshName, + int numMeshTargets, + double frameLengthInMs, + ) { + return _set_bone_animation( + assetManager, + asset, + frameData, + numFrames, + numBones, + boneNames, + meshName, + numMeshTargets, + frameLengthInMs, + ); + } + + late final _set_bone_animationPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + EntityId, + ffi.Pointer, + ffi.Int, + ffi.Int, + ffi.Pointer>, + ffi.Pointer>, + ffi.Int, + ffi.Float)>>('set_bone_animation'); + late final _set_bone_animation = _set_bone_animationPtr.asFunction< + void Function( + ffi.Pointer, + int, + ffi.Pointer, + int, + int, + ffi.Pointer>, + ffi.Pointer>, + int, + double)>(); + + void play_animation( + ffi.Pointer assetManager, + int asset, + int index, + int loop, + int reverse, + int replaceActive, + double crossfade, + ) { + return _play_animation( + assetManager, + asset, + index, + loop, + reverse, + replaceActive, + crossfade, + ); + } + + late final _play_animationPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, EntityId, ffi.Int, ffi.Int, + ffi.Int, ffi.Int, ffi.Float)>>('play_animation'); + late final _play_animation = _play_animationPtr.asFunction< + void Function(ffi.Pointer, int, int, int, int, int, double)>(); + + void set_animation_frame( + ffi.Pointer assetManager, + int asset, + int animationIndex, + int animationFrame, + ) { + return _set_animation_frame( + assetManager, + asset, + animationIndex, + animationFrame, + ); + } + + late final _set_animation_framePtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, EntityId, ffi.Int, + ffi.Int)>>('set_animation_frame'); + late final _set_animation_frame = _set_animation_framePtr + .asFunction, int, int, int)>(); + + void stop_animation( + ffi.Pointer assetManager, + int asset, + int index, + ) { + return _stop_animation( + assetManager, + asset, + index, + ); + } + + late final _stop_animationPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, EntityId, ffi.Int)>>('stop_animation'); + late final _stop_animation = _stop_animationPtr + .asFunction, int, int)>(); + + int get_animation_count( + ffi.Pointer assetManager, + int asset, + ) { + return _get_animation_count( + assetManager, + asset, + ); + } + + late final _get_animation_countPtr = _lookup< + ffi + .NativeFunction, EntityId)>>( + 'get_animation_count'); + late final _get_animation_count = _get_animation_countPtr + .asFunction, int)>(); + + void get_animation_name( + ffi.Pointer assetManager, + int asset, + ffi.Pointer outPtr, + int index, + ) { + return _get_animation_name( + assetManager, + asset, + outPtr, + index, + ); + } + + late final _get_animation_namePtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, EntityId, + ffi.Pointer, ffi.Int)>>('get_animation_name'); + late final _get_animation_name = _get_animation_namePtr.asFunction< + void Function(ffi.Pointer, int, ffi.Pointer, int)>(); + + double get_animation_duration( + ffi.Pointer assetManager, + int asset, + int index, + ) { + return _get_animation_duration( + assetManager, + asset, + index, + ); + } + + late final _get_animation_durationPtr = _lookup< + ffi.NativeFunction< + ffi.Float Function(ffi.Pointer, EntityId, + ffi.Int)>>('get_animation_duration'); + late final _get_animation_duration = _get_animation_durationPtr + .asFunction, int, int)>(); + + void get_morph_target_name( + ffi.Pointer assetManager, + int asset, + ffi.Pointer meshName, + ffi.Pointer outPtr, + int index, + ) { + return _get_morph_target_name( + assetManager, + asset, + meshName, + outPtr, + index, + ); + } + + late final _get_morph_target_namePtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + EntityId, + ffi.Pointer, + ffi.Pointer, + ffi.Int)>>('get_morph_target_name'); + late final _get_morph_target_name = _get_morph_target_namePtr.asFunction< + void Function(ffi.Pointer, int, ffi.Pointer, + ffi.Pointer, int)>(); + + int get_morph_target_name_count( + ffi.Pointer assetManager, + int asset, + ffi.Pointer meshName, + ) { + return _get_morph_target_name_count( + assetManager, + asset, + meshName, + ); + } + + late final _get_morph_target_name_countPtr = _lookup< + ffi.NativeFunction< + ffi.Int Function(ffi.Pointer, EntityId, + ffi.Pointer)>>('get_morph_target_name_count'); + late final _get_morph_target_name_count = + _get_morph_target_name_countPtr.asFunction< + int Function(ffi.Pointer, int, ffi.Pointer)>(); + + void remove_asset( + ffi.Pointer viewer, + int asset, + ) { + return _remove_asset( + viewer, + asset, + ); + } + + late final _remove_assetPtr = _lookup< + ffi + .NativeFunction, EntityId)>>( + 'remove_asset'); + late final _remove_asset = + _remove_assetPtr.asFunction, int)>(); + + void clear_assets( + ffi.Pointer viewer, + ) { + return _clear_assets( + viewer, + ); + } + + late final _clear_assetsPtr = + _lookup)>>( + 'clear_assets'); + late final _clear_assets = + _clear_assetsPtr.asFunction)>(); + + void load_texture( + ffi.Pointer assetManager, + int asset, + ffi.Pointer assetPath, + int renderableIndex, + ) { + return _load_texture( + assetManager, + asset, + assetPath, + renderableIndex, + ); + } + + late final _load_texturePtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, EntityId, + ffi.Pointer, ffi.Int)>>('load_texture'); + late final _load_texture = _load_texturePtr.asFunction< + void Function(ffi.Pointer, int, ffi.Pointer, int)>(); + + void set_texture( + ffi.Pointer assetManager, + int asset, + ) { + return _set_texture( + assetManager, + asset, + ); + } + + late final _set_texturePtr = _lookup< + ffi + .NativeFunction, EntityId)>>( + 'set_texture'); + late final _set_texture = + _set_texturePtr.asFunction, int)>(); + + int set_material_color( + ffi.Pointer assetManager, + int asset, + ffi.Pointer meshName, + int materialIndex, + double r, + double g, + double b, + double a, + ) { + return _set_material_color( + assetManager, + asset, + meshName, + materialIndex, + r, + g, + b, + a, + ); + } + + late final _set_material_colorPtr = _lookup< + ffi.NativeFunction< + ffi.Int Function( + ffi.Pointer, + EntityId, + ffi.Pointer, + ffi.Int, + ffi.Float, + ffi.Float, + ffi.Float, + ffi.Float)>>('set_material_color'); + late final _set_material_color = _set_material_colorPtr.asFunction< + int Function(ffi.Pointer, int, ffi.Pointer, int, + double, double, double, double)>(); + + void transform_to_unit_cube( + ffi.Pointer assetManager, + int asset, + ) { + return _transform_to_unit_cube( + assetManager, + asset, + ); + } + + late final _transform_to_unit_cubePtr = _lookup< + ffi + .NativeFunction, EntityId)>>( + 'transform_to_unit_cube'); + late final _transform_to_unit_cube = _transform_to_unit_cubePtr + .asFunction, int)>(); + + void set_position( + ffi.Pointer assetManager, + int asset, + double x, + double y, + double z, + ) { + return _set_position( + assetManager, + asset, + x, + y, + z, + ); + } + + late final _set_positionPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, EntityId, ffi.Float, + ffi.Float, ffi.Float)>>('set_position'); + late final _set_position = _set_positionPtr.asFunction< + void Function(ffi.Pointer, int, double, double, double)>(); + + void set_rotation( + ffi.Pointer assetManager, + int asset, + double rads, + double x, + double y, + double z, + ) { + return _set_rotation( + assetManager, + asset, + rads, + x, + y, + z, + ); + } + + late final _set_rotationPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, EntityId, ffi.Float, + ffi.Float, ffi.Float, ffi.Float)>>('set_rotation'); + late final _set_rotation = _set_rotationPtr.asFunction< + void Function( + ffi.Pointer, int, double, double, double, double)>(); + + void set_scale( + ffi.Pointer assetManager, + int asset, + double scale, + ) { + return _set_scale( + assetManager, + asset, + scale, + ); + } + + late final _set_scalePtr = _lookup< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, EntityId, ffi.Float)>>('set_scale'); + late final _set_scale = _set_scalePtr + .asFunction, int, double)>(); + + void set_camera_exposure( + ffi.Pointer viewer, + double aperture, + double shutterSpeed, + double sensitivity, + ) { + return _set_camera_exposure( + viewer, + aperture, + shutterSpeed, + sensitivity, + ); + } + + late final _set_camera_exposurePtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Float, ffi.Float, + ffi.Float)>>('set_camera_exposure'); + late final _set_camera_exposure = _set_camera_exposurePtr.asFunction< + void Function(ffi.Pointer, double, double, double)>(); + + void set_camera_position( + ffi.Pointer viewer, + double x, + double y, + double z, + ) { + return _set_camera_position( + viewer, + x, + y, + z, + ); + } + + late final _set_camera_positionPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Float, ffi.Float, + ffi.Float)>>('set_camera_position'); + late final _set_camera_position = _set_camera_positionPtr.asFunction< + void Function(ffi.Pointer, double, double, double)>(); + + void set_camera_rotation( + ffi.Pointer viewer, + double rads, + double x, + double y, + double z, + ) { + return _set_camera_rotation( + viewer, + rads, + x, + y, + z, + ); + } + + late final _set_camera_rotationPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, ffi.Float, ffi.Float, + ffi.Float, ffi.Float)>>('set_camera_rotation'); + late final _set_camera_rotation = _set_camera_rotationPtr.asFunction< + void Function(ffi.Pointer, double, double, double, double)>(); + + void set_camera_model_matrix( + ffi.Pointer viewer, + ffi.Pointer matrix, + ) { + return _set_camera_model_matrix( + viewer, + matrix, + ); + } + + late final _set_camera_model_matrixPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer)>>('set_camera_model_matrix'); + late final _set_camera_model_matrix = _set_camera_model_matrixPtr.asFunction< + void Function(ffi.Pointer, ffi.Pointer)>(); + + void set_camera_focal_length( + ffi.Pointer viewer, + double focalLength, + ) { + return _set_camera_focal_length( + viewer, + focalLength, + ); + } + + late final _set_camera_focal_lengthPtr = _lookup< + ffi + .NativeFunction, ffi.Float)>>( + 'set_camera_focal_length'); + late final _set_camera_focal_length = _set_camera_focal_lengthPtr + .asFunction, double)>(); + + void set_camera_focus_distance( + ffi.Pointer viewer, + double focusDistance, + ) { + return _set_camera_focus_distance( + viewer, + focusDistance, + ); + } + + late final _set_camera_focus_distancePtr = _lookup< + ffi + .NativeFunction, ffi.Float)>>( + 'set_camera_focus_distance'); + late final _set_camera_focus_distance = _set_camera_focus_distancePtr + .asFunction, double)>(); + + int hide_mesh( + ffi.Pointer assetManager, + int asset, + ffi.Pointer meshName, + ) { + return _hide_mesh( + assetManager, + asset, + meshName, + ); + } + + late final _hide_meshPtr = _lookup< + ffi.NativeFunction< + ffi.Int Function(ffi.Pointer, EntityId, + ffi.Pointer)>>('hide_mesh'); + late final _hide_mesh = _hide_meshPtr.asFunction< + int Function(ffi.Pointer, int, ffi.Pointer)>(); + + int reveal_mesh( + ffi.Pointer assetManager, + int asset, + ffi.Pointer meshName, + ) { + return _reveal_mesh( + assetManager, + asset, + meshName, + ); + } + + late final _reveal_meshPtr = _lookup< + ffi.NativeFunction< + ffi.Int Function(ffi.Pointer, EntityId, + ffi.Pointer)>>('reveal_mesh'); + late final _reveal_mesh = _reveal_meshPtr.asFunction< + int Function(ffi.Pointer, int, ffi.Pointer)>(); + + void ios_dummy() { + return _ios_dummy(); + } + + late final _ios_dummyPtr = + _lookup>('ios_dummy'); + late final _ios_dummy = _ios_dummyPtr.asFunction(); +} + +class __mbstate_t extends ffi.Union { + @ffi.Array.multi([128]) + external ffi.Array __mbstate8; + + @ffi.LongLong() + external int _mbstateL; +} + +class __darwin_pthread_handler_rec extends ffi.Struct { + external ffi + .Pointer)>> + __routine; + + external ffi.Pointer __arg; + + external ffi.Pointer<__darwin_pthread_handler_rec> __next; +} + +class _opaque_pthread_attr_t extends ffi.Struct { + @ffi.Long() + external int __sig; + + @ffi.Array.multi([56]) + external ffi.Array __opaque; +} + +class _opaque_pthread_cond_t extends ffi.Struct { + @ffi.Long() + external int __sig; + + @ffi.Array.multi([40]) + external ffi.Array __opaque; +} + +class _opaque_pthread_condattr_t extends ffi.Struct { + @ffi.Long() + external int __sig; + + @ffi.Array.multi([8]) + external ffi.Array __opaque; +} + +class _opaque_pthread_mutex_t extends ffi.Struct { + @ffi.Long() + external int __sig; + + @ffi.Array.multi([56]) + external ffi.Array __opaque; +} + +class _opaque_pthread_mutexattr_t extends ffi.Struct { + @ffi.Long() + external int __sig; + + @ffi.Array.multi([8]) + external ffi.Array __opaque; +} + +class _opaque_pthread_once_t extends ffi.Struct { + @ffi.Long() + external int __sig; + + @ffi.Array.multi([8]) + external ffi.Array __opaque; +} + +class _opaque_pthread_rwlock_t extends ffi.Struct { + @ffi.Long() + external int __sig; + + @ffi.Array.multi([192]) + external ffi.Array __opaque; +} + +class _opaque_pthread_rwlockattr_t extends ffi.Struct { + @ffi.Long() + external int __sig; + + @ffi.Array.multi([16]) + external ffi.Array __opaque; +} + +class _opaque_pthread_t extends ffi.Struct { + @ffi.Long() + external int __sig; + + external ffi.Pointer<__darwin_pthread_handler_rec> __cleanup_stack; + + @ffi.Array.multi([8176]) + external ffi.Array __opaque; +} + +class ResourceBuffer extends ffi.Struct { + external ffi.Pointer data; + + @ffi.Uint32() + external int size; + + @ffi.Uint32() + external int id; +} + +class ResourceLoaderWrapper extends ffi.Struct { + external LoadResource mLoadResource; + + external FreeResource mFreeResource; + + external LoadResourceFromOwner mLoadResourceFromOwner; + + external FreeResourceFromOwner mFreeResourceFromOwner; + + external ffi.Pointer mOwner; +} + +typedef LoadResource = ffi.Pointer< + ffi.NativeFunction uri)>>; +typedef FreeResource + = ffi.Pointer>; +typedef LoadResourceFromOwner = ffi.Pointer< + ffi.NativeFunction< + ResourceBuffer Function(ffi.Pointer, ffi.Pointer)>>; +typedef FreeResourceFromOwner = ffi.Pointer< + ffi + .NativeFunction)>>; +typedef EntityId = ffi.Int32; + +const int __WORDSIZE = 64; + +const int __DARWIN_ONLY_64_BIT_INO_T = 1; + +const int __DARWIN_ONLY_UNIX_CONFORMANCE = 1; + +const int __DARWIN_ONLY_VERS_1050 = 1; + +const int __DARWIN_UNIX03 = 1; + +const int __DARWIN_64_BIT_INO_T = 1; + +const int __DARWIN_VERS_1050 = 1; + +const int __DARWIN_NON_CANCELABLE = 0; + +const String __DARWIN_SUF_EXTSN = '\$DARWIN_EXTSN'; + +const int __DARWIN_C_ANSI = 4096; + +const int __DARWIN_C_FULL = 900000; + +const int __DARWIN_C_LEVEL = 900000; + +const int __STDC_WANT_LIB_EXT1__ = 1; + +const int __DARWIN_NO_LONG_LONG = 0; + +const int _DARWIN_FEATURE_64_BIT_INODE = 1; + +const int _DARWIN_FEATURE_ONLY_64_BIT_INODE = 1; + +const int _DARWIN_FEATURE_ONLY_VERS_1050 = 1; + +const int _DARWIN_FEATURE_ONLY_UNIX_CONFORMANCE = 1; + +const int _DARWIN_FEATURE_UNIX_CONFORMANCE = 3; + +const int __has_ptrcheck = 0; + +const int __DARWIN_NULL = 0; + +const int __PTHREAD_SIZE__ = 8176; + +const int __PTHREAD_ATTR_SIZE__ = 56; + +const int __PTHREAD_MUTEXATTR_SIZE__ = 8; + +const int __PTHREAD_MUTEX_SIZE__ = 56; + +const int __PTHREAD_CONDATTR_SIZE__ = 8; + +const int __PTHREAD_COND_SIZE__ = 40; + +const int __PTHREAD_ONCE_SIZE__ = 8; + +const int __PTHREAD_RWLOCK_SIZE__ = 192; + +const int __PTHREAD_RWLOCKATTR_SIZE__ = 16; + +const int USER_ADDR_NULL = 0; + +const int INT8_MAX = 127; + +const int INT16_MAX = 32767; + +const int INT32_MAX = 2147483647; + +const int INT64_MAX = 9223372036854775807; + +const int INT8_MIN = -128; + +const int INT16_MIN = -32768; + +const int INT32_MIN = -2147483648; + +const int INT64_MIN = -9223372036854775808; + +const int UINT8_MAX = 255; + +const int UINT16_MAX = 65535; + +const int UINT32_MAX = 4294967295; + +const int UINT64_MAX = -1; + +const int INT_LEAST8_MIN = -128; + +const int INT_LEAST16_MIN = -32768; + +const int INT_LEAST32_MIN = -2147483648; + +const int INT_LEAST64_MIN = -9223372036854775808; + +const int INT_LEAST8_MAX = 127; + +const int INT_LEAST16_MAX = 32767; + +const int INT_LEAST32_MAX = 2147483647; + +const int INT_LEAST64_MAX = 9223372036854775807; + +const int UINT_LEAST8_MAX = 255; + +const int UINT_LEAST16_MAX = 65535; + +const int UINT_LEAST32_MAX = 4294967295; + +const int UINT_LEAST64_MAX = -1; + +const int INT_FAST8_MIN = -128; + +const int INT_FAST16_MIN = -32768; + +const int INT_FAST32_MIN = -2147483648; + +const int INT_FAST64_MIN = -9223372036854775808; + +const int INT_FAST8_MAX = 127; + +const int INT_FAST16_MAX = 32767; + +const int INT_FAST32_MAX = 2147483647; + +const int INT_FAST64_MAX = 9223372036854775807; + +const int UINT_FAST8_MAX = 255; + +const int UINT_FAST16_MAX = 65535; + +const int UINT_FAST32_MAX = 4294967295; + +const int UINT_FAST64_MAX = -1; + +const int INTPTR_MAX = 9223372036854775807; + +const int INTPTR_MIN = -9223372036854775808; + +const int UINTPTR_MAX = -1; + +const int INTMAX_MAX = 9223372036854775807; + +const int UINTMAX_MAX = -1; + +const int INTMAX_MIN = -9223372036854775808; + +const int PTRDIFF_MIN = -9223372036854775808; + +const int PTRDIFF_MAX = 9223372036854775807; + +const int SIZE_MAX = -1; + +const int RSIZE_MAX = 9223372036854775807; + +const int WCHAR_MAX = 2147483647; + +const int WCHAR_MIN = -2147483648; + +const int WINT_MIN = -2147483648; + +const int WINT_MAX = 2147483647; + +const int SIG_ATOMIC_MIN = -2147483648; + +const int SIG_ATOMIC_MAX = 2147483647;